File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,12 @@ Config for projects using **Jest** for testing.
1414
1515 ``` jsonc
1616 {
17- " extends" : [" @code-pushup/eslint-config/jest" ]
17+ " extends" : [" @code-pushup/eslint-config/jest" ],
18+ // customize rules if needed:
19+ " rules" : {
20+ // e.g. to customize `test` or `it` usage (default is `it` in `describe` and `test` at top-level):
21+ " jest/consistent-test-it" : [" warn" , { " fn" : " test" , " withinDescribe" : " test" }]
22+ }
1823 }
1924 ```
2025
Original file line number Diff line number Diff line change @@ -14,7 +14,17 @@ Config for projects using **Vitest** for testing.
1414
1515 ``` jsonc
1616 {
17- " extends" : [" @code-pushup/eslint-config/vitest" ]
17+ " extends" : [" @code-pushup/eslint-config/vitest" ],
18+ // customize rules if needed:
19+ " rules" : {
20+ // e.g. to customize file naming convention (default pattern is ".*\\.spec\\.[tj]sx?$"):
21+ " vitest/consistent-test-filename" : [
22+ " warn" ,
23+ { " pattern" : " .*\\ .(unit|integration|e2e)\\ .test\\ .ts$" }
24+ ],
25+ // e.g. to customize `test` or `it` usage (default is `it` in `describe` and `test` at top-level):
26+ " vitest/consistent-test-it" : [" warn" , { " fn" : " test" , " withinDescribe" : " test" }]
27+ }
1828 }
1929 ```
2030
Original file line number Diff line number Diff line change @@ -147,6 +147,23 @@ const angularExtraEslintrc = `,
147147const configsExtraEslintrc = {
148148 angular : angularExtraEslintrc ,
149149 'angular-ngrx' : angularExtraEslintrc ,
150+ jest : `,
151+ // customize rules if needed:
152+ "rules": {
153+ // e.g. to customize \`test\` or \`it\` usage (default is \`it\` in \`describe\` and \`test\` at top-level):
154+ "jest/consistent-test-it": ["warn", { "fn": "test", "withinDescribe": "test" }]
155+ }` ,
156+ vitest : `,
157+ // customize rules if needed:
158+ "rules": {
159+ // e.g. to customize file naming convention (default pattern is ".*\\\\.spec\\\\.[tj]sx?$"):
160+ "vitest/consistent-test-filename": [
161+ "warn",
162+ { "pattern": ".*\\\\.(unit|integration|e2e)\\\\.test\\\\.ts$" }
163+ ],
164+ // e.g. to customize \`test\` or \`it\` usage (default is \`it\` in \`describe\` and \`test\` at top-level):
165+ "vitest/consistent-test-it": ["warn", { "fn": "test", "withinDescribe": "test" }]
166+ }` ,
150167} ;
151168
152169/**
You can’t perform that action at this time.
0 commit comments