|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "node": true, |
| 4 | + "es6": true, |
| 5 | + "mocha": true |
| 6 | + }, |
| 7 | + "parser": "@typescript-eslint/parser", |
| 8 | + "plugins": ["@typescript-eslint", "prettier"], |
| 9 | + "extends": [ |
| 10 | + "standard", |
| 11 | + "plugin:@typescript-eslint/recommended", |
| 12 | + "plugin:import/errors", |
| 13 | + "plugin:import/warnings", |
| 14 | + "plugin:import/typescript", |
| 15 | + "prettier" |
| 16 | + ], |
| 17 | + "rules": { |
| 18 | + // Overriding ESLint rules with Typescript-specific ones |
| 19 | + "@typescript-eslint/ban-ts-comment": [ |
| 20 | + "error", |
| 21 | + { |
| 22 | + "ts-ignore": "allow-with-description" |
| 23 | + } |
| 24 | + ], |
| 25 | + "@typescript-eslint/explicit-module-boundary-types": "error", |
| 26 | + "no-bitwise": "off", |
| 27 | + "no-dupe-class-members": "off", |
| 28 | + "@typescript-eslint/no-dupe-class-members": "error", |
| 29 | + "no-empty-function": "off", |
| 30 | + "@typescript-eslint/no-empty-function": ["error"], |
| 31 | + "@typescript-eslint/no-empty-interface": "off", |
| 32 | + "@typescript-eslint/no-explicit-any": "error", |
| 33 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 34 | + "no-unused-vars": "off", |
| 35 | + "@typescript-eslint/no-unused-vars": [ |
| 36 | + "error", |
| 37 | + { |
| 38 | + "args": "after-used", |
| 39 | + "argsIgnorePattern": "^_" |
| 40 | + } |
| 41 | + ], |
| 42 | + "no-use-before-define": "off", |
| 43 | + "@typescript-eslint/no-use-before-define": [ |
| 44 | + "error", |
| 45 | + { |
| 46 | + "functions": false |
| 47 | + } |
| 48 | + ], |
| 49 | + "no-useless-constructor": "off", |
| 50 | + "@typescript-eslint/no-useless-constructor": "error", |
| 51 | + "@typescript-eslint/no-var-requires": "off", |
| 52 | + // Other rules |
| 53 | + "class-methods-use-this": [ |
| 54 | + "error", |
| 55 | + { |
| 56 | + "exceptMethods": ["dispose"] |
| 57 | + } |
| 58 | + ], |
| 59 | + "func-names": "off", |
| 60 | + "import/extensions": "off", |
| 61 | + "import/namespace": "off", |
| 62 | + "import/no-extraneous-dependencies": "off", |
| 63 | + "import/no-unresolved": [ |
| 64 | + "error", |
| 65 | + { |
| 66 | + "ignore": ["monaco-editor", "vscode"] |
| 67 | + } |
| 68 | + ], |
| 69 | + "import/prefer-default-export": "off", |
| 70 | + "linebreak-style": "off", |
| 71 | + "no-await-in-loop": "off", |
| 72 | + "no-console": "off", |
| 73 | + "no-control-regex": "off", |
| 74 | + "no-extend-native": "off", |
| 75 | + "no-multi-str": "off", |
| 76 | + "no-param-reassign": "off", |
| 77 | + "no-prototype-builtins": "off", |
| 78 | + "no-restricted-syntax": [ |
| 79 | + "error", |
| 80 | + { |
| 81 | + "selector": "ForInStatement", |
| 82 | + "message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array." |
| 83 | + }, |
| 84 | + { |
| 85 | + "selector": "LabeledStatement", |
| 86 | + "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." |
| 87 | + }, |
| 88 | + { |
| 89 | + "selector": "WithStatement", |
| 90 | + "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." |
| 91 | + } |
| 92 | + ], |
| 93 | + "no-template-curly-in-string": "off", |
| 94 | + "no-underscore-dangle": "off", |
| 95 | + "no-useless-escape": "off", |
| 96 | + "no-void": [ |
| 97 | + "error", |
| 98 | + { |
| 99 | + "allowAsStatement": true |
| 100 | + } |
| 101 | + ], |
| 102 | + "operator-assignment": "off", |
| 103 | + "strict": "off", |
| 104 | + "prettier/prettier": ["error"] |
| 105 | + } |
| 106 | +} |
0 commit comments