linting, editorconfig
This commit is contained in:
parent
ee66b16be2
commit
2f4ab521b5
9 changed files with 2267 additions and 146 deletions
55
.eslintrc.json
Normal file
55
.eslintrc.json
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"env": {
|
||||
"es6": true
|
||||
},
|
||||
"extends": ["airbnb-base", "prettier"],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"allowImportExportEverywhere": true
|
||||
},
|
||||
"plugins": [
|
||||
"prettier",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"class-methods-use-this": [
|
||||
"error",
|
||||
{"exceptMethods": ["requestDidStart", "willSendRequest", "willSendResponse", "errorFromResponse"]}
|
||||
],
|
||||
"camelcase": 0,
|
||||
"no-undef": 0,
|
||||
"no-new": 0,
|
||||
"no-shadow": 0,
|
||||
"@typescript-eslint/no-shadow": ["error", { "allow": ["err"] }],
|
||||
"no-console": "off",
|
||||
"no-use-before-define": "warn",
|
||||
"no-constant-condition": "off",
|
||||
"import/no-unresolved": "off",
|
||||
"import/prefer-default-export": "warn",
|
||||
"import/extensions": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"@typescript-eslint/array-type": [2, { "default": "array" }],
|
||||
"@typescript-eslint/consistent-type-definitions": [2, "interface"],
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-for-in-array": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "error",
|
||||
"@typescript-eslint/no-use-before-define": "warn",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "warn",
|
||||
"no-underscore-dangle": "off",
|
||||
"prefer-destructuring": "off"
|
||||
},
|
||||
"settings": {
|
||||
"import/extensions": [".js", ".ts"],
|
||||
"import/parsers": {
|
||||
"@typescript-eslint/parser": [".ts", ".tsx"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue