Skip to content

Commit 0ab3768

Browse files
committed
Install eslint to enforce a style
1 parent 3f2a4b5 commit 0ab3768

File tree

3 files changed

+680
-365
lines changed

3 files changed

+680
-365
lines changed

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"react": "^16.8.6",
1212
"react-dom": "^16.8.6",
1313
"react-hot-loader": "^4.9.0",
14+
"react-router-dom": "^5.0.1",
15+
"redux": "^4.0.1",
1416
"socket.io-client": "^2.2.0",
1517
"ws-wrapper": "^2.0.0",
1618
"xterm": "^3.5.1"
@@ -25,10 +27,18 @@
2527
"@types/react": "^16.8.19",
2628
"@types/react-dom": "^16.8.4",
2729
"@types/webpack-env": "^1.13.6",
30+
"@typescript-eslint/eslint-plugin": "^1.10.1",
31+
"@typescript-eslint/parser": "^1.10.1",
2832
"babel-loader": "^8.0.5",
2933
"clean-webpack-plugin": "^0.1.19",
3034
"css-loader": "^2.1.0",
3135
"cssnano": "^4.0.3",
36+
"eslint": "^5.16.0",
37+
"eslint-config-standard": "^12.0.0",
38+
"eslint-plugin-import": "^2.17.3",
39+
"eslint-plugin-node": "^9.1.0",
40+
"eslint-plugin-promise": "^4.1.1",
41+
"eslint-plugin-standard": "^4.0.0",
3242
"fork-ts-checker-webpack-plugin": "^0.5.2",
3343
"glob-all": "^3.1.0",
3444
"html-webpack-plugin": "^3.2.0",
@@ -50,8 +60,7 @@
5060
"webpack-assets-manifest": "^3.1.1",
5161
"webpack-cli": "^3.0.2",
5262
"webpack-dev-server": "^3.1.14",
53-
"webpack-manifest-plugin": "^2.0.3",
54-
"webpack-stream": "^4.0.3"
63+
"webpack-manifest-plugin": "^2.0.3"
5564
},
5665
"scripts": {
5766
"watch": "NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",

resources/scripts/.eslintrc.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
parser: "@typescript-eslint/parser"
2+
parserOptions:
3+
ecmaVersion: 6
4+
project: "./tsconfig.json"
5+
tsconfigRootDir: "./"
6+
env:
7+
browser: true
8+
es6: true
9+
plugins:
10+
- "@typescript-eslint"
11+
extends:
12+
- "standard"
13+
- "plugin:@typescript-eslint/recommended"
14+
rules:
15+
semi:
16+
- error
17+
- always
18+
comma-dangle:
19+
- error
20+
- always-multiline
21+
"@typescript-eslint/explicit-function-return-type": 0
22+
"@typescript-eslint/explicit-member-accessibility": 0
23+
"@typescript-eslint/no-unused-vars": 0
24+
"@typescript-eslint/no-explicit-any": 0
25+
"@typescript-eslint/no-non-null-assertion": 0
26+
overrides:
27+
- files:
28+
- "**/*.tsx"
29+
rules:
30+
operator-linebreak:
31+
- error
32+
- before
33+
- overrides:
34+
"&&": "after"
35+
"?": "ignore"
36+
":": "ignore"

0 commit comments

Comments
 (0)