Install eslint to enforce a style
This commit is contained in:
parent
3f2a4b5762
commit
0ab3768274
13
package.json
13
package.json
|
@ -11,6 +11,8 @@
|
||||||
"react": "^16.8.6",
|
"react": "^16.8.6",
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.8.6",
|
||||||
"react-hot-loader": "^4.9.0",
|
"react-hot-loader": "^4.9.0",
|
||||||
|
"react-router-dom": "^5.0.1",
|
||||||
|
"redux": "^4.0.1",
|
||||||
"socket.io-client": "^2.2.0",
|
"socket.io-client": "^2.2.0",
|
||||||
"ws-wrapper": "^2.0.0",
|
"ws-wrapper": "^2.0.0",
|
||||||
"xterm": "^3.5.1"
|
"xterm": "^3.5.1"
|
||||||
|
@ -25,10 +27,18 @@
|
||||||
"@types/react": "^16.8.19",
|
"@types/react": "^16.8.19",
|
||||||
"@types/react-dom": "^16.8.4",
|
"@types/react-dom": "^16.8.4",
|
||||||
"@types/webpack-env": "^1.13.6",
|
"@types/webpack-env": "^1.13.6",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^1.10.1",
|
||||||
|
"@typescript-eslint/parser": "^1.10.1",
|
||||||
"babel-loader": "^8.0.5",
|
"babel-loader": "^8.0.5",
|
||||||
"clean-webpack-plugin": "^0.1.19",
|
"clean-webpack-plugin": "^0.1.19",
|
||||||
"css-loader": "^2.1.0",
|
"css-loader": "^2.1.0",
|
||||||
"cssnano": "^4.0.3",
|
"cssnano": "^4.0.3",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
|
"eslint-config-standard": "^12.0.0",
|
||||||
|
"eslint-plugin-import": "^2.17.3",
|
||||||
|
"eslint-plugin-node": "^9.1.0",
|
||||||
|
"eslint-plugin-promise": "^4.1.1",
|
||||||
|
"eslint-plugin-standard": "^4.0.0",
|
||||||
"fork-ts-checker-webpack-plugin": "^0.5.2",
|
"fork-ts-checker-webpack-plugin": "^0.5.2",
|
||||||
"glob-all": "^3.1.0",
|
"glob-all": "^3.1.0",
|
||||||
"html-webpack-plugin": "^3.2.0",
|
"html-webpack-plugin": "^3.2.0",
|
||||||
|
@ -50,8 +60,7 @@
|
||||||
"webpack-assets-manifest": "^3.1.1",
|
"webpack-assets-manifest": "^3.1.1",
|
||||||
"webpack-cli": "^3.0.2",
|
"webpack-cli": "^3.0.2",
|
||||||
"webpack-dev-server": "^3.1.14",
|
"webpack-dev-server": "^3.1.14",
|
||||||
"webpack-manifest-plugin": "^2.0.3",
|
"webpack-manifest-plugin": "^2.0.3"
|
||||||
"webpack-stream": "^4.0.3"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch": "NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
|
"watch": "NODE_ENV=development ./node_modules/.bin/webpack --watch --progress",
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
parser: "@typescript-eslint/parser"
|
||||||
|
parserOptions:
|
||||||
|
ecmaVersion: 6
|
||||||
|
project: "./tsconfig.json"
|
||||||
|
tsconfigRootDir: "./"
|
||||||
|
env:
|
||||||
|
browser: true
|
||||||
|
es6: true
|
||||||
|
plugins:
|
||||||
|
- "@typescript-eslint"
|
||||||
|
extends:
|
||||||
|
- "standard"
|
||||||
|
- "plugin:@typescript-eslint/recommended"
|
||||||
|
rules:
|
||||||
|
semi:
|
||||||
|
- error
|
||||||
|
- always
|
||||||
|
comma-dangle:
|
||||||
|
- error
|
||||||
|
- always-multiline
|
||||||
|
"@typescript-eslint/explicit-function-return-type": 0
|
||||||
|
"@typescript-eslint/explicit-member-accessibility": 0
|
||||||
|
"@typescript-eslint/no-unused-vars": 0
|
||||||
|
"@typescript-eslint/no-explicit-any": 0
|
||||||
|
"@typescript-eslint/no-non-null-assertion": 0
|
||||||
|
overrides:
|
||||||
|
- files:
|
||||||
|
- "**/*.tsx"
|
||||||
|
rules:
|
||||||
|
operator-linebreak:
|
||||||
|
- error
|
||||||
|
- before
|
||||||
|
- overrides:
|
||||||
|
"&&": "after"
|
||||||
|
"?": "ignore"
|
||||||
|
":": "ignore"
|
Loading…
Reference in New Issue