|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + 'env': { |
| 4 | + 'browser': true, |
| 5 | + 'es2021': true, |
| 6 | + }, |
| 7 | + "settings": { |
| 8 | + "import/parsers": { |
| 9 | + "@typescript-eslint/parser": [".ts"] |
| 10 | + }, |
| 11 | + "import/resolver": { |
| 12 | + "typescript": {}, |
| 13 | + "node": { |
| 14 | + "moduleDirectory": ["node_modules", "./"] |
| 15 | + } |
| 16 | + }, |
| 17 | + }, |
| 18 | + 'extends': [ |
| 19 | + 'plugin:@typescript-eslint/recommended', |
| 20 | + 'airbnb', |
| 21 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 22 | + "plugin:import/errors", |
| 23 | + "plugin:import/warnings", |
| 24 | + "plugin:import/typescript", |
| 25 | + ], |
| 26 | + 'parser': '@typescript-eslint/parser', |
| 27 | + 'parserOptions': { |
| 28 | + 'ecmaFeatures': { |
| 29 | + 'jsx': false |
| 30 | + }, |
| 31 | + 'ecmaVersion': 'latest', |
| 32 | + 'sourceType': 'module', |
| 33 | + 'tsconfigRootDir': __dirname, |
| 34 | + 'project': ['./tsconfig.json'] |
| 35 | + }, |
| 36 | + 'plugins': [ |
| 37 | + '@typescript-eslint', |
| 38 | + 'import', |
| 39 | + ], |
| 40 | + 'rules': { |
| 41 | + 'semi': 'off', |
| 42 | + '@typescript-eslint/semi': ['error'], |
| 43 | + 'linebreak-style': 'off', |
| 44 | + 'no-unused-vars': 'off', |
| 45 | + '@typescript-eslint/no-unused-vars': ['error'], |
| 46 | + 'import/extensions': [ |
| 47 | + 'error', |
| 48 | + { |
| 49 | + 'js': 'never', |
| 50 | + 'ts': 'never', |
| 51 | + 'json': 'always', |
| 52 | + } |
| 53 | + ], |
| 54 | + 'no-nested-ternary': 'off', |
| 55 | + "object-curly-newline": ["error", { |
| 56 | + "ImportDeclaration": "never", |
| 57 | + }], |
| 58 | + 'import/order': 'off', |
| 59 | + "import/no-unresolved": "error", |
| 60 | + "import/no-named-default": "off", |
| 61 | + "no-console": ["warn", { allow: ["warn", "error"] }], |
| 62 | + "@typescript-eslint/no-inferrable-types": "off", |
| 63 | + "@typescript-eslint/no-misused-promises": [ |
| 64 | + "error", |
| 65 | + { |
| 66 | + "checksVoidReturn": { |
| 67 | + "properties": false, |
| 68 | + "attributes": false |
| 69 | + } |
| 70 | + } |
| 71 | + ], |
| 72 | + "@typescript-eslint/no-floating-promises": [ |
| 73 | + "error", |
| 74 | + { ignoreIIFE: true } |
| 75 | + ], |
| 76 | + "max-len": ["error", { |
| 77 | + "code": 100, |
| 78 | + "ignoreComments": true, |
| 79 | + "ignoreStrings": true, |
| 80 | + "ignoreTemplateLiterals": true, |
| 81 | + }], |
| 82 | + "prefer-promise-reject-errors": 'off', |
| 83 | + 'comma-dangle': 'off', |
| 84 | + 'eol-last': 'off', |
| 85 | + "no-use-before-define": "off", |
| 86 | + "@typescript-eslint/no-use-before-define": ["error"], |
| 87 | + 'no-plusplus': 'off', |
| 88 | + "no-restricted-syntax": "off" |
| 89 | + }, |
| 90 | +}; |
0 commit comments