@rnx-kit/eslint-plugin v0.8.6
@rnx-kit/eslint-plugin
@rnx-kit/eslint-plugin is a set of configurations and rules that can be used
as is, or extended in your own ESLint config.
Note that this plugin requires the new ESLint configuration format. If you still rely on the previous format, use version 0.5.x instead.
Install
yarn add @rnx-kit/eslint-plugin --devor if you're using npm:
npm add --save-dev @rnx-kit/eslint-pluginUsage
This ESLint plugin exports multiple configurations. For instance, to use the
recommended
configuration, you can re-export it in your
flat config
like below:
module.exports = require("@rnx-kit/eslint-plugin/recommended");Alternatively, if you want to add customizations:
const rnx = require("@rnx-kit/eslint-plugin");
module.exports = [
...rnx.configs.recommended,
{
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
},
},
];If you're just interested in the rules, you can use it as a plugin and enable the rules you're interested in:
module.exports = [
{
plugins: {
"@rnx-kit": require("@rnx-kit/eslint-plugin"),
},
rules: {
"@rnx-kit/no-const-enum": "error",
"@rnx-kit/no-export-all": "error",
},
},
];Recommended Configurations
@rnx-kit/eslint-plugin/recommendedextends:eslint:recommendedplugin:@typescript-eslint/recommendedplugin:react-hooks/recommendedplugin:react/recommended- It also includes and enables the following rules:
@rnx-kit/eslint-plugin/strictextends@rnx-kit/eslint-plugin/recommendedwith rules that enables better tree shaking:
Supported Rules
- ✓: Enabled with
@rnx-kit/eslint-plugin/recommended - 🔧: Fixable with
--fix
| ✓ | 🔧 | Rule | Description |
|---|---|---|---|
| ✓ | @rnx-kit/no-const-enum | disallow const enum (why is it bad?) | |
| ✓ | 🔧 | @rnx-kit/no-export-all | disallow export * (why is it bad?) |
10 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago