You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open an issue with your proposal. Make sure you elaborate on what problem it solves and include fail/pass examples. [(Example)](https://github.com/sindresorhus/eslint-plugin-unicorn/issues/166)
6
+
7
+
## I have an idea for a new rule and I also want to implement it
8
+
9
+
First open an issue with your proposal. When the rule is accepted, see the [docs on creating and submitting a new rule](../docs/new-rule.md).
10
+
11
+
## I want to implement a rule from an open issue
12
+
13
+
See the [docs on creating and submitting a new rule](../docs/new-rule.md).
-[Read the ESLint docs on creating a new rule.](https://eslint.org/docs/developer-guide/working-with-rules)
6
+
- Look at the commit for how previous rules were added as inspiration. For example, the [`no-async-fn-without-await` rule](https://github.com/avajs/eslint-plugin-ava/commit/a443d7a9c94165f42749938e6b491a7c10749b6c).
7
+
8
+
9
+
## Tip
10
+
11
+
Use the [`astexplorer` site](https://astexplorer.net) with the `espree` parser and `ESLint v4` transform to interactively create the initial rule implementation. It lets you inspect the full AST as you would get from ESLint and you can even see the result of your auto-fixer implementation.
12
+
13
+
14
+
## Steps
15
+
16
+
- Go to the `test` directory and duplicate the `no-todo-test.js` file and rename it to the name of your rule. Then write some tests before starting to implement the rule.
17
+
- Go to the `rules` directory and duplicate the `no-todo-test.js` file and rename it to the name of your rule. Then start implementing the new rule logic.
18
+
- Add the correct [`meta.type`](https://eslint.org/docs/developer-guide/working-with-rules#rule-basics) to the rule.
19
+
- Go to the `docs/rules` directory and duplicate the `no-todo-test.md` file and rename it to the name of your rule. Then write some documentation.
0 commit comments