eslint-plugin-nf-jsx-conventions
v1.0.3
Published
Tested against ESLint 8.
Downloads
273
Readme
eslint-plugin-nf-jsx-conventions
Tested against ESLint 8.
What it does
Installation
To use this plugin, you’ll need to have eslint
and this plugin installed in your project.
npm install eslint-plugin-nf-jsx-conventions --save-dev
Usage
Add the plugin to your ESLint configuration:
To use the recommended error status, add the plugin’s recommended setup to your ESLint extends
:
// .eslintrc.js
module.exports = {
extends: ["plugin:nf-jsx-conventions/recommended"],
};
To use errors instead of warnings, you can tweak rules manually:
// .eslintrc.js
module.exports = {
plugins: ["nf-jsx-conventions"],
rules: {
"nf-jsx-conventions/no-direct-icon-imports": "error",
},
};
Testing the plugin
This plugin includes unit tests to verify its functionality. The tests use vitest, with eslint’s RuleTester for ESLint rule-specific testing.
npm install
npm run test