Skip to content

Commit 9da588b

Browse files
author
Anna Osipova
committed
Add same eslint config as in course module 5
1 parent a07e50e commit 9da588b

File tree

4 files changed

+54
-44
lines changed

4 files changed

+54
-44
lines changed

.eslintignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
webpack.config.js
1+
webpack.config.js
2+
node_modules/
3+
dist/

.eslintrc.js

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"jest/globals": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:react/recommended"
10+
],
11+
"parserOptions": {
12+
"ecmaFeatures": {
13+
"jsx": true
14+
},
15+
"ecmaVersion": 2018,
16+
"sourceType": "module"
17+
},
18+
"plugins": [
19+
"react", "jest"
20+
],
21+
"rules": {
22+
"indent": [
23+
"error",
24+
2
25+
],
26+
"linebreak-style": [
27+
"error",
28+
"unix"
29+
],
30+
"quotes": [
31+
"error",
32+
"single"
33+
],
34+
"semi": [
35+
"error",
36+
"never"
37+
],
38+
"eqeqeq": "error",
39+
"no-trailing-spaces": "error",
40+
"object-curly-spacing": [
41+
"error", "always"
42+
],
43+
"arrow-spacing": [
44+
"error", { "before": true, "after": true }
45+
],
46+
"no-console": 0,
47+
"react/prop-types": 0
48+
}
49+
}

.eslintrc.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"start": "webpack-dev-server --open --mode development",
88
"test": "jest",
9+
"eslint": "eslint './**/*.{js,jsx}'",
910
"build": "webpack --mode production"
1011
},
1112
"repository": {
@@ -28,6 +29,7 @@
2829
"babel-jest": "^25.5.1",
2930
"babel-loader": "^8.1.0",
3031
"eslint": "^6.8.0",
32+
"eslint-plugin-jest": "^23.11.0",
3133
"eslint-plugin-react": "^7.19.0",
3234
"html-loader": "^1.1.0",
3335
"html-webpack-plugin": "^4.3.0",

0 commit comments

Comments
 (0)