@odg/eslint-config 2.0.0 → 2.0.2
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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odg/eslint-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Linter for JavaScript And Typescript project",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Dragons Gamers <https://www.linkedin.com/in/victor-alves-odgodinho>",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"eslint-plugin-sort-class-members": "^1.20.0",
|
|
55
55
|
"eslint-plugin-toml": "^0.11.1",
|
|
56
56
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
57
|
-
"eslint-plugin-unused-imports": "^4.0.1",
|
|
58
57
|
"eslint-plugin-yml": "^1.14.0",
|
|
59
58
|
"toml-eslint-parser": "^0.10.0"
|
|
60
59
|
},
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
const alwaysMultiline = "always-multiline";
|
|
2
|
-
const isInEditor = (process.env.VSCODE_PID || process.env.JETBRAINS_IDE) && !process.env.CI;
|
|
3
|
-
const offInEditor = isInEditor ? "off" : "error";
|
|
4
2
|
|
|
5
3
|
module.exports = {
|
|
6
4
|
rules: {
|
|
7
5
|
"semi": [ "error", "always" ], // Força usar ponto-virgula ;
|
|
8
6
|
"lines-between-class-members": [ "error", "always" ], // Força linha em branco entre props classe e funções
|
|
9
|
-
"unused-imports/no-unused-imports": offInEditor,
|
|
10
|
-
"unused-imports/no-unused-vars": [
|
|
11
|
-
"warn",
|
|
12
|
-
{
|
|
13
|
-
vars: "all", varsIgnorePattern: "^_", args: "after-used", argsIgnorePattern: "^_",
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
7
|
"no-unused-vars": [ "error", {
|
|
17
8
|
"vars": "all",
|
|
18
9
|
"args": "after-used",
|
|
@@ -40,7 +31,7 @@ module.exports = {
|
|
|
40
31
|
"no-throw-literal": [ "error" ], // Não permite throw "string" ou diferente de classe
|
|
41
32
|
"no-empty-function": [ "error" ], // Não permite funções vazias
|
|
42
33
|
"no-duplicate-imports": [ "error" ], // Bloqueia import duplicado
|
|
43
|
-
"import/no-duplicates": [ "error" ], // Bloqueia import duplicado
|
|
34
|
+
"import/no-duplicates": [ "error", { "prefer-inline": true } ], // Bloqueia import duplicado
|
|
44
35
|
"prefer-const": [ "error" ], // Preferir constantes
|
|
45
36
|
"generator-star-spacing": [ "error", { before: true, after: false } ], // Espaço Funções Yield;
|
|
46
37
|
"no-unsafe-optional-chaining": [
|
|
@@ -119,7 +119,6 @@ module.exports = {
|
|
|
119
119
|
"@typescript-eslint/no-explicit-any": [ "error" ], // Não permite usar any
|
|
120
120
|
"no-empty-function": [ "off" ], // Não permite funções vazias
|
|
121
121
|
"@typescript-eslint/no-empty-function": [ "error" ], // Não permite funções vazias
|
|
122
|
-
"no-duplicate-imports": [ "off" ], // Bloqueia import duplicado
|
|
123
122
|
"@typescript-eslint/no-unnecessary-type-constraint": [
|
|
124
123
|
"error",
|
|
125
124
|
], // Não permite restrições de tipo desnecessárias <T extends any>
|