Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 8fe83ff

Browse files
committed
add eslint pretest
1 parent b7ba6e6 commit 8fe83ff

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

.eslintrc

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"version": "detect"
1010
}
1111
},
12-
"plugins": ["react"],
12+
"plugins": ["jest"],
1313
"parser": "babel-eslint",
1414
"parserOptions": {
1515
"ecmaVersion": 6,
@@ -213,24 +213,6 @@
213213
"require-yield": "error",
214214
"rest-spread-spacing": "error",
215215
"template-curly-spacing": "error",
216-
"yield-star-spacing": ["error", "before"],
217-
218-
// React
219-
"react/jsx-key": "error",
220-
"react/jsx-no-bind": ["error", {
221-
"ignoreRefs": true,
222-
"allowArrowFunctions": true,
223-
"allowBind": false
224-
}],
225-
"react/jsx-no-duplicate-props": "error",
226-
"react/jsx-pascal-case": "error",
227-
"react/jsx-uses-react": "error",
228-
"react/jsx-uses-vars": "error",
229-
"react/no-danger": "error",
230-
"react/no-deprecated": "error",
231-
"react/no-is-mounted": "error",
232-
"react/no-unknown-property": "error",
233-
"react/react-in-jsx-scope": "error",
234-
"react/require-render-return": "error"
216+
"yield-star-spacing": ["error", "before"]
235217
}
236218
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "./lib/index.js",
66
"scripts": {
77
"lint": "eslint lib/** && eslint test/util/**",
8+
"pretest": "eslint lib/ test/",
89
"test": "jest --coverage"
910
},
1011
"jest": {
@@ -39,7 +40,7 @@
3940
"@testing-library/react-hooks": "^3.7.0",
4041
"babel-eslint": "^10.0.1",
4142
"eslint": "^5.15.1",
42-
"eslint-plugin-react": "^7.12.4",
43+
"eslint-plugin-jest": "^24.1.3",
4344
"eslint-plugin-react-hooks": "^1.4.0",
4445
"jest": "^24.3.1",
4546
"react": "^16.8.4",

0 commit comments

Comments
 (0)