README.md
is a generated file. Do not edit it directly. Edit the files inside .README
instead.
When making a commit, the following Pre-Commit hooks run:
- test and documentation checks
- lint
Run them with yarn test
.
Run with yarn lint
.
- Create a file in
tests/rules/assertions
named thecamelCase
version of your rule name with the following template:
export default { invalid: [], valid: [] }
- Add your test file to
tests/rules/index.js
- Create a file in
src/rules
named thecamelCase
version of your rule name - Add your rule file to
src/index.js
- Create new file in
./.README/rules/[rule-name].md
.
- Use ./.README/rules/require-valid-file-annotation.md as a template.
- Ensure that rule documentation document includes
<!-- assertions spaceAfterTypeColon -->
declaration.
- Update ./.README/README.md to include the new rule.
- Run
yarn create-readme
to generate the newREADME.md
(you must be onmaster
branch for this command to work)
Note: Sections "The following patterns are considered problems:" and "The following patterns are not considered problems:" are generated automatically using the test cases.