File tree Expand file tree Collapse file tree 3 files changed +48
-121
lines changed
test/run-rules-on-codebase Expand file tree Collapse file tree 3 files changed +48
-121
lines changed Original file line number Diff line number Diff line change
1
+ /* Run all unicorn rules on codebase */
2
+ /*
3
+ ! If you're making a new rule, you can ignore this before review.
4
+ */
5
+
6
+ import eslintPluginUnicorn from './index.js' ;
7
+
8
+ const config = [
9
+ eslintPluginUnicorn . configs [ 'flat/all' ] ,
10
+ {
11
+ linterOptions : {
12
+ reportUnusedDisableDirectives : false ,
13
+ } ,
14
+ } ,
15
+ {
16
+ ignores : [
17
+ 'coverage' ,
18
+ 'test/integration/fixtures' ,
19
+ 'test/integration/fixtures-local' ,
20
+ 'rules/utils/lodash.js' ,
21
+ ] ,
22
+ } ,
23
+ {
24
+ rules : {
25
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1109#issuecomment-782689255
26
+ 'unicorn/consistent-destructuring' : 'off' ,
27
+ // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2341
28
+ 'unicorn/escape-case' : 'off' ,
29
+ 'unicorn/no-hex-escape' : 'off' ,
30
+ // Buggy
31
+ 'unicorn/custom-error-definition' : 'off' ,
32
+ 'unicorn/consistent-function-scoping' : 'off' ,
33
+ // Annoying
34
+ 'unicorn/no-keyword-prefix' : 'off' ,
35
+ } ,
36
+ } ,
37
+ {
38
+ files : [
39
+ '**/*.js' ,
40
+ ] ,
41
+ rules : {
42
+ 'unicorn/prefer-module' : 'off' ,
43
+ } ,
44
+ } ,
45
+ ] ;
46
+
47
+ export default config ;
Original file line number Diff line number Diff line change 29
29
"lint:js" : " xo" ,
30
30
"lint:markdown" : " markdownlint \" **/*.md\" " ,
31
31
"lint:package-json" : " npmPkgJsonLint ." ,
32
- "run-rules-on-codebase" : " node ./test/run-rules-on-codebase/lint .mjs" ,
32
+ "run-rules-on-codebase" : " eslint --config=./eslint.dogfooding.config .mjs" ,
33
33
"smoke" : " eslint-remote-tester --config ./test/smoke/eslint-remote-tester.config.mjs" ,
34
34
"test" : " npm-run-all --continue-on-error lint test:*" ,
35
35
"test:js" : " c8 ava"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments