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:

  1. Create a new issue on GitHub to discuss the new rule being added.
  2. 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.
  3. Sync the documentation by running: yarn run build
  4. The ASTs used by html-eslint are generated by es-html-parser. You can debug the ASTs here.
  5. 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:

  1. Create a new issue on GitHub to discuss the changes to the rule.
  2. Make changes to the rule in the following file: packages/eslint-plugin/lib/rules/<rule-name>.js
  3. Add test cases for the rule change in the following file: packages/eslint-plugin/tests/rules/<rule-name>.test.js
  4. Run the tests using the command: yarn test
  5. Once the changes are complete, create a pull request to review them.