@odg/eslint-config 2.0.4 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js DELETED
@@ -1,376 +0,0 @@
1
- module.exports = {
2
- env: {
3
- node: true,
4
- browser: true,
5
- },
6
- parser: "any-eslint-parser",
7
- plugins: [
8
- "file-progress",
9
- "regexp",
10
- "import",
11
- "sonar",
12
- "sonarjs",
13
- "security",
14
- "@odg",
15
- "@stylistic/plus",
16
- "@stylistic/js",
17
- ],
18
- extends: [
19
- "./rules/global/base.js",
20
- "./rules/global/errors.js",
21
- "./rules/global/possible-errors.js",
22
- "./rules/global/security.js",
23
- ],
24
- ignorePatterns: [
25
- "!.*",
26
-
27
- ".git/",
28
- "node_modules/",
29
- "bower_components/",
30
- "jspm_packages/",
31
- ".npm/",
32
- "vendor/",
33
-
34
- "lib-cov/",
35
- "coverage/",
36
- ".nyc_output/",
37
- ".cache/",
38
-
39
- "build/",
40
- "dist/",
41
- "tmp/",
42
-
43
- "**/*.min.*",
44
- "package-lock.json",
45
- "yarn.lock",
46
- ],
47
- settings: {
48
- "html/report-bad-indent": "error",
49
- "html/indent": "+4",
50
- "import/docstyle": [ "jsdoc", "tomdoc" ],
51
- "import/resolver": {
52
- "node": {
53
- "extensions": [ ".mjs", ".js", ".jsx", ".json", ".ts", ".tsx", ".d.ts" ],
54
- },
55
- },
56
- "import/external-module-folders": [ "@types" ],
57
- "import/extensions": [
58
- ".js",
59
- ".mjs",
60
- ".jsx",
61
- ],
62
- "import/core-modules": [],
63
- "import/ignore": [
64
- "node_modules",
65
- "\\.(coffee|scss|css|less|hbs|svg|json)$",
66
- ],
67
- },
68
- parserOptions: {
69
- sourceType: "module",
70
- ecmaVersion: 2022,
71
- },
72
- overrides: [
73
- {
74
- files: [ "*.js", "*.jsx", "*.mjs", "*.cjs", "*.ts", "*.tsx", "*.mts", "*.cts" ],
75
- parser: "espree",
76
- plugins: [
77
- "import",
78
- "jsdoc",
79
- "promise",
80
- "regexp",
81
- "filenames",
82
- "security",
83
- "unicorn",
84
- "html",
85
- "n",
86
- "array-func",
87
- "no-constructor-bind",
88
- "sonar",
89
- "regex",
90
- "sonarjs",
91
- "sort-class-members",
92
- "antfu",
93
- "better-max-params",
94
- ],
95
- extends: [
96
- "./rules/javascript/best-practices.js",
97
- "./rules/javascript/errors.js",
98
- "./rules/javascript/js-documentation.js",
99
- "./rules/javascript/performance.js",
100
- ],
101
- },
102
- {
103
- files: [ "*.ts", "*.tsx", "*.mts", "*.cts" ],
104
- plugins: [
105
- "@typescript-eslint",
106
- "import",
107
- "jsdoc",
108
- "promise",
109
- "regexp",
110
- "filenames",
111
- "sort-class-members",
112
- "@stylistic/ts",
113
- ],
114
- extends: [
115
- "./rules/typescript/best-practices.js",
116
- "./rules/typescript/errors.js",
117
- "./rules/typescript/security.js",
118
- "./rules/typescript/possible-errors.js",
119
- ],
120
- parser: "@typescript-eslint/parser",
121
- settings: {
122
- "import/extensions": [ ".mjs", ".js", ".jsx", ".json", ".ts", ".tsx", ".d.ts" ],
123
- "import/external-module-folders": [ "node_modules", "node_modules/@types" ],
124
- "import/parsers": {
125
- "@typescript-eslint/parser": [ ".ts", ".tsx" ],
126
- },
127
- "import/resolver": {
128
- "typescript": {
129
- "project": [ "tsconfig.json" ],
130
- },
131
- "node": {
132
- "extensions": [ ".mjs", ".js", ".jsx", ".json", ".ts", ".tsx", ".d.ts" ],
133
- },
134
- },
135
- },
136
- parserOptions: {
137
- ecmaFeatures: {
138
- jsx: true,
139
- },
140
- warnOnUnsupportedTypeScriptVersion: false,
141
- ecmaVersion: 2022,
142
- sourceType: "module",
143
- project: [ "tsconfig.json", "@odg/tsconfig/tsconfig.json" ], // Specify it only for TypeScript files
144
- },
145
- },
146
- {
147
- files: [ "*.tsx" ],
148
- rules: {
149
- "import/no-anonymous-default-export": [ "off" ],
150
- "@typescript-eslint/naming-convention": [
151
- "error",
152
- {
153
-
154
- selector: [
155
- "function",
156
- ],
157
- format: [
158
- "PascalCase",
159
- "camelCase",
160
- ],
161
-
162
- // We allow double underscore because of GraphQL type names and some React names.
163
- leadingUnderscore: "allowSingleOrDouble",
164
- trailingUnderscore: "allow",
165
-
166
- // Ignore `{'Retry-After': retryAfter}` type properties.
167
- filter: {
168
- regex: "[- ]",
169
- match: false,
170
- },
171
- },
172
- {
173
-
174
- selector: [
175
- "variable",
176
- "function",
177
- "parameterProperty",
178
- "classMethod",
179
- "objectLiteralMethod",
180
- "typeMethod",
181
- "accessor",
182
- ],
183
- format: [
184
- "strictCamelCase",
185
- "camelCase",
186
- ],
187
-
188
- // We allow double underscore because of GraphQL type names and some React names.
189
- leadingUnderscore: "allowSingleOrDouble",
190
- trailingUnderscore: "allow",
191
-
192
- // Ignore `{'Retry-After': retryAfter}` type properties.
193
- filter: {
194
- regex: "[- ]",
195
- match: false,
196
- },
197
- },
198
- {
199
- selector: "classProperty",
200
- format: [
201
- "strictCamelCase",
202
- "camelCase",
203
- "UPPER_CASE",
204
- ],
205
- },
206
- {
207
- selector: "typeLike",
208
- format: [
209
- "PascalCase",
210
- "camelCase",
211
- ],
212
- },
213
- {
214
- selector: "variable",
215
- types: [
216
- "boolean",
217
- ],
218
- format: [
219
- "StrictPascalCase",
220
- ],
221
- prefix: [
222
- "is",
223
- "has",
224
- "can",
225
- "should",
226
- "will",
227
- "did",
228
- "does",
229
- "are",
230
- "do",
231
- ],
232
- },
233
- {
234
-
235
- selector: "interface",
236
- format: [
237
- "PascalCase",
238
- ],
239
- },
240
- {
241
-
242
- // Type parameter name should either be `T` or a descriptive name.
243
- selector: "typeParameter",
244
- filter: /^T$|^[A-Z][A-Za-z]+$/.source,
245
- format: [
246
- "StrictPascalCase",
247
- ],
248
- },
249
-
250
- // Allow these in non-camel-case when quoted.
251
- {
252
- selector: [
253
- "classProperty",
254
- "objectLiteralProperty",
255
- ],
256
- format: null,
257
- modifiers: [
258
- "requiresQuotes",
259
- ],
260
- },
261
- ],
262
- },
263
- },
264
- {
265
- files: [ "*.config.ts", "*.config.mts" ],
266
- rules: {
267
- "import/no-anonymous-default-export": [ "off" ],
268
- "filenames/match-exported": [ "off" ],
269
- "import/no-extraneous-dependencies": [ "off" ],
270
- },
271
- },
272
- {
273
- files: [ "*.json", "*.json5", "*.jsonc", ".eslintrc", "*.code-*" ],
274
- plugins: [ "jsonc" ],
275
- extends: [ "./rules/json/base.js" ],
276
- },
277
- {
278
- files: [ "package.json" ],
279
- extends: [ "./rules/json/base.js" ],
280
- rules: {
281
- "jsonc/sort-keys": [ "off" ],
282
- },
283
- },
284
- {
285
- files: [ "**.php" ],
286
- plugins: [ "php-markup" ],
287
- globals: {
288
- "lintPHPCode": true,
289
- },
290
- settings: {
291
- "php/php-extensions": [ ".php" ],
292
- "php/markup-replacement": {
293
- "php": "0",
294
- "=": "0",
295
- },
296
- "php/keep-eol": true,
297
- "php/remove-whitespace": false,
298
- "php/remove-empty-line": false,
299
- "php/remove-php-lint": false,
300
- },
301
- },
302
- {
303
- files: [
304
- "**/test/**",
305
- "**/tests/**",
306
- "**/spec/**",
307
- "**/__tests__/**",
308
- "*.test.*",
309
- "*.spec.*",
310
- "*.e2e.*",
311
- "*.e2e-spec.*",
312
- ],
313
- extends: [ "./rules/typescript/tests.js" ],
314
- },
315
- {
316
- files: [
317
- ".env.example",
318
- ".env.*",
319
- "*.env",
320
- ".env.sample",
321
- "*.properties",
322
- "*.ini",
323
- "*.toml",
324
- ],
325
- plugins: [
326
- "toml",
327
- ],
328
- extends: [ "./rules/ini/base.js" ],
329
- parser: "toml-eslint-parser",
330
- },
331
- {
332
- files: [
333
- "*.yml",
334
- "*.yaml",
335
- ],
336
- plugins: [ "yml" ],
337
- extends: [ "./rules/yaml/base.js" ],
338
- parser: "yaml-eslint-parser",
339
- parserOptions: {
340
- defaultYAMLVersion: "1.2",
341
- },
342
- },
343
- {
344
- files: [
345
- ".github/**/*.yml",
346
- ".github/**/*.yaml",
347
- ],
348
- extends: [ "./rules/yaml/github.js" ],
349
- },
350
- {
351
- files: [
352
- ".gitignore",
353
- ".npmignore",
354
- "*ignore",
355
- "*.md",
356
- "*.bash",
357
- "*.sh",
358
- "*.ps1",
359
- "*.powershell",
360
- "*.java",
361
- "*.tf",
362
- "Jenkinsfile",
363
- "Dockerfile",
364
- ],
365
- parser: "any-eslint-parser",
366
- extends: [ "./rules/any/base.js" ],
367
- },
368
- {
369
- files: [ "./.*", "./*.*", ".github/**", ".vscode/**" ],
370
- extends: "plugin:json-schema-validator/recommended",
371
- },
372
- ],
373
- rules: {
374
- "file-progress/activate": 1,
375
- },
376
- };
package/rules/any/base.js DELETED
@@ -1,11 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "filenames/match-regex": [ "off" ],
4
- "max-len": [ "warn", {
5
- code: 120,
6
- ignoreUrls: true,
7
- ignoreStrings: true,
8
- ignoreTemplateLiterals: true,
9
- } ], // Caracteres máximo por linhas
10
- },
11
- };
@@ -1,148 +0,0 @@
1
- const indentSize = 4;
2
- const complexity = 15;
3
-
4
- module.exports = {
5
- rules: {
6
- "indent": [ "error", indentSize, {
7
- SwitchCase: 1,
8
- VariableDeclarator: 1,
9
- outerIIFEBody: 1,
10
- MemberExpression: 1,
11
- FunctionDeclaration: { parameters: 1, body: 1 },
12
- FunctionExpression: { parameters: 1, body: 1 },
13
- CallExpression: { arguments: 1 },
14
- ArrayExpression: 1,
15
- ObjectExpression: 1,
16
- ImportDeclaration: 1,
17
- flatTernaryExpressions: false,
18
- ignoreComments: false,
19
- } ], // 4 spaces
20
- "@stylistic/js/indent": [ "error", indentSize, {
21
- SwitchCase: 1,
22
- VariableDeclarator: 1,
23
- outerIIFEBody: 1,
24
- MemberExpression: 1,
25
- FunctionDeclaration: { parameters: 1, body: 1 },
26
- FunctionExpression: { parameters: 1, body: 1 },
27
- CallExpression: { arguments: 1 },
28
- ArrayExpression: 1,
29
- ObjectExpression: 1,
30
- ImportDeclaration: 1,
31
- flatTernaryExpressions: false,
32
- ignoreComments: false,
33
- } ], // Ajuda indent
34
- "quotes": [ "error", "double" ], // Aspas duplas
35
- "capitalized-comments": [ "error", "always", {
36
- "ignorePattern": "\\s*region.*|\\s*endregion.*",
37
- } ], // Comentários devem ser iniciados em letras maiúsculas
38
- "space-before-function-paren": [ "error", {
39
- anonymous: "never",
40
- named: "never",
41
- asyncArrow: "always",
42
- } ], // Não permite espaço antes dos parenteses
43
- "dot-location": [ "error", "property" ], // Object.property ponto junto com a property
44
- "no-extra-parens": [ "error" ], // Não permite parênteses extra
45
- "no-extra-semi": [ "error" ], // Não permite ;, duplicadas ou desnecessárias
46
- "linebreak-style": [ "error", "unix" ], // Força usar \n apenas em vez de \r\n
47
- "max-len": [ "warn", {
48
- code: 120,
49
- ignoreUrls: true,
50
- } ], // Caracteres máximo por linhas
51
- "eol-last": [ "error", "always" ], // Força finalizar com \n no final
52
- "array-bracket-spacing": [ "error", "always" ], // Força usar espaço entre chaves
53
- "unicode-bom": [ "error", "never" ], // Disabled "unicode-bom"
54
- "no-self-assign": [ "error" ], // Nao se atribua seu próprio valor a variável
55
- "array-bracket-newline": [ "error", "consistent" ], // Quebra linha Array
56
- "no-irregular-whitespace": [ "error" ], // Não permite espaços entre palavras
57
- "no-floating-decimal": [ "error" ], // Não permite decimais flutuantes sem zero a esquerda.
58
- "semi-spacing": [ "error", { before: false, after: true } ], // Não permite espaço antes do ;
59
- "no-undef": [ "error", { "typeof": true } ], // Não chame variáveis não definidas
60
- "regexp/negation": [ "error" ], // This rule enforces use of \D, \W, \S and \P on negation.
61
- "regexp/prefer-set-operation": [ "error" ],
62
- "regexp/no-useless-set-operand": [ "error" ],
63
- "regexp/simplify-set-operations": [ "error" ], // Força simplifica a regex
64
- "regexp/no-empty-string-literal": [ "error" ], // Não faça blocos vazios de literal
65
- "regexp/no-useless-string-literal": [ "error" ], // Literal não usada
66
- "regexp/confusing-quantifier": [ "error" ], // No Especifique quantidade em opcional
67
- "regexp/control-character-escape": [ "error" ], // Use \r ao invés de \u0009
68
- "regexp/no-dupe-characters-character-class": [ "error" ], // Rvita condições duplicada em []
69
- "regexp/no-invisible-character": [ "error" ], // Evita colocar tab espaço em regex
70
- "regexp/no-legacy-features": [ "error", {
71
- staticProperties: [
72
- "input",
73
- "$_",
74
- "lastMatch",
75
- "$&",
76
- "lastParen",
77
- "$+",
78
- "leftContext",
79
- "$`",
80
- "rightContext",
81
- "$'",
82
- "$1",
83
- "$2",
84
- "$3",
85
- "$4",
86
- "$5",
87
- "$6",
88
- "$7",
89
- "$8",
90
- "$9",
91
- ],
92
- prototypeMethods: [ "compile" ],
93
- } ],
94
- "regexp/no-non-standard-flag": [ "error" ], // Bloqueia flags não padronizada
95
- "regexp/no-obscure-range": [ "error" ], // Range regex /[A-\x43]/;
96
- "regexp/no-trivially-nested-quantifier": [ "error" ], // Bloqueia flags não padronizada
97
- "regexp/no-unused-capturing-group": [ "error" ], // Não crie grupos que não está sendo usado.
98
- "regexp/no-useless-character-class": [ "error" ], // Não crie blocos desnecessários
99
- "regexp/no-useless-flag": [ "error" ], // Não Use Flag desnecessários
100
- "regexp/no-useless-lazy": [ "error" ],
101
- "regexp/no-useless-quantifier": [ "error" ], // Não permite Quantifiers sem efeitos
102
- "regexp/no-useless-range": [ "error" ], // Não permite Range desnecessários
103
- "regexp/no-useless-two-nums-quantifier": [ "error" ], // Não permite Range Iguais
104
- "regexp/no-zero-quantifier": [ "error" ], // Não permite Quantidade {0}
105
- "regexp/optimal-lookaround-quantifier": [ "error" ],
106
- "regexp/optimal-quantifier-concatenation": [ "error" ],
107
- "regexp/prefer-quantifier": [ "error" ], // Use {4} ao invés de replicar
108
- "regexp/prefer-range": [ "error" ], // Prefira [0-9] ao invés [1234567890]
109
- "regexp/sort-alternatives": [ "error" ], // Coloque [a|b|c] ordem alfabética
110
- "regexp/hexadecimal-escape": [ "error" ], // \x0a ao invés \u000a
111
- "regexp/match-any": [ "error" ], // Não da match com qualquer coisa
112
- "regexp/no-useless-escape": [ "error" ], // Não coloca \ contra em local sem efeito
113
- "regexp/no-useless-non-capturing-group": [ "error" ], // Grupo não necessário
114
- "regexp/prefer-character-class": [ "error" ], // Prefira [] ao invés de |
115
- "regexp/prefer-d": [ "error" ], // Prefira \d
116
- "regexp/prefer-plus-quantifier": [ "error" ], // Prefira + ao invés de {1, }
117
- "regexp/prefer-question-quantifier": [ "error" ], // Prefira ? ao invés de {0,1}
118
- "regexp/prefer-star-quantifier": [ "error" ], // Prefira * ao invés de {0,}
119
- "regexp/prefer-unicode-codepoint-escapes": [ "error" ], // Use Unicode
120
- "regexp/prefer-w": [ "error" ], // Use \w
121
- "regexp/sort-character-class-elements": [ "error" ], // Coloque [] em ordem Alfabética
122
- "regexp/sort-flags": [ "error" ], // Flag em ordem alfabética
123
- "regexp/prefer-named-capture-group": [ "error" ], // Prefira group com nomes
124
- // "regexp/prefer-regexp-exec": [ "error" ], // Prefira exec em regex // ? Desabilitado falso positivo
125
- "unicorn/no-empty-file": [ "error" ], // Não crie arquivo vazio
126
- "no-magic-numbers": [
127
- "warn",
128
- { "ignore": [ 0, 1, -1 ], "enforceConst": true, "ignoreDefaultValues": true },
129
- ], // Não permite numero mágicos
130
- "semi-style": [ "error", "last" ], // Local do ponto e virgula
131
- "no-negated-condition": [ "error" ], // Não negue condições
132
- "sonar/regex-complexity": [ "error" ], // Regex Complexidade
133
- "sonarjs/no-identical-functions": [ "error" ], // Não faça funções iguais
134
- "sonarjs/no-inverted-boolean-check": [ "error" ], // Não faça funções iguais
135
- "sonarjs/no-nested-switch": [ "error" ], // Não faça switch dentro do outro
136
- "sonarjs/no-nested-template-literals": [ "error" ], // Não faça string Template dentro de outra
137
- "sonarjs/no-redundant-boolean": [ "error" ], // Não faça !false ou `boolReturnFunc() || false`
138
- "sonarjs/prefer-immediate-return": [ "error" ], // Prefira retornar imediatamente a variável
139
- "sonarjs/prefer-object-literal": [ "error" ], // Prefira declarar dentro do objeto inicial ao invés de injetar
140
- "sonarjs/prefer-single-boolean-return": [ "error" ], // Retorne a boolean em vez de fazer if e else
141
- "sonarjs/cognitive-complexity": [ "error", complexity ], // Complexidade do codigo
142
- "no-multiple-empty-lines": [
143
- "error",
144
- { "max": 1, "maxEOF": 0, "maxBOF": 0 },
145
- ], // Não permita varias linhas em branco
146
- "no-trailing-spaces": [ "error" ], // Não permite espaço apos ou antes do ponto
147
- },
148
- };
@@ -1,74 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- "no-extra-bind": [ "error" ], // Não use bind desnecessário
4
- "no-global-assign": [ "error" ], // Não atribua propriedade globais
5
- "require-yield": [ "error" ], // Coloque yield em generator functions
6
- "no-dupe-else-if": [ "error" ], // Não permite elseif duplicado
7
- "no-useless-backreference": [ "error" ], // Bloqueia regex com referencia inútil
8
- "no-unused-private-class-members": [ "error" ], // Métodos privados não sendo usados
9
- "no-constant-binary-expression": [ "error" ], // Desabilita expressões comparação q afeta o valor da variável
10
- "no-unneeded-ternary": [ "error" ], // Ternário Desnecessários
11
- "no-unsafe-negation": [ "error" ], // Não permite negações invalidas
12
- "sonar/duplicates-in-character-class": [ "error" ], // Regex possible errors
13
- "sonar/empty-string-repetition": [ "error" ], // Regex possible errors
14
- // "import/no-cycle": [ "error" ], // Não faça import circular
15
- "unicorn/no-unused-properties": [ "warn" ], // Informe caso um campo não esteja sendo usado.
16
- "unicorn/text-encoding-identifier-case": [ "error" ], // Encode de texto no formato correto
17
- "sonar/arguments-order": [ "error" ], // Evite possíveis erros com ordem argumento
18
- "sonar/array-callback-without-return": [ "error" ], // Função callback de array devem ter retorno
19
- "sonar/assertions-in-tests": [ "error" ], // Teste devem ter asserts
20
- "sonar/chai-determinate-assertion": [ "error" ], // Previne teste chai que pode dar mais de um caso de assert
21
- "sonar/disabled-timeout": [ "error" ], // Não permite desligar timeout de mocha
22
- "no-empty-static-block": [ "error" ], // Não faça static{ } vazio
23
- "no-fallthrough": [ "error" ], // Se misturar 2 cases no switch coloque comentário // falls through
24
- "no-useless-concat": [ "error" ], // Desabilita concatenação de strings desnecessárias ex: "a" + "b"
25
- "no-octal-escape": [ "error" ], // Não use 071
26
- "no-octal": [ "error" ], // Use \ em unicode e hexadecimal
27
- "no-case-declarations": [ "error" ], // Use chaves em caso de declaração em switch case
28
- "regex/invalid": [
29
- "error",
30
- [
31
- {
32
- "id": "EmptyImport",
33
- "message": "Empty import is not allowed",
34
- "regex": "import(.*{\\s*}.*)from.*\\n",
35
- "replacement": {
36
- "function":
37
- "return $[1].replace(/\\s/g, '') !== '{}' ? $[0].replace(/,?\\s{\\s*}\\s/, ' ') : ''",
38
- },
39
- }, // BLoqueia import vazios
40
- ],
41
- ],
42
- "sonar/generator-without-yield": [ "error" ], // Força ter yield em funções generator
43
- "sonar/existing-groups": [ "error" ], // Verifica se o grupo da regex existe
44
- "sonar/destructuring-assignment-syntax": [ "error" ], // Força desestruturação
45
- "sonar/function-inside-loop": [ "error" ], // Não faça função loop
46
- "sonar/index-of-compare-to-positive-number": [ "error" ], // Não faça index of > 0 use >= 0
47
- "sonar/no-commented-code": [ "error" ], // Não Comente código
48
- "sonar/no-duplicate-in-composite": [ "error" ], // Não Repeat tipos
49
- "for-direction": [ "error" ], // Não faça for contador infinito.
50
- "sonar/no-equals-in-for-termination": [ "error" ], // Loop Infinitos
51
- "sonar/no-in-misuse": [ "error" ], // Não use in em array
52
- "sonar/no-incomplete-assertions": [ "error" ], // Sem assert incompleto
53
- "sonar/no-incorrect-string-concat": [ "error" ], // Não concatene numero com string
54
- // "sonar/no-infinite-loop": [ "error" ], // Não faça loop infinito // Commented because exception
55
- "sonar/no-invariant-returns": [ "error" ], // Não faça loop infinito
56
- "sonar/no-misleading-array-reverse": [ "error" ], // Não salva array.revert variável
57
- "sonar/strings-comparison": [ "error" ], // Não faça comparação de string com < ou >
58
- "sonar/useless-string-operation": [ "error" ], // Não use função string sem salvar variável
59
- "sonarjs/no-all-duplicated-branches": [ "error" ], // Não faça condições duplicadas
60
- "sonarjs/no-element-overwrite": [ "error" ], // Não sobrescreva variável de forma desnecessária
61
- "sonarjs/no-empty-collection": [ "error" ], // Não interaja com array vazios
62
- "sonarjs/no-extra-arguments": [ "error" ], // Não passe argumentos extra
63
- "sonarjs/no-identical-expressions": [ "error" ], // Não faça condições iguais
64
- "sonarjs/no-ignored-return": [ "error" ], // Use retorno das funções
65
- "sonarjs/no-use-of-empty-return-value": [ "error" ], // Não atribua void em uma variável
66
- "sonarjs/no-collection-size-mischeck": [ "error" ], // Não atribua void em uma variável
67
- "sonarjs/no-duplicate-string": [ "error" ], // Não permite string duplicadas
68
- "sonarjs/no-duplicated-branches": [ "error" ], // Em vez de if else igual faça um ||
69
- "sonarjs/no-gratuitous-expressions": [ "error" ], // Não faça a mesma condição dentro de outra
70
- "sonarjs/no-unused-collection": [ "error" ], // Não faça array que não é usado
71
- "sonar/redundant-type-aliases": [ "error" ], // Não crie tipos redundantes
72
- "regexp/no-extra-lookaround-assertions": [ "error" ], // Look around invalido em regex
73
- },
74
- };