@coko/lint 3.0.0-alpha.2 → 3.0.0-alpha.5
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/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/src/eslint.mjs +30 -34
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.0.0-alpha.5](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.4...v3.0.0-alpha.5) (2025-11-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **eslint:** refine new eslint rules ([caca5f4](https://gitlab.coko.foundation/cokoapps/lint/commit/caca5f45e743725ce259704328a85c7791d33f6f))
|
|
11
|
+
|
|
12
|
+
## [3.0.0-alpha.4](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.3...v3.0.0-alpha.4) (2025-11-06)
|
|
13
|
+
|
|
14
|
+
## [3.0.0-alpha.3](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) (2025-10-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **eslint:** fix ecma version ([66f0ae8](https://gitlab.coko.foundation/cokoapps/lint/commit/66f0ae8a6d0d36d4e527f7d820445100df4231eb))
|
|
20
|
+
|
|
5
21
|
## [3.0.0-alpha.2](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.1...v3.0.0-alpha.2) (2025-10-24)
|
|
6
22
|
|
|
7
23
|
|
package/package.json
CHANGED
package/src/eslint.mjs
CHANGED
|
@@ -87,7 +87,6 @@ const commonRules = {
|
|
|
87
87
|
'no-template-curly-in-string': 'warn',
|
|
88
88
|
'no-throw-literal': 'error',
|
|
89
89
|
'no-undef-init': 'warn',
|
|
90
|
-
'no-undefined': 'error',
|
|
91
90
|
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
92
91
|
'no-unused-expressions': 'error',
|
|
93
92
|
'no-useless-computed-key': 'error',
|
|
@@ -127,6 +126,7 @@ const commonRules = {
|
|
|
127
126
|
'**/*.spec.js',
|
|
128
127
|
'**/*.test.js',
|
|
129
128
|
'**/__tests__/**/*',
|
|
129
|
+
'**/vitest.config.*',
|
|
130
130
|
|
|
131
131
|
// webpack
|
|
132
132
|
'webpack/**',
|
|
@@ -159,6 +159,7 @@ const server = [
|
|
|
159
159
|
files: ['**/*.{js,mjs,ts}'],
|
|
160
160
|
languageOptions: {
|
|
161
161
|
globals: { ...globals.node },
|
|
162
|
+
ecmaVersion: 'latest',
|
|
162
163
|
},
|
|
163
164
|
plugins: {
|
|
164
165
|
n: nodePlugin,
|
|
@@ -174,6 +175,7 @@ const server = [
|
|
|
174
175
|
rules: {
|
|
175
176
|
...commonRules,
|
|
176
177
|
'no-console': 'error',
|
|
178
|
+
// 'n/no-process-exit': 'off',
|
|
177
179
|
'import/no-unresolved': ['error', { commonjs: true }],
|
|
178
180
|
},
|
|
179
181
|
},
|
|
@@ -188,41 +190,30 @@ const server = [
|
|
|
188
190
|
},
|
|
189
191
|
},
|
|
190
192
|
|
|
191
|
-
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
name: 'isNaN',
|
|
213
|
-
message:
|
|
214
|
-
'Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan',
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
},
|
|
218
|
-
},
|
|
193
|
+
// {
|
|
194
|
+
// files: ['**/*.mjs', '**/*.ts'],
|
|
195
|
+
// languageOptions: {
|
|
196
|
+
// sourceType: 'module',
|
|
197
|
+
// },
|
|
198
|
+
// rules: {
|
|
199
|
+
// // 'no-restricted-globals': [
|
|
200
|
+
// // 'error',
|
|
201
|
+
// // {
|
|
202
|
+
// // name: '__dirname',
|
|
203
|
+
// // message:
|
|
204
|
+
// // 'Do not use __dirname; use import.meta.url or process.cwd().',
|
|
205
|
+
// // },
|
|
206
|
+
// // {
|
|
207
|
+
// // name: '__filename',
|
|
208
|
+
// // message:
|
|
209
|
+
// // 'Do not use __filename in ES modules or TypeScript; use import.meta.url or path.resolve() instead.',
|
|
210
|
+
// // },
|
|
211
|
+
// // ],
|
|
212
|
+
// },
|
|
213
|
+
// },
|
|
219
214
|
|
|
220
215
|
{
|
|
221
216
|
files: ['**/*.mjs'],
|
|
222
|
-
languageOptions: {
|
|
223
|
-
ecmaVersion: 2022,
|
|
224
|
-
sourceType: 'module',
|
|
225
|
-
},
|
|
226
217
|
rules: {
|
|
227
218
|
...nodePlugin.configs['flat/recommended-module'].rules,
|
|
228
219
|
},
|
|
@@ -232,7 +223,6 @@ const server = [
|
|
|
232
223
|
files: ['**/*.ts'],
|
|
233
224
|
languageOptions: {
|
|
234
225
|
parser: tseslint.parser,
|
|
235
|
-
sourceType: 'module',
|
|
236
226
|
},
|
|
237
227
|
plugins: {
|
|
238
228
|
'@typescript-eslint': tseslint.plugin,
|
|
@@ -240,6 +230,12 @@ const server = [
|
|
|
240
230
|
rules: {
|
|
241
231
|
...tseslint.configs.recommended.rules,
|
|
242
232
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
233
|
+
|
|
234
|
+
'no-redeclare': 'off',
|
|
235
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
236
|
+
|
|
237
|
+
'no-unused-vars': 'off',
|
|
238
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
243
239
|
},
|
|
244
240
|
},
|
|
245
241
|
|