@nrg-ui/standards

0.5.0 • Public • Published

@nrg-ui/standards

This package contains the standards followed by the NRG UI project. It can be imported into any project to enforce the same standards.

Installation

To install this library in your project, simply add it as a dev dependency:

npm
npm add --save-dev @nrg-ui/standards
yarn
yarn add --dev @nrg-ui/standards
pnpm
pnpm add --save-dev @nrg-ui/standards

Usage

A sample eslint.config.mjs file is provided below (it's actually the config used for this package!):

import { eslint, merge } from '@nrg-ui/standards';

export default await merge(
  eslint.rules.ignore(),
  eslint.rules.base(),
  eslint.rules.js(),
  eslint.rules.ts(),
);

CLI

This package includes a CLI as an addition tool. Global options are provided below.

Option Values Description
--log-level
  • silent
  • error
  • warn
  • info (default)
  • debug
Which information should be logged

Migration

If you would like to automatically migrate one or more tool(s) to this library, you can use the migrate command:

pnpx @nrg-ui/standards migrate

There are several options that can be included to customize what tool(s) are migrated. Currently, only ESLint is supported by this package.

Option Values Description
--include
  • all (default)
  • eslint
Which developer tools are migrated to this library

Compatibility

Since this package uses ESLint v9, various plugins have a minimum version requirement. The following table lists the compatibility of the plugins:

Plugin Version
eslint-plugin-decorator-position ^6.0.0
eslint-plugin-ember ^12.2.0
eslint-plugin-import ^2.31.0
eslint-plugin-n ^16.0.0
eslint-plugin-qunit ^8.1.2

Package Sidebar

Install

npm i @nrg-ui/standards

Weekly Downloads

16

Version

0.5.0

License

MIT

Unpacked Size

43.7 kB

Total Files

12

Last publish

Collaborators

  • keith-clinard
  • tsenter