@nrg-ui/standards
v0.4.0
Published
Composable standards for NRG UI packages
Downloads
216
Readme
@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 add --save-dev @nrg-ui/standards
yarn add --dev @nrg-ui/standards
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.
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.
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
|