File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -19,31 +19,32 @@ $ yarn add -D @tanstack/eslint-plugin-query
1919
2020## Usage
2121
22- Add ` @tanstack/eslint-plugin-query ` to the plugins section of your ` .eslintrc ` configuration file :
22+ To enable all of the recommended rules for our plugin, add ` plugin: @tanstack/eslint-plugin-query/recommended ` in extends :
2323
2424``` json
2525{
26- "plugins " : [" @tanstack/query" ]
26+ "extends " : [" plugin: @tanstack/eslint-plugin- query/recommended " ]
2727}
2828```
2929
30- Then configure the rules you want to use under the rules section:
30+
31+ ### Alternative config
32+
33+ Alternatively, add ` @tanstack/eslint-plugin-query ` to the plugins section of your ` .eslintrc ` configuration file:
3134
3235``` json
3336{
34- "rules" : {
35- "@tanstack/query/exhaustive-deps" : " error" ,
36- "@tanstack/query/stable-query-client" : " error"
37- }
37+ "plugins" : [" @tanstack/query" ]
3838}
3939```
4040
41- ### Recommended config
42-
43- You can also enable all the recommended rules for our plugin. Add ` plugin:@tanstack/eslint-plugin-query/recommended ` in extends:
41+ Then configure the rules you want to use under the rules section:
4442
4543``` json
4644{
47- "extends" : [" plugin:@tanstack/eslint-plugin-query/recommended" ]
45+ "rules" : {
46+ "@tanstack/query/exhaustive-deps" : " error" ,
47+ "@tanstack/query/stable-query-client" : " error"
48+ }
4849}
4950```
You can’t perform that action at this time.
0 commit comments