@vellone/techsak 1.1.5 → 1.1.7
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/eslint.config.mjs +45 -25
- package/package.json +1 -1
package/eslint.config.mjs
CHANGED
|
@@ -3,28 +3,38 @@ import tseslint from 'typescript-eslint'
|
|
|
3
3
|
import importPlugin from 'eslint-plugin-import'
|
|
4
4
|
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs'
|
|
5
5
|
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
6
|
+
import js from '@eslint/js'
|
|
6
7
|
|
|
7
8
|
export default tseslint.config(
|
|
8
|
-
eslint.configs.recommended,
|
|
9
|
-
tseslint.configs.recommendedTypeChecked,
|
|
10
9
|
{
|
|
11
10
|
languageOptions: {
|
|
12
11
|
parserOptions: {
|
|
13
12
|
projectService: true,
|
|
14
13
|
},
|
|
15
14
|
},
|
|
15
|
+
settings: {
|
|
16
|
+
"import/resolver": {
|
|
17
|
+
typescript: {}
|
|
18
|
+
},
|
|
19
|
+
},
|
|
16
20
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
js.configs.recommended,
|
|
22
|
+
eslint.configs.recommended,
|
|
23
|
+
tseslint.configs.recommendedTypeChecked,
|
|
24
|
+
importPlugin.flatConfigs.recommended,
|
|
25
|
+
importPlugin.flatConfigs.typescript,
|
|
22
26
|
comments.recommended,
|
|
23
|
-
eslintPluginUnicorn.configs
|
|
27
|
+
eslintPluginUnicorn.configs.recommended,
|
|
24
28
|
{
|
|
25
29
|
rules: {
|
|
26
30
|
'array-callback-return': 'error',
|
|
27
|
-
'comma-dangle': ['error',
|
|
31
|
+
'comma-dangle': ['error', {
|
|
32
|
+
'arrays': 'always-multiline',
|
|
33
|
+
'objects': 'always-multiline',
|
|
34
|
+
'imports': 'always-multiline',
|
|
35
|
+
'exports': 'always-multiline',
|
|
36
|
+
'functions': 'never'
|
|
37
|
+
}],
|
|
28
38
|
curly: 'error',
|
|
29
39
|
'default-case-last': 'error',
|
|
30
40
|
'default-case': 'off',
|
|
@@ -37,7 +47,6 @@ export default tseslint.config(
|
|
|
37
47
|
}],
|
|
38
48
|
'no-alert': 'error',
|
|
39
49
|
'no-console': 'error',
|
|
40
|
-
'no-duplicate-imports': 'error',
|
|
41
50
|
'no-else-return': 'error',
|
|
42
51
|
'no-eval': 'warn',
|
|
43
52
|
'no-extra-semi': 'error',
|
|
@@ -67,10 +76,10 @@ export default tseslint.config(
|
|
|
67
76
|
// Queria na verdade configurar que 'ou é tudo em uma linha ou é tudo em várias linhas', mas não consegui.
|
|
68
77
|
// Esse foi o mais próximo disso que consegui
|
|
69
78
|
'object-curly-newline': ['error', {
|
|
70
|
-
ObjectExpression:
|
|
71
|
-
ObjectPattern:
|
|
79
|
+
ObjectExpression: { multiline: true, minProperties: 5, consistent: true },
|
|
80
|
+
ObjectPattern: { multiline: true, minProperties: 5, consistent: true },
|
|
72
81
|
ImportDeclaration: { multiline: true, minProperties: 50, consistent: true },
|
|
73
|
-
ExportDeclaration: { multiline: true, minProperties: 5,
|
|
82
|
+
ExportDeclaration: { multiline: true, minProperties: 5, consistent: true },
|
|
74
83
|
}],
|
|
75
84
|
'object-property-newline': ['error', {
|
|
76
85
|
allowAllPropertiesOnSameLine: true,
|
|
@@ -94,18 +103,21 @@ export default tseslint.config(
|
|
|
94
103
|
yoda: 'error',
|
|
95
104
|
},
|
|
96
105
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
{
|
|
107
|
+
name: 'Errors',
|
|
108
|
+
rules: {
|
|
109
|
+
'import/no-deprecated': 'error',
|
|
110
|
+
'import/no-anonymous-default-export': [0],
|
|
111
|
+
'no-duplicate-imports': 'off',
|
|
112
|
+
'import/no-duplicates': 'error',
|
|
113
|
+
'import/no-unused-modules': ['error', {
|
|
114
|
+
unusedExports: true,
|
|
115
|
+
ignoreExports: [
|
|
116
|
+
'./src/app',
|
|
117
|
+
],
|
|
118
|
+
}],
|
|
119
|
+
},
|
|
120
|
+
},
|
|
109
121
|
{
|
|
110
122
|
// TypeScript ESLint specific rules
|
|
111
123
|
// https://typescript-eslint.io/rules/
|
|
@@ -136,6 +148,14 @@ export default tseslint.config(
|
|
|
136
148
|
'@typescript-eslint/no-empty-object-type': 'error',
|
|
137
149
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
138
150
|
'@typescript-eslint/no-floating-promises': 'error',
|
|
151
|
+
'@typescript-eslint/no-misused-promises': [
|
|
152
|
+
'error',
|
|
153
|
+
{
|
|
154
|
+
'checksVoidReturn': {
|
|
155
|
+
'attributes': false
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
139
159
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
140
160
|
'no-loop-func': 'off',
|
|
141
161
|
'@typescript-eslint/no-loop-func': 'error',
|