File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ There are additional configs for specific language features:
5050| @trigen/eslint-config /tsm | Rules for TS modules. |
5151| @trigen/eslint-config /react | Rules for ReactJS code. |
5252| @trigen/eslint-config /jest | Rules for Jest tests. |
53+ | @trigen/eslint-config /jest-dom | Rules for Jest DOM tests. |
5354| @trigen/eslint-config /storybook | Rules for Storybook's stories. |
5455| @trigen/eslint-config /typescript | Rules for TypeScript code. |
5556| @trigen/eslint-config /typescript-requiring-type-checking | Rules for TypeScript code with type checking. |
Original file line number Diff line number Diff line change 3333 "postpublish" : " del ./package"
3434 },
3535 "peerDependencies" : {
36+ "@testing-library/dom" : " >=8.0.0" ,
3637 "eslint" : " >=7.0.0"
3738 },
3839 "dependencies" : {
Original file line number Diff line number Diff line change 1+ /**
2+ * Jest DOM override
3+ */
4+ const { makePatterns } = require ( './utils' )
5+
6+ const postfixes = [ 'spec' , 'mock' ]
7+ const extensions = [
8+ 'js' ,
9+ 'jsx' ,
10+ 'ts' ,
11+ 'tsx'
12+ ]
13+
14+ module . exports = {
15+ overrides : [
16+ {
17+ files : makePatterns ( postfixes , extensions ) ,
18+ plugins : [ 'jest-dom' ] ,
19+ extends : [ 'plugin:jest-dom/recommended' ]
20+ }
21+ ]
22+ }
Original file line number Diff line number Diff line change @@ -15,12 +15,8 @@ module.exports = {
1515 overrides : [
1616 {
1717 files : makePatterns ( postfixes , extensions ) ,
18- plugins : [
19- 'jest' ,
20- 'testing-library' ,
21- 'jest-dom'
22- ] ,
23- extends : [ 'plugin:testing-library/react' , 'plugin:jest-dom/recommended' ] ,
18+ plugins : [ 'jest' , 'testing-library' ] ,
19+ extends : [ 'plugin:testing-library/react' ] ,
2420 env : {
2521 'jest/globals' : true
2622 } ,
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ module.exports = {
9393 allowParens : true
9494 }
9595 ] ,
96- 'no-duplicate-imports' : 'error' ,
96+ 'no-duplicate-imports' : 'off' , // in favor of import/no-duplicates
9797 'no-useless-computed-key' : 'error' ,
9898 'no-useless-constructor' : 'error' ,
9999 'no-useless-rename' : 'error' ,
You can’t perform that action at this time.
0 commit comments