@vellone/techsak 1.1.0-2 → 1.1.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 +180 -4
- package/package.json +10 -2
- package/.eslintrc.json +0 -84
package/eslint.config.mjs
CHANGED
|
@@ -1,6 +1,182 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import eslint from '@eslint/js'
|
|
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'
|
|
3
6
|
|
|
4
|
-
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
eslint.configs.recommended,
|
|
9
|
+
tseslint.configs.recommendedTypeChecked,
|
|
10
|
+
{
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parserOptions: {
|
|
13
|
+
projectService: true,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
// {
|
|
18
|
+
// files: ['**/*.{ts,tsx}'],
|
|
19
|
+
// extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
|
|
20
|
+
// // other configs...
|
|
21
|
+
// },
|
|
22
|
+
comments.recommended,
|
|
23
|
+
eslintPluginUnicorn.configs['flat/recommended'],
|
|
24
|
+
{
|
|
25
|
+
rules: {
|
|
26
|
+
'array-callback-return': 'error',
|
|
27
|
+
'comma-dangle': ['error', 'always-multiline'],
|
|
28
|
+
curly: 'error',
|
|
29
|
+
'default-case-last': 'error',
|
|
30
|
+
'default-case': 'off',
|
|
31
|
+
'dot-notation': 'error',
|
|
32
|
+
eqeqeq: ['error', 'smart'],
|
|
33
|
+
indent: ['error', 2],
|
|
34
|
+
'keyword-spacing': ['error', {
|
|
35
|
+
before: true,
|
|
36
|
+
after: true,
|
|
37
|
+
}],
|
|
38
|
+
'no-alert': 'error',
|
|
39
|
+
'no-console': 'error',
|
|
40
|
+
'no-duplicate-imports': 'error',
|
|
41
|
+
'no-else-return': 'error',
|
|
42
|
+
'no-eval': 'warn',
|
|
43
|
+
'no-extra-semi': 'error',
|
|
44
|
+
'no-lonely-if': 'error',
|
|
45
|
+
'no-multi-assign': 'error',
|
|
46
|
+
'no-multi-spaces': 'error',
|
|
47
|
+
'no-multi-str': 'error',
|
|
48
|
+
'no-multiple-empty-lines': ['error', {
|
|
49
|
+
max: 1,
|
|
50
|
+
maxBOF: 0,
|
|
51
|
+
maxEOF: 0,
|
|
52
|
+
}],
|
|
53
|
+
'no-param-reassign': 'error',
|
|
54
|
+
'no-return-assign': 'error',
|
|
55
|
+
'no-script-url': 'error',
|
|
56
|
+
'no-self-compare': 'error',
|
|
57
|
+
'no-sequences': 'error',
|
|
58
|
+
'no-template-curly-in-string': 'error',
|
|
59
|
+
'no-throw-literal': 'error',
|
|
60
|
+
'no-undef': 'off',
|
|
61
|
+
'no-unneeded-ternary': 'error',
|
|
62
|
+
'no-unused-expressions': 'error',
|
|
63
|
+
'no-useless-call': 'error',
|
|
64
|
+
'no-useless-computed-key': 'error',
|
|
65
|
+
'no-useless-constructor': 'error',
|
|
66
|
+
'no-useless-return': 'error',
|
|
67
|
+
'no-var': 'error',
|
|
68
|
+
'object-curly-newline': ['error', {
|
|
69
|
+
ObjectExpression: {
|
|
70
|
+
multiline: true,
|
|
71
|
+
minProperties: 5,
|
|
72
|
+
consistent: true,
|
|
73
|
+
},
|
|
74
|
+
ObjectPattern: {
|
|
75
|
+
multiline: true,
|
|
76
|
+
minProperties: 5,
|
|
77
|
+
consistent: true,
|
|
78
|
+
},
|
|
79
|
+
ImportDeclaration: {
|
|
80
|
+
multiline: true,
|
|
81
|
+
minProperties: 50,
|
|
82
|
+
consistent: true,
|
|
83
|
+
},
|
|
84
|
+
ExportDeclaration: {
|
|
85
|
+
multiline: true,
|
|
86
|
+
minProperties: 5,
|
|
87
|
+
consistent: true,
|
|
88
|
+
},
|
|
89
|
+
}],
|
|
90
|
+
'object-property-newline': ['error', {
|
|
91
|
+
allowAllPropertiesOnSameLine: true,
|
|
92
|
+
}],
|
|
93
|
+
'object-shorthand': 'error',
|
|
94
|
+
'operator-assignment': ['error', 'always'],
|
|
95
|
+
'prefer-arrow-callback': 'error',
|
|
96
|
+
'prefer-const': 'error',
|
|
97
|
+
'prefer-exponentiation-operator': 'error',
|
|
98
|
+
'prefer-object-has-own': 'error',
|
|
99
|
+
'prefer-object-spread': 'error',
|
|
100
|
+
'prefer-promise-reject-errors': 'error',
|
|
101
|
+
'prefer-template': 'error',
|
|
102
|
+
'quote-props': ['error', 'as-needed'],
|
|
103
|
+
quotes: ['error', 'single', {
|
|
104
|
+
avoidEscape: true,
|
|
105
|
+
}],
|
|
106
|
+
radix: 'error',
|
|
107
|
+
semi: ['error', 'never'],
|
|
108
|
+
'space-before-blocks': 'error',
|
|
109
|
+
yoda: 'error',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
// {
|
|
113
|
+
// rules: {
|
|
114
|
+
// 'import/no-deprecated': 'error',
|
|
115
|
+
// 'import/no-anonymous-default-export': [0],
|
|
116
|
+
// 'import/no-unused-modules': ['error', {
|
|
117
|
+
// unusedExports: true,
|
|
118
|
+
// ignoreExports: [
|
|
119
|
+
// './src/app',
|
|
120
|
+
// ],
|
|
121
|
+
// }],
|
|
122
|
+
// },
|
|
123
|
+
// },
|
|
124
|
+
{
|
|
125
|
+
// TypeScript ESLint specific rules
|
|
126
|
+
// https://typescript-eslint.io/rules/
|
|
127
|
+
rules: {
|
|
128
|
+
'require-await': 'off',
|
|
129
|
+
'@typescript-eslint/require-await': 'error',
|
|
5
130
|
|
|
6
|
-
|
|
131
|
+
'@typescript-eslint/await-thenable': 'error',
|
|
132
|
+
'@typescript-eslint/array-type': ['error', {
|
|
133
|
+
default: 'array-simple',
|
|
134
|
+
}],
|
|
135
|
+
'@typescript-eslint/no-unused-vars': [
|
|
136
|
+
'error',
|
|
137
|
+
{
|
|
138
|
+
args: 'all',
|
|
139
|
+
argsIgnorePattern: '^_',
|
|
140
|
+
caughtErrors: 'none',
|
|
141
|
+
caughtErrorsIgnorePattern: '^_',
|
|
142
|
+
destructuredArrayIgnorePattern: '^_',
|
|
143
|
+
ignoreRestSiblings: true,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
'@typescript-eslint/ban-ts-comment': 'error',
|
|
147
|
+
'@typescript-eslint/comma-dangle': 'off',
|
|
148
|
+
'@typescript-eslint/consistent-generic-constructors': 'error',
|
|
149
|
+
'@typescript-eslint/indent': 'off',
|
|
150
|
+
'@typescript-eslint/lines-between-class-members': 'off',
|
|
151
|
+
'@typescript-eslint/method-signature-style': ['error', 'property'],
|
|
152
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
153
|
+
'@typescript-eslint/no-duplicate-enum-values': 'error',
|
|
154
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
155
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
156
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
157
|
+
'@typescript-eslint/no-inferrable-types': 'error',
|
|
158
|
+
'@typescript-eslint/no-loop-func': 'off',
|
|
159
|
+
'@typescript-eslint/no-redeclare': 'off',
|
|
160
|
+
'@typescript-eslint/no-require-imports': 'error',
|
|
161
|
+
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
162
|
+
'@typescript-eslint/no-unused-expressions': 'off',
|
|
163
|
+
'@typescript-eslint/no-use-before-define': 'off',
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
rules: {
|
|
168
|
+
'@eslint-community/eslint-comments/no-unlimited-disable': 'error',
|
|
169
|
+
'@eslint-community/eslint-comments/no-unused-disable': 'error',
|
|
170
|
+
'@eslint-community/eslint-comments/no-use': ['error', {
|
|
171
|
+
allow: [
|
|
172
|
+
'eslint-disable-next-line',
|
|
173
|
+
],
|
|
174
|
+
}],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
rules: {
|
|
179
|
+
'unicorn/no-unused-properties': 'error',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
)
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vellone/techsak",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "matheusvellone's personal tech sak (swiss army knife)",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "matheusvellone",
|
|
7
|
-
"license": "MIT"
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
10
|
+
"@eslint/js": "^9.19.0",
|
|
11
|
+
"eslint": "^9.19.0",
|
|
12
|
+
"eslint-plugin-import": "^2.31.0",
|
|
13
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
14
|
+
"typescript-eslint": "^8.22.0"
|
|
15
|
+
}
|
|
8
16
|
}
|
package/.eslintrc.json
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": [
|
|
3
|
-
"next/core-web-vitals",
|
|
4
|
-
"plugin:@typescript-eslint/strict"
|
|
5
|
-
],
|
|
6
|
-
"plugins": [
|
|
7
|
-
"@typescript-eslint",
|
|
8
|
-
"eslint-comments",
|
|
9
|
-
"unicorn"
|
|
10
|
-
],
|
|
11
|
-
"parser": "@typescript-eslint/parser",
|
|
12
|
-
"parserOptions": {
|
|
13
|
-
"project": ["tsconfig.json"]
|
|
14
|
-
},
|
|
15
|
-
"rules": {
|
|
16
|
-
"keyword-spacing": ["error", {
|
|
17
|
-
"before": true,
|
|
18
|
-
"after": true
|
|
19
|
-
}],
|
|
20
|
-
"indent": ["error", 2],
|
|
21
|
-
"no-extra-semi": "error",
|
|
22
|
-
"semi": ["error", "never"],
|
|
23
|
-
"quotes": ["error", "single", {
|
|
24
|
-
"avoidEscape": true
|
|
25
|
-
}],
|
|
26
|
-
"prefer-const": "error",
|
|
27
|
-
"space-before-blocks": "error",
|
|
28
|
-
"comma-dangle": ["error", "always-multiline"],
|
|
29
|
-
"no-multiple-empty-lines": ["error", {
|
|
30
|
-
"max": 1,
|
|
31
|
-
"maxBOF": 0,
|
|
32
|
-
"maxEOF": 0
|
|
33
|
-
}],
|
|
34
|
-
"no-multi-spaces": "error",
|
|
35
|
-
"no-console": "error",
|
|
36
|
-
"no-alert": "error",
|
|
37
|
-
"no-useless-computed-key": "error",
|
|
38
|
-
"quote-props": ["error", "as-needed"],
|
|
39
|
-
"no-unused-expressions": "error",
|
|
40
|
-
"object-curly-newline": ["error", {
|
|
41
|
-
"ObjectExpression": { "multiline": true, "minProperties": 5, "consistent": true },
|
|
42
|
-
"ObjectPattern": { "multiline": true, "minProperties": 5, "consistent": true },
|
|
43
|
-
"ImportDeclaration": { "multiline": true, "minProperties": 50, "consistent": true },
|
|
44
|
-
"ExportDeclaration": { "multiline": true, "minProperties": 5, "consistent": true }
|
|
45
|
-
}],
|
|
46
|
-
"object-property-newline": ["error", {
|
|
47
|
-
"allowAllPropertiesOnSameLine": true
|
|
48
|
-
}],
|
|
49
|
-
|
|
50
|
-
"import/no-deprecated": "error",
|
|
51
|
-
"import/no-anonymous-default-export": [0],
|
|
52
|
-
"import/no-unused-modules": ["error", {
|
|
53
|
-
"unusedExports": true,
|
|
54
|
-
"ignoreExports": [
|
|
55
|
-
"./src/app"
|
|
56
|
-
]
|
|
57
|
-
}],
|
|
58
|
-
|
|
59
|
-
"require-await": "off",
|
|
60
|
-
"@typescript-eslint/require-await": "error",
|
|
61
|
-
|
|
62
|
-
"@typescript-eslint/await-thenable": "error",
|
|
63
|
-
"@typescript-eslint/array-type": ["error", {
|
|
64
|
-
"default": "array-simple"
|
|
65
|
-
}],
|
|
66
|
-
"@typescript-eslint/no-unused-vars": "error",
|
|
67
|
-
"@typescript-eslint/no-require-imports": "error",
|
|
68
|
-
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
69
|
-
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
70
|
-
"@typescript-eslint/no-inferrable-types": "error",
|
|
71
|
-
"@typescript-eslint/no-floating-promises": "error",
|
|
72
|
-
"@typescript-eslint/ban-ts-comment": "error",
|
|
73
|
-
|
|
74
|
-
"eslint-comments/no-unlimited-disable": "error",
|
|
75
|
-
"eslint-comments/no-unused-disable": "error",
|
|
76
|
-
"eslint-comments/no-use": ["error", {
|
|
77
|
-
"allow": [
|
|
78
|
-
"eslint-disable-next-line"
|
|
79
|
-
]
|
|
80
|
-
}],
|
|
81
|
-
|
|
82
|
-
"unicorn/no-unused-properties": "error"
|
|
83
|
-
}
|
|
84
|
-
}
|