Add ESLint

This commit is contained in:
Aarni Halinen
2019-07-03 00:17:58 +03:00
parent 9397b4cbfa
commit 0f14531f15
3 changed files with 939 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"arrow-body-style": "off",
"arrow-parens": "off",
"camelcase": "off",
"comma-dangle": [
"error",
{
"arrays": "ignore",
"objects": "ignore",
"imports": "ignore",
"exports": "ignore",
"functions": "ignore"
}
],
"consistent-return": "warn",
"dot-notation": "warn",
"global-require": "warn",
"max-len": [
"off",
160
],
"no-console": "off",
"no-extra-boolean-cast": "warn",
"no-param-reassign": "warn",
"no-shadow": "warn",
"no-unused-vars": "off",
"no-useless-constructor": "warn",
"quotes": [
"error",
"double"
],
"import/no-unresolved": "off",
"import/first": "off",
"import/order": "off",
"import/no-extraneous-dependencies": "off",
"import/newline-after-import": "off",
"import/prefer-default-export": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"object-curly-newline": "off",
"quote-props": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/alt-text": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/iframe-has-title": "off",
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/label-has-for": "off",
"react/destructuring-assignment": "off",
"react/jsx-closing-bracket-location": "off",
"react/jsx-closing-tag-location": "off",
"react/jsx-curly-brace-presence": "off",
"react/jsx-first-prop-new-line": "off",
"react/jsx-filename-extension": "off",
"react/jsx-indent-props": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-wrap-multilines": "off",
"react/no-access-state-in-setstate": "warn",
"react/prop-types": "off",
"react/prefer-stateless-function": "off",
"react/self-closing-comp": "off"
}
}
+837
View File
File diff suppressed because it is too large Load Diff
+13
View File
@@ -26,6 +26,8 @@
"lint": "npm run lint:ts && npm run lint:sass",
"lint:ts": "tslint -p tsconfig.json --format stylish --exclude node_modules",
"lint:ts:fix": "tslint -p tsconfig.json --format stylish --exclude node_modules --fix",
"lint:es": "eslint './src/**/*.ts*'",
"lint:es:fix": "eslint --fix './src/**/*.ts*'",
"lint:sass": "stylelint ./src/**/**/*.scss ./src/**/*.scss ./src/*.scss",
"start": "npm run start-dev",
"start-dev": "webpack-dev-server --config=configs/webpack/dev.js",
@@ -47,6 +49,8 @@
"@types/node": "^10.14.7",
"@types/react": "^16.8.18",
"@types/react-dom": "^16.8.4",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"awesome-typescript-loader": "^5.2.1",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
@@ -59,6 +63,15 @@
"dotenv": "^6.2.0",
"dotenv-webpack": "^1.7.0",
"express": "^4.17.0",
"eslint": "^6.0.1",
"eslint-config-airbnb": "^17.1.1",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-standard": "^4.0.0",
"favicons-webpack-plugin": "0.0.9",
"file-loader": "^1.1.11",
"fs-extra": "^6.0.1",