diff --git a/.eslintrc.js b/.eslintrc.js index d51ea9b33..23c49bc0d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,18 +3,32 @@ module.exports = { es6: true, node: true, }, - extends: ["airbnb-base", "eslint-config-prettier", "plugin:@typescript-eslint/recommended"], + extends: ["airbnb-base", "eslint-config-prettier", "plugin:@typescript-eslint/all"], + overrides: [ + { + files: ["*.stubs.ts", "*.test.ts"], + rules: { + "@typescript-eslint/promise-function-async": 0, + }, + }, + ], parser: "@typescript-eslint/parser", parserOptions: { project: "tsconfig.json", }, plugins: ["@typescript-eslint"], rules: { + "@typescript-eslint/consistent-type-definitions": ["error", "type"], "@typescript-eslint/explicit-function-return-type": 0, + "@typescript-eslint/generic-type-naming": 0, "@typescript-eslint/indent": 0, "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-extra-parens": 0, + "@typescript-eslint/no-magic-numbers": 0, "@typescript-eslint/no-parameter-properties": 0, + "@typescript-eslint/no-type-alias": 0, "@typescript-eslint/no-use-before-define": 0, + "@typescript-eslint/prefer-for-of": 1, "@typescript-eslint/prefer-interface": 0, "default-case": 0, "guard-for-in": 0, diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index d1ab19785..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "env": { - "es6": true, - "node": true - }, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": "tsconfig.json", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint", "@typescript-eslint/tslint"], - "rules": { - "@typescript-eslint/array-type": "error", - "@typescript-eslint/interface-name-prefix": "error", - "@typescript-eslint/member-ordering": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-param-reassign": "off", - "@typescript-eslint/no-parameter-properties": "off", - "@typescript-eslint/no-use-before-declare": "off", - "@typescript-eslint/promise-function-async": "off", - "@typescript-eslint/unbound-method": "off", - "arrow-body-style": "off", - "default-case": "off", - "linebreak-style": "off", - "no-bitwise": "off", - "no-empty": "off", - "no-empty-functions": "off", - "no-magic-numbers": "off", - "prefer-template": "off", - "@typescript-eslint/tslint/config": [ - "error", - { - "rules": { - "no-implicit-dependencies": [true, "dev"], - "strict-boolean-expressions": [ - true, - "allow-boolean-or-undefined", - "allow-number" - ] - } - } - ] - } -}