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"
}
}