File tree 1 file changed +14
-2
lines changed 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ Thanks for being willing to contribute!
5
5
Working on your first Pull Request? You can learn how from this free series
6
6
[ How to Contribute to an Open Source Project on GitHub] ( https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github ) .
7
7
8
+ Tweaking ESLint rules is mostly about traversing through the AST. [ AST Explorer] ( https://astexplorer.net ) is a great tool that simplifies the process.
9
+
8
10
## Project setup
9
11
10
12
1 . Fork this repository
@@ -63,8 +65,7 @@ each rule has three files named with its identifier (e.g. `no-debug`):
63
65
64
66
Additionally, you need to do a couple of extra things:
65
67
66
- - Include your rule in the "Supported Rules" table within the [README.md](./README.md).
67
- Don't forget to include the proper badges if needed and to sort alphabetically the rules for readability.
68
+ - Run `npm run generate:rules-list` to include your rule in the "Supported Rules" table within the [README.md](./README.md)
68
69
69
70
### Custom rule creator
70
71
@@ -113,6 +114,17 @@ A couple of things you need to remember when editing already existing rules:
113
114
114
115
## Writing Tests
115
116
117
+ If you wish to run a single test while developing locally, add `only: true` to the test case:
118
+
119
+ ```javascript
120
+ valid: [
121
+ {
122
+ only: true,
123
+ code: `...`,
124
+ },
125
+ ];
126
+ ```
127
+
116
128
When writing tests for a new or existing rule, please make sure to follow these guidelines:
117
129
118
130
### Write real-ish scenarios
You can’t perform that action at this time.
0 commit comments