Developer Guide
Thank you for taking the time to contribute to our project. Your efforts are greatly appreciated and play a vital role in improving and growing our work!
Proposing a New Rule
To add a new rule, please follow these step:
- Create a new issue on GitHub
to discuss the new rule being added.
- Generate the scaffolding for the new rule with the
yarn run new-rule <rule-name>
command. This command will generate the documentation for the rule, the implementation code, and the test code. - Sync the documentation by running:
yarn run build
- The ASTs used by html-eslint are generated by es-html-parser
. You can debug the ASTs here
.
- Once the implementation of the rule is complete, create a pull request to review it.
Proposing a Rule Change
To modify an existing rule, please follow these steps:
- Create a new issue on GitHub
to discuss the changes to the rule.
- Make changes to the rule in the following file:
packages/eslint-plugin/lib/rules/<rule-name>.js
- Add test cases for the rule change in the following file:
packages/eslint-plugin/tests/rules/<rule-name>.test.js
- Run the tests using the command:
yarn test
- Once the changes are complete, create a pull request to review them.