Fix Bug 2336: Manual Healing option in Ui
[osm/NG-UI.git] / .eslintrc.json
1 {
2     "root": true,
3     "ignorePatterns": [
4         "package.json"
5     ],
6     "overrides": [
7         {
8             "files": [
9                 "*.ts"
10             ],
11             "parser": "@typescript-eslint/parser",
12             "parserOptions": {
13                 "project": [
14                     "**/tsconfig.json"
15                 ],
16                 "createDefaultProgram": true
17             },
18             "env": {
19                 "browser": true,
20                 "es6": true
21             },
22             "extends": [
23                 "plugin:@angular-eslint/ng-cli-compat",
24                 "plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
25                 "plugin:@angular-eslint/template/process-inline-templates",
26                 "plugin:@typescript-eslint/recommended",
27                 "plugin:@typescript-eslint/recommended-requiring-type-checking",
28                 "plugin:@microsoft/sdl/required",
29                 "plugin:@microsoft/sdl/typescript",
30                 "plugin:jsx-a11y/recommended",
31                 "plugin:security/recommended",
32                 "eslint:recommended",
33                 "plugin:node/recommended-module"
34             ],
35             "plugins": [
36                 "eslint-plugin-jest",
37                 "eslint-plugin-no-null",
38                 "jsdoc",
39                 "@microsoft/sdl",
40                 "jsx-a11y",
41                 "security",
42                 "deprecation",
43                 "lodash",
44                 "prefer-arrow"
45             ],
46             "rules": {
47                 "@typescript-eslint/await-thenable": "error",
48                 "@typescript-eslint/consistent-type-definitions": "error",
49                 "@typescript-eslint/explicit-member-accessibility": [
50                     "off",
51                     {
52                         "accessibility": "explicit"
53                     }
54                 ],
55                 "@typescript-eslint/no-empty-function": "error",
56                 "@typescript-eslint/no-explicit-any": "warn",
57                 "@typescript-eslint/no-floating-promises": "warn",
58                 "@typescript-eslint/no-for-in-array": "error",
59                 "@typescript-eslint/no-inferrable-types": "off",
60                 "@typescript-eslint/no-parameter-properties": "error",
61                 "@typescript-eslint/no-require-imports": "error",
62                 "@typescript-eslint/no-unnecessary-qualifier": "error",
63                 "@typescript-eslint/no-var-requires": "error",
64                 "@typescript-eslint/promise-function-async": "error",
65                 "@typescript-eslint/restrict-plus-operands": "off",
66                 "@typescript-eslint/strict-boolean-expressions": "off",
67                 "@typescript-eslint/triple-slash-reference": "error",
68                 "@typescript-eslint/type-annotation-spacing": "off",
69                 "arrow-parens": [
70                     "error",
71                     "always"
72                 ],
73                 "brace-style": [
74                     "off",
75                     "off"
76                 ],
77                 "comma-dangle": "error",
78                 "complexity": "error",
79                 "default-case": "error",
80                 "id-blacklist": "error",
81                 "import/no-default-export": "error",
82                 "import/order": [
83                     "error",
84                     {
85                         "alphabetize": {
86                             "order": "asc",
87                             "caseInsensitive": true
88                         }
89                     }
90                 ],
91                 "jest/no-focused-tests": "error",
92                 "linebreak-style": "off",
93                 "max-classes-per-file": [
94                     "error",
95                     3
96                 ],
97                 "max-lines": [
98                     "error",
99                     {
100                         "max": 1000,
101                         "skipComments": true,
102                         "skipBlankLines": true
103                     }
104                 ],
105                 "no-constant-condition": "error",
106                 "no-control-regex": "error",
107                 "no-empty": "error",
108                 "no-extra-semi": "error",
109                 "no-invalid-regexp": "error",
110                 "no-invalid-this": "error",
111                 "no-multi-str": "error",
112                 "no-multiple-empty-lines": "error",
113                 "no-null/no-null": "off",
114                 "no-octal": "error",
115                 "no-octal-escape": "error",
116                 "no-redeclare": "error",
117                 "no-regex-spaces": "error",
118                 "no-sparse-arrays": "error",
119                 "no-void": "error",
120                 "space-before-function-paren": "off",
121                 "valid-typeof": "error",
122                 "require-jsdoc": [
123                     "error",
124                     {
125                         "require": {
126                             "FunctionDeclaration": true,
127                             "MethodDefinition": false,
128                             "ClassDeclaration": false,
129                             "ArrowFunctionExpression": false,
130                             "FunctionExpression": false
131                         }
132                     }
133                 ],
134                 "max-statements": [
135                     "error",
136                     100
137                 ],
138                 "max-len": [
139                     "error",
140                     500
141                 ],
142                 "@microsoft/sdl/no-cookies": "error",
143                 "@typescript-eslint/no-dynamic-delete": "error",
144                 "@microsoft/sdl/no-msapp-exec-unsafe": "error",
145                 "@microsoft/sdl/no-winjs-html-unsafe": "error",
146                 "constructor-super": "error",
147                 "padded-blocks": [
148                     "error",
149                     "never"
150                 ],
151                 "func-style": "error",
152                 "@microsoft/sdl/no-insecure-url": [
153                     "error",
154                     {
155                         "blocklist": [
156                             "^(http|ftp):\\/\\/",
157                             "^https:\\/\\/www\\.disallow-example\\.com"
158                         ],
159                         "exceptions": [
160                             "^http:\\/\\/schemas\\.microsoft\\.com\\/\\/?.*"
161                         ]
162                     }
163                 ],
164                 "@microsoft/sdl/no-insecure-random": "off",
165                 "@microsoft/sdl/no-inner-html": "error",
166                 "@microsoft/sdl/no-html-method": "error",
167                 "@typescript-eslint/no-implied-eval": "error",
168                 "no-undef-init": "error",
169                 "no-with": "error",
170                 "security/detect-non-literal-require": "error",
171                 "security/detect-possible-timing-attacks": "error",
172                 "@typescript-eslint/no-array-constructor": "error",
173                 "@typescript-eslint/method-signature-style": "error",
174                 "jsx-a11y/anchor-is-valid": [
175                     "off",
176                     {
177                         "components": [
178                             "Link"
179                         ],
180                         "specialLink": [
181                             "hrefLeft",
182                             "hrefRight"
183                         ],
184                         "aspects": [
185                             "noHref",
186                             "invalidHref",
187                             "preferButton"
188                         ]
189                     }
190                 ],
191                 "jsx-a11y/aria-unsupported-elements": "error",
192                 "jsx-a11y/no-static-element-interactions": "error",
193                 "jsx-a11y/alt-text": "error",
194                 "jsx-a11y/lang": "error",
195                 "jsx-a11y/aria-props": "error",
196                 "jsx-a11y/aria-proptypes": "error",
197                 "jsx-a11y/aria-role": "error",
198                 "jsx-a11y/role-has-required-aria-props": "error",
199                 "jsx-a11y/role-supports-aria-props": "error",
200                 "jsx-a11y/tabindex-no-positive": "error",
201                 "react/jsx-no-target-blank": "error",
202                 "@microsoft/sdl/react-iframe-missing-sandbox": "error",
203                 "react/no-danger": "error",
204                 "react/jsx-curly-spacing": "error",
205                 "react/no-unused-state": "error",
206                 "lodash/chaining": "error",
207                 "@typescript-eslint/ban-types": "off",
208                 "deprecation/deprecation": "warn",
209                 "@typescript-eslint/naming-convention": [
210                     "warn",
211                     {
212                         "selector": "variableLike",
213                         "format": null
214                     }
215                 ],
216                 "@typescript-eslint/member-ordering": [
217                     "error",
218                     {
219                         "default": [
220                             "field"
221                         ]
222                     }
223                 ],
224                 "@typescript-eslint/no-unsafe-member-access": "off",
225                 "@typescript-eslint/no-unused-vars": "off",
226                 "no-unused-vars": "off",
227                 "no-unsafe-finally": "error",
228                 "jsdoc/newline-after-description": [
229                     "warn",
230                     "never"
231                 ],
232                 "@typescript-eslint/unbound-method": "off",
233                 "no-underscore-dangle": "off",
234                 "no-magic-numbers": "off",
235                 "@typescript-eslint/no-magic-numbers": [
236                     "warn",
237                     {
238                         "ignore": [
239                             -1,
240                             0,
241                             1
242                         ],
243                         "ignoreArrayIndexes": true,
244                         "ignoreDefaultValues": true
245                     }
246                 ],
247                 "@typescript-eslint/no-unsafe-assignment": "off",
248                 "prefer-arrow/prefer-arrow-functions": [
249                     "warn",
250                     {
251                         "disallowPrototype": true,
252                         "singleReturnOnly": false,
253                         "classPropertiesAllowed": false
254                     }
255                 ],
256                 "@angular-eslint/use-lifecycle-interface": "off",
257                 "security/detect-non-literal-fs-filename": "error",
258                 "@typescript-eslint/no-unsafe-call": "off",
259                 "@typescript-eslint/no-unsafe-return": "off",
260                 "security/detect-unsafe-regex": "off",
261                 "security/detect-non-literal-regexp": "error",
262                 "no-console": "error",
263                 "sort-keys": "off",
264                 "node/no-deprecated-api": [
265                     "warn",
266                     {
267                         "ignoreModuleItems": [
268                             "util.isNullOrUndefined"
269                         ]
270                     }
271                 ],
272                 "node/no-missing-import": [
273                     "off"
274                 ],
275                 "@typescript-eslint/member-delimiter-style": "off",
276                 "node/no-unsupported-features/node-builtins": [
277                     "off"
278                 ],
279                 "security/detect-object-injection": "warn"
280             }
281         },
282         {
283             "files": [
284                 "*.html"
285             ],
286             "extends": [
287                 "plugin:@angular-eslint/template/recommended",
288                 "plugin:node/recommended-module"
289             ],
290             "rules": {}
291         }
292     ]
293 }