|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "es6": true, |
| 5 | + "node": true, |
| 6 | + "jest": true |
| 7 | + }, |
| 8 | + "parser": "@typescript-eslint/parser", |
| 9 | + "parserOptions": { |
| 10 | + "project": "example-app/tsconfig.json", |
| 11 | + "sourceType": "module" |
| 12 | + }, |
| 13 | + "plugins": [ |
| 14 | + "@typescript-eslint", |
| 15 | + "prefer-arrow", |
| 16 | + "jsdoc", |
| 17 | + "jest", |
| 18 | + "import" |
| 19 | + ], |
| 20 | + "extends": [ |
| 21 | + "eslint:recommended", |
| 22 | + "plugin:@typescript-eslint/eslint-recommended", |
| 23 | + "plugin:@typescript-eslint/recommended", |
| 24 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 25 | + "plugin:jest/recommended" |
| 26 | + ], |
| 27 | + "settings": { |
| 28 | + "import/core-modules": [ |
| 29 | + "axios" |
| 30 | + ] |
| 31 | + }, |
| 32 | + "rules": { |
| 33 | + "lines-between-class-members": [ |
| 34 | + "error", |
| 35 | + "always", |
| 36 | + { "exceptAfterSingleLine": true } |
| 37 | + ], |
| 38 | + "strict": "error", |
| 39 | + "object-curly-spacing": ["error" ,"always"], |
| 40 | + "import/prefer-default-export": "off", |
| 41 | + "@typescript-eslint/no-unused-vars": "off", |
| 42 | + "import/order": [ |
| 43 | + "error", |
| 44 | + { |
| 45 | + "groups": [ |
| 46 | + "builtin", |
| 47 | + "external", |
| 48 | + "parent", |
| 49 | + "sibling", |
| 50 | + "index" |
| 51 | + ], |
| 52 | + "newlines-between": "always" |
| 53 | + } |
| 54 | + ], |
| 55 | + "class-methods-use-this": "off", |
| 56 | + "no-useless-constructor": "off", |
| 57 | + "no-empty-function": "off", |
| 58 | + "newline-before-return": "error", |
| 59 | + "max-len": [ |
| 60 | + "error", |
| 61 | + 140 |
| 62 | + ], |
| 63 | + "@typescript-eslint/no-unsafe-return": "off", |
| 64 | + "@typescript-eslint/no-unsafe-call": "off", |
| 65 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 66 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 67 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 68 | + "new-cap": "off", |
| 69 | + "@typescript-eslint/no-empty-function": "error", |
| 70 | + "@typescript-eslint/no-useless-constructor": "error", |
| 71 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 72 | + "@typescript-eslint/array-type": "off", |
| 73 | + "@typescript-eslint/ban-types": "off", |
| 74 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 75 | + "error", |
| 76 | + { |
| 77 | + "overrides": { |
| 78 | + "constructors": "off" |
| 79 | + } |
| 80 | + } |
| 81 | + ], |
| 82 | + "indent": [ |
| 83 | + "error", |
| 84 | + 2, |
| 85 | + { |
| 86 | + "FunctionDeclaration": { |
| 87 | + "parameters": "first" |
| 88 | + }, |
| 89 | + "SwitchCase": 1 |
| 90 | + } |
| 91 | + ], |
| 92 | + "@typescript-eslint/interface-name-prefix": "off", |
| 93 | + "@typescript-eslint/no-empty-interface": "off", |
| 94 | + "@typescript-eslint/no-explicit-any": "error", |
| 95 | + "@typescript-eslint/no-misused-new": "error", |
| 96 | + "@typescript-eslint/no-namespace": "error", |
| 97 | + "@typescript-eslint/no-parameter-properties": "off", |
| 98 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 99 | + "@typescript-eslint/no-use-before-declare": "off", |
| 100 | + "@typescript-eslint/no-var-requires": "error", |
| 101 | + "@typescript-eslint/prefer-for-of": "error", |
| 102 | + "@typescript-eslint/prefer-function-type": "off", |
| 103 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 104 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 105 | + "@typescript-eslint/unified-signatures": "off", |
| 106 | + "arrow-body-style": "error", |
| 107 | + "arrow-parens": [ |
| 108 | + "off", |
| 109 | + "as-needed" |
| 110 | + ], |
| 111 | + "complexity": "off", |
| 112 | + "constructor-super": "error", |
| 113 | + "curly": ["error", "all"], |
| 114 | + "dot-notation": "error", |
| 115 | + "eol-last": [ |
| 116 | + "error", |
| 117 | + "always" |
| 118 | + ], |
| 119 | + "guard-for-in": "error", |
| 120 | + "jest/expect-expect": [ |
| 121 | + "error", |
| 122 | + { |
| 123 | + "assertFunctionNames": ["expect", "request.*.expect", "request.**.expect", "request.*.expect*"] |
| 124 | + } |
| 125 | + ], |
| 126 | + "max-classes-per-file": "off", |
| 127 | + "new-parens": "error", |
| 128 | + "no-bitwise": "error", |
| 129 | + "no-caller": "error", |
| 130 | + "no-cond-assign": "error", |
| 131 | + "no-console": "error", |
| 132 | + "no-debugger": "error", |
| 133 | + "no-empty": "error", |
| 134 | + "no-empty-functions": "off", |
| 135 | + "no-fallthrough": "off", |
| 136 | + "no-invalid-this": "off", |
| 137 | + "no-multiple-empty-lines": [ |
| 138 | + "error", |
| 139 | + { |
| 140 | + "max": 1 |
| 141 | + } |
| 142 | + ], |
| 143 | + "no-new-wrappers": "error", |
| 144 | + "no-return-await": "error", |
| 145 | + "no-throw-literal": "error", |
| 146 | + "no-undef-init": "off", |
| 147 | + "no-unsafe-finally": "error", |
| 148 | + "no-unused-labels": "error", |
| 149 | + "no-var": "error", |
| 150 | + "object-shorthand": "error", |
| 151 | + "one-var": "off", |
| 152 | + "prefer-const": "error", |
| 153 | + "quote-props": [ |
| 154 | + "error", |
| 155 | + "consistent-as-needed" |
| 156 | + ], |
| 157 | + "radix": "error", |
| 158 | + "some-rule": "off", |
| 159 | + "space-before-function-paren": [ |
| 160 | + "error", |
| 161 | + { |
| 162 | + "anonymous": "never", |
| 163 | + "asyncArrow": "always", |
| 164 | + "named": "never" |
| 165 | + } |
| 166 | + ], |
| 167 | + "use-isnan": "error", |
| 168 | + "valid-typeof": "off", |
| 169 | + "quotes": [ |
| 170 | + "error", |
| 171 | + "single" |
| 172 | + ], |
| 173 | + "comma-dangle": [ |
| 174 | + "error", |
| 175 | + "always-multiline" |
| 176 | + ], |
| 177 | + "@typescript-eslint/prefer-readonly": "error", |
| 178 | + "prefer-arrow/prefer-arrow-functions": "error", |
| 179 | + "spaced-comment": [ |
| 180 | + "error", |
| 181 | + "always" |
| 182 | + ], |
| 183 | + "jsdoc/check-indentation": 1, |
| 184 | + "jsdoc/check-alignment": 1, |
| 185 | + "no-underscore-dangle": [ |
| 186 | + "error", |
| 187 | + { |
| 188 | + "allow": [ |
| 189 | + "_id" |
| 190 | + ] |
| 191 | + } |
| 192 | + ], |
| 193 | + "@typescript-eslint/await-thenable": "off", |
| 194 | + "@typescript-eslint/member-ordering": "error" |
| 195 | + }, |
| 196 | + "overrides": [ |
| 197 | + { |
| 198 | + "files": [ |
| 199 | + "**/**.spec.ts" |
| 200 | + ], |
| 201 | + "rules": { |
| 202 | + "@typescript-eslint/unbound-method": "off", |
| 203 | + "@typescript-eslint/explicit-function-return-type": "off" |
| 204 | + } |
| 205 | + } |
| 206 | + ] |
| 207 | +} |
0 commit comments