@vellone/techsak 1.1.12 → 1.2.0
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 +75 -187
- package/package.json +4 -8
package/eslint.config.mjs
CHANGED
|
@@ -1,195 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import tseslint from 'typescript-eslint'
|
|
3
|
-
import importPlugin from 'eslint-plugin-import'
|
|
4
|
-
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs'
|
|
5
|
-
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
6
|
-
import js from '@eslint/js'
|
|
1
|
+
import antfu from '@antfu/eslint-config'
|
|
7
2
|
|
|
8
|
-
export default
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
parserOptions: {
|
|
12
|
-
projectService: true,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
settings: {
|
|
16
|
-
"import/resolver": {
|
|
17
|
-
typescript: {}
|
|
18
|
-
},
|
|
19
|
-
},
|
|
3
|
+
export default antfu({
|
|
4
|
+
typescript: {
|
|
5
|
+
tsconfigPath: './tsconfig.json',
|
|
20
6
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
'array-callback-return': '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
|
-
}],
|
|
38
|
-
curly: 'error',
|
|
39
|
-
'default-case-last': 'error',
|
|
40
|
-
'default-case': 'off',
|
|
41
|
-
'dot-notation': 'error',
|
|
42
|
-
eqeqeq: ['error', 'smart'],
|
|
43
|
-
indent: ['error', 2],
|
|
44
|
-
'keyword-spacing': ['error', {
|
|
45
|
-
before: true,
|
|
46
|
-
after: true,
|
|
47
|
-
}],
|
|
48
|
-
'no-alert': 'error',
|
|
49
|
-
'no-console': 'error',
|
|
50
|
-
'no-else-return': 'error',
|
|
51
|
-
'no-eval': 'warn',
|
|
52
|
-
'no-extra-semi': 'error',
|
|
53
|
-
'no-lonely-if': 'error',
|
|
54
|
-
'no-multi-assign': 'error',
|
|
55
|
-
'no-multi-spaces': 'error',
|
|
56
|
-
'no-multi-str': 'error',
|
|
57
|
-
'no-multiple-empty-lines': ['error', {
|
|
58
|
-
max: 1,
|
|
59
|
-
maxBOF: 0,
|
|
60
|
-
maxEOF: 0,
|
|
61
|
-
}],
|
|
62
|
-
'no-param-reassign': 'error',
|
|
63
|
-
'no-return-assign': 'error',
|
|
64
|
-
'no-script-url': 'error',
|
|
65
|
-
'no-self-compare': 'error',
|
|
66
|
-
'no-sequences': 'error',
|
|
67
|
-
'no-template-curly-in-string': 'error',
|
|
68
|
-
'no-throw-literal': 'error',
|
|
69
|
-
'no-undef': 'off',
|
|
70
|
-
'no-unneeded-ternary': 'error',
|
|
71
|
-
'no-useless-call': 'error',
|
|
72
|
-
'no-useless-computed-key': 'error',
|
|
73
|
-
'no-useless-constructor': 'error',
|
|
74
|
-
'no-useless-return': 'off',
|
|
75
|
-
'no-var': 'error',
|
|
76
|
-
// Queria na verdade configurar que 'ou é tudo em uma linha ou é tudo em várias linhas', mas não consegui.
|
|
77
|
-
// Esse foi o mais próximo disso que consegui
|
|
78
|
-
'object-curly-newline': ['error', {
|
|
79
|
-
ObjectExpression: { multiline: true, minProperties: 5, consistent: true },
|
|
80
|
-
ObjectPattern: { multiline: true, minProperties: 5, consistent: true },
|
|
81
|
-
ImportDeclaration: { multiline: true, minProperties: 50, consistent: true },
|
|
82
|
-
ExportDeclaration: { multiline: true, minProperties: 5, consistent: true },
|
|
83
|
-
}],
|
|
84
|
-
'object-property-newline': ['error', {
|
|
85
|
-
allowAllPropertiesOnSameLine: true,
|
|
86
|
-
}],
|
|
87
|
-
'object-shorthand': 'error',
|
|
88
|
-
'operator-assignment': ['error', 'always'],
|
|
89
|
-
'prefer-arrow-callback': 'error',
|
|
90
|
-
'prefer-const': 'error',
|
|
91
|
-
'prefer-exponentiation-operator': 'error',
|
|
92
|
-
'prefer-object-has-own': 'error',
|
|
93
|
-
'prefer-object-spread': 'error',
|
|
94
|
-
'prefer-promise-reject-errors': 'error',
|
|
95
|
-
'prefer-template': 'error',
|
|
96
|
-
'quote-props': ['error', 'as-needed'],
|
|
97
|
-
quotes: ['error', 'single', {
|
|
98
|
-
avoidEscape: true,
|
|
99
|
-
}],
|
|
100
|
-
radix: 'error',
|
|
101
|
-
semi: ['error', 'never'],
|
|
102
|
-
'space-before-blocks': 'error',
|
|
103
|
-
yoda: 'error',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
rules: {
|
|
108
|
-
'import/no-anonymous-default-export': [0],
|
|
109
|
-
'no-duplicate-imports': 'off',
|
|
110
|
-
'import/no-duplicates': 'error',
|
|
111
|
-
'import/no-unused-modules': ['error', {
|
|
112
|
-
unusedExports: true,
|
|
113
|
-
ignoreExports: [
|
|
114
|
-
'./src/app',
|
|
115
|
-
],
|
|
116
|
-
}],
|
|
117
|
-
},
|
|
7
|
+
|
|
8
|
+
react: true,
|
|
9
|
+
jsx: true,
|
|
10
|
+
|
|
11
|
+
stylistic: {
|
|
12
|
+
indent: 2,
|
|
13
|
+
quotes: 'single',
|
|
14
|
+
semi: false,
|
|
15
|
+
jsx: true,
|
|
118
16
|
},
|
|
119
|
-
{
|
|
120
|
-
// TypeScript ESLint specific rules
|
|
121
|
-
// https://typescript-eslint.io/rules/
|
|
122
|
-
rules: {
|
|
123
|
-
'require-await': 'off',
|
|
124
|
-
'@typescript-eslint/require-await': 'error',
|
|
125
17
|
|
|
126
|
-
|
|
127
|
-
|
|
18
|
+
rules: {
|
|
19
|
+
'antfu/top-level-function': 'off',
|
|
128
20
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
'
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
21
|
+
'style/multiline-ternary': 'off',
|
|
22
|
+
'style/jsx-one-expression-per-line': 'off',
|
|
23
|
+
'style/comma-dangle': ['error', {
|
|
24
|
+
arrays: 'always-multiline',
|
|
25
|
+
objects: 'always-multiline',
|
|
26
|
+
imports: 'always-multiline',
|
|
27
|
+
exports: 'always-multiline',
|
|
28
|
+
dynamicImports: 'always-multiline',
|
|
29
|
+
enums: 'always-multiline',
|
|
30
|
+
generics: 'always-multiline',
|
|
31
|
+
importAttributes: 'always-multiline',
|
|
32
|
+
tuples: 'always-multiline',
|
|
33
|
+
functions: 'never',
|
|
34
|
+
}],
|
|
35
|
+
'style/jsx-quotes': ['error', 'prefer-single'],
|
|
36
|
+
'style/brace-style': ['error', '1tbs'],
|
|
37
|
+
|
|
38
|
+
'perfectionist/sort-imports': ['error', {
|
|
39
|
+
type: 'unsorted',
|
|
40
|
+
}],
|
|
41
|
+
'perfectionist/sort-named-imports': 'off',
|
|
42
|
+
|
|
43
|
+
'node/prefer-global/process': 'off',
|
|
44
|
+
|
|
45
|
+
'ts/consistent-type-definitions': ['error', 'type'],
|
|
46
|
+
'ts/strict-boolean-expressions': 'off',
|
|
47
|
+
'ts/array-type': ['error', {
|
|
48
|
+
default: 'array-simple',
|
|
49
|
+
}],
|
|
50
|
+
'ts/no-unused-vars': [
|
|
51
|
+
'error'
|
|
52
|
+
],
|
|
53
|
+
'ts/no-explicit-any': 'error',
|
|
54
|
+
'ts/no-floating-promises': 'error',
|
|
55
|
+
'ts/no-misused-promises': [
|
|
56
|
+
'error',
|
|
57
|
+
{
|
|
58
|
+
'checksVoidReturn': {
|
|
59
|
+
'attributes': false
|
|
158
60
|
}
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
'ts/no-inferrable-types': 'error',
|
|
64
|
+
'no-redeclare': 'off',
|
|
65
|
+
'ts/no-redeclare': 'off',
|
|
66
|
+
'ts/no-unnecessary-condition': 'error',
|
|
67
|
+
'import/no-deprecated': 'off',
|
|
68
|
+
'ts/no-deprecated': 'error',
|
|
69
|
+
'ts/await-thenable': 'error',
|
|
70
|
+
'ts/consistent-generic-constructors': 'error',
|
|
71
|
+
'ts/method-signature-style': ['error', 'property'],
|
|
72
|
+
'ts/no-empty-object-type': 'error',
|
|
73
|
+
'no-loop-func': 'off',
|
|
74
|
+
'ts/no-loop-func': 'error',
|
|
75
|
+
|
|
76
|
+
'eslint-comments/no-unused-disable': 'error',
|
|
77
|
+
'eslint-comments/no-use': ['error', {
|
|
78
|
+
allow: [
|
|
79
|
+
'eslint-disable-next-line',
|
|
159
80
|
],
|
|
160
|
-
|
|
161
|
-
'no-loop-func': 'off',
|
|
162
|
-
'@typescript-eslint/no-loop-func': 'error',
|
|
163
|
-
'no-redeclare': 'off',
|
|
164
|
-
'@typescript-eslint/no-redeclare': 'off',
|
|
165
|
-
'@typescript-eslint/no-require-imports': 'error',
|
|
166
|
-
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
167
|
-
'no-unused-expressions': 'off',
|
|
168
|
-
'@typescript-eslint/no-unused-expressions': 'error',
|
|
169
|
-
'no-use-before-define': 'off',
|
|
170
|
-
'@typescript-eslint/no-use-before-define': 'error',
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
rules: {
|
|
175
|
-
'@eslint-community/eslint-comments/no-unlimited-disable': 'error',
|
|
176
|
-
'@eslint-community/eslint-comments/no-unused-disable': 'error',
|
|
177
|
-
'@eslint-community/eslint-comments/no-use': ['error', {
|
|
178
|
-
allow: [
|
|
179
|
-
'eslint-disable-next-line',
|
|
180
|
-
],
|
|
181
|
-
}],
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
rules: {
|
|
186
|
-
'unicorn/filename-case': 'off',
|
|
187
|
-
'unicorn/prevent-abbreviations': 'off',
|
|
188
|
-
'unicorn/no-unused-properties': 'error',
|
|
189
|
-
'unicorn/no-array-reduce': 'off',
|
|
190
|
-
'unicorn/no-null': 'off',
|
|
191
|
-
'unicorn/consistent-function-scoping': 'off',
|
|
192
|
-
'unicorn/prevent-abbreviations': 'off',
|
|
193
|
-
},
|
|
81
|
+
}],
|
|
194
82
|
},
|
|
195
|
-
)
|
|
83
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vellone/techsak",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "matheusvellone's personal tech sak (swiss army knife)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"makefile",
|
|
@@ -13,12 +13,8 @@
|
|
|
13
13
|
"url": "https://github.com/matheusvellone/techsak"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"
|
|
17
|
-
"@
|
|
18
|
-
"
|
|
19
|
-
"eslint": "^9.19.0",
|
|
20
|
-
"eslint-plugin-import": "^2.31.0",
|
|
21
|
-
"eslint-plugin-unicorn": "^58.0.0",
|
|
22
|
-
"typescript-eslint": "^8.22.0"
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@antfu/eslint-config": "^4.17.0",
|
|
18
|
+
"eslint": "^9.31.0"
|
|
23
19
|
}
|
|
24
20
|
}
|