A template for study how to use ESLint selectors and write your own ESLint rules.
# if you don't have pnpm
$ npm i -g pnpm
$ pnpm install
$ pnpm lint
Edit packages/eslint-plugin/src/configs/selectors.js
and run pnpm lint
again.
- Add your rule to
packages/eslint-plugin/src/rules/your-own-rule.js
. - Import your rule into
packages/eslint-plugin/index.js
.rules: { 'your-own-rule': require('./src/rules/your-own-rule'), },
- Add it into
packages/my-app/.eslintrc.js
.rules: { '@study-eslint/your-own-rule': 'error', },
This project is licensed under the terms of the MIT license.