@coko/lint 3.0.0-alpha.1 → 3.0.0-alpha.11
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 +60 -0
- package/package.json +5 -3
- package/src/eslint.mjs +79 -34
- package/src/{prettier.js → prettier.mjs} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,66 @@
|
|
|
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.11](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.10...v3.0.0-alpha.11) (2026-01-19)
|
|
6
|
+
|
|
7
|
+
## [3.0.0-alpha.10](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2025-12-02)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **eslint:** do not autofix vitest/no-focused-tests ([717897e](https://gitlab.coko.foundation/cokoapps/lint/commit/717897e1b072c651008c52ebddaf7df9cdbbdfb3))
|
|
13
|
+
|
|
14
|
+
## [3.0.0-alpha.9](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2025-12-01)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **eslint:** add workspaces plugin ([0bfb382](https://gitlab.coko.foundation/cokoapps/lint/commit/0bfb382057548895c92cd53282745457d8ba0b5e))
|
|
20
|
+
|
|
21
|
+
## [3.0.0-alpha.8](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.7...v3.0.0-alpha.8) (2025-11-18)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **eslint:** allow unused vars if they start with _ ([3f2fca0](https://gitlab.coko.foundation/cokoapps/lint/commit/3f2fca094ea69f9b5560f07851083bea637bd3ed))
|
|
27
|
+
|
|
28
|
+
## [3.0.0-alpha.7](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.6...v3.0.0-alpha.7) (2025-11-06)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* **eslint:** disable vitest typecheck ([3184e6e](https://gitlab.coko.foundation/cokoapps/lint/commit/3184e6ec614639584c5e31c45a039931accf36fa))
|
|
34
|
+
|
|
35
|
+
## [3.0.0-alpha.6](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.5...v3.0.0-alpha.6) (2025-11-06)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* **eslint:** add vitest plugin ([92a0f86](https://gitlab.coko.foundation/cokoapps/lint/commit/92a0f864f91b7a67b4c65de841757223290e1b63))
|
|
41
|
+
|
|
42
|
+
## [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)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **eslint:** refine new eslint rules ([caca5f4](https://gitlab.coko.foundation/cokoapps/lint/commit/caca5f45e743725ce259704328a85c7791d33f6f))
|
|
48
|
+
|
|
49
|
+
## [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)
|
|
50
|
+
|
|
51
|
+
## [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)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Bug Fixes
|
|
55
|
+
|
|
56
|
+
* **eslint:** fix ecma version ([66f0ae8](https://gitlab.coko.foundation/cokoapps/lint/commit/66f0ae8a6d0d36d4e527f7d820445100df4231eb))
|
|
57
|
+
|
|
58
|
+
## [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)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Bug Fixes
|
|
62
|
+
|
|
63
|
+
* fix main field in package.json ([019d24e](https://gitlab.coko.foundation/cokoapps/lint/commit/019d24ef3cc4013bac163e13335c9b4edf4bc603))
|
|
64
|
+
|
|
5
65
|
## [3.0.0-alpha.1](https://gitlab.coko.foundation/cokoapps/lint/compare/v3.0.0-alpha.0...v3.0.0-alpha.1) (2025-10-24)
|
|
6
66
|
|
|
7
67
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coko/lint",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.11",
|
|
4
4
|
"description": "Linter configurations and dependencies for coko's projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
],
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "
|
|
12
|
+
"url": "https://gitlab.coko.foundation/cokoapps/lint"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"author": "Yannis Barlas",
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": "^22.16.0"
|
|
18
18
|
},
|
|
19
|
-
"main": "src/index.
|
|
19
|
+
"main": "src/index.mjs",
|
|
20
20
|
"bin": {
|
|
21
21
|
"coko-lint": "./src/cli.js"
|
|
22
22
|
},
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@commitlint/config-conventional": "^20.0.0",
|
|
43
43
|
"@eslint/eslintrc": "^3.3.1",
|
|
44
44
|
"@eslint/js": "^9.38.0",
|
|
45
|
+
"@vitest/eslint-plugin": "^1.4.1",
|
|
45
46
|
"commander": "^14.0.1",
|
|
46
47
|
"commitizen": "^4.3.1",
|
|
47
48
|
"conventional-commit-types": "^3.0.0",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"eslint-plugin-promise": "^7.2.1",
|
|
62
63
|
"eslint-plugin-react": "^7.37.5",
|
|
63
64
|
"eslint-plugin-react-hooks": "^7.0.0",
|
|
65
|
+
"eslint-plugin-workspaces": "^0.11.0",
|
|
64
66
|
"globals": "^16.4.0",
|
|
65
67
|
"husky": "^9.1.7",
|
|
66
68
|
"lint-staged": "^16.2.6",
|
package/src/eslint.mjs
CHANGED
|
@@ -10,6 +10,8 @@ import tseslint from 'typescript-eslint'
|
|
|
10
10
|
|
|
11
11
|
import nodePlugin from 'eslint-plugin-n'
|
|
12
12
|
import importPlugin from 'eslint-plugin-import'
|
|
13
|
+
import vitest from '@vitest/eslint-plugin'
|
|
14
|
+
import workspaces from 'eslint-plugin-workspaces'
|
|
13
15
|
// import jest from 'eslint-plugin-jest'
|
|
14
16
|
// import cypressPlugin from 'eslint-plugin-cypress'
|
|
15
17
|
|
|
@@ -87,7 +89,6 @@ const commonRules = {
|
|
|
87
89
|
'no-template-curly-in-string': 'warn',
|
|
88
90
|
'no-throw-literal': 'error',
|
|
89
91
|
'no-undef-init': 'warn',
|
|
90
|
-
'no-undefined': 'error',
|
|
91
92
|
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
92
93
|
'no-unused-expressions': 'error',
|
|
93
94
|
'no-useless-computed-key': 'error',
|
|
@@ -121,24 +122,41 @@ const commonRules = {
|
|
|
121
122
|
// storybook
|
|
122
123
|
'.storybook/*',
|
|
123
124
|
'**/stories/**/*.js',
|
|
125
|
+
'**/stories/**/*.ts',
|
|
124
126
|
|
|
125
127
|
// tests
|
|
126
128
|
'cypress/**',
|
|
127
129
|
'**/*.spec.js',
|
|
130
|
+
'**/*.spec.ts',
|
|
128
131
|
'**/*.test.js',
|
|
132
|
+
'**/*.test.ts',
|
|
129
133
|
'**/__tests__/**/*',
|
|
134
|
+
'**/vitest.config.*',
|
|
130
135
|
|
|
131
136
|
// webpack
|
|
132
137
|
'webpack/**',
|
|
133
138
|
|
|
134
139
|
// configs
|
|
135
140
|
'.commitlintrc.js',
|
|
141
|
+
'.commitlintrc.ts',
|
|
142
|
+
'.commitlintrc.mjs',
|
|
136
143
|
'.cz-config.js',
|
|
144
|
+
'.cz-config.ts',
|
|
145
|
+
'.cz-config.mjs',
|
|
137
146
|
'.jest.config.js',
|
|
147
|
+
'.jest.config.ts',
|
|
148
|
+
'.jest.config.mjs',
|
|
138
149
|
'.lintstagedrc.js',
|
|
150
|
+
'.lintstagedrc.ts',
|
|
151
|
+
'.lintstagedrc.mjs',
|
|
139
152
|
'.prettierrc.js',
|
|
153
|
+
'.prettierrc.ts',
|
|
154
|
+
'.prettierrc.mjs',
|
|
140
155
|
'.stylelintrc.js',
|
|
156
|
+
'.stylelintrc.ts',
|
|
157
|
+
'.stylelintrc.mjs',
|
|
141
158
|
'eslint.config.js',
|
|
159
|
+
'eslint.config.ts',
|
|
142
160
|
'eslint.config.mjs',
|
|
143
161
|
|
|
144
162
|
// other
|
|
@@ -155,10 +173,19 @@ const server = [
|
|
|
155
173
|
js.configs.recommended,
|
|
156
174
|
importPlugin.flatConfigs.recommended,
|
|
157
175
|
|
|
176
|
+
{
|
|
177
|
+
plugins: { workspaces },
|
|
178
|
+
rules: {
|
|
179
|
+
'workspaces/no-relative-imports': 'error',
|
|
180
|
+
'workspaces/require-dependency': 'warn',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
|
|
158
184
|
{
|
|
159
185
|
files: ['**/*.{js,mjs,ts}'],
|
|
160
186
|
languageOptions: {
|
|
161
187
|
globals: { ...globals.node },
|
|
188
|
+
ecmaVersion: 'latest',
|
|
162
189
|
},
|
|
163
190
|
plugins: {
|
|
164
191
|
n: nodePlugin,
|
|
@@ -174,6 +201,7 @@ const server = [
|
|
|
174
201
|
rules: {
|
|
175
202
|
...commonRules,
|
|
176
203
|
'no-console': 'error',
|
|
204
|
+
// 'n/no-process-exit': 'off',
|
|
177
205
|
'import/no-unresolved': ['error', { commonjs: true }],
|
|
178
206
|
},
|
|
179
207
|
},
|
|
@@ -188,41 +216,30 @@ const server = [
|
|
|
188
216
|
},
|
|
189
217
|
},
|
|
190
218
|
|
|
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
|
-
},
|
|
219
|
+
// {
|
|
220
|
+
// files: ['**/*.mjs', '**/*.ts'],
|
|
221
|
+
// languageOptions: {
|
|
222
|
+
// sourceType: 'module',
|
|
223
|
+
// },
|
|
224
|
+
// rules: {
|
|
225
|
+
// // 'no-restricted-globals': [
|
|
226
|
+
// // 'error',
|
|
227
|
+
// // {
|
|
228
|
+
// // name: '__dirname',
|
|
229
|
+
// // message:
|
|
230
|
+
// // 'Do not use __dirname; use import.meta.url or process.cwd().',
|
|
231
|
+
// // },
|
|
232
|
+
// // {
|
|
233
|
+
// // name: '__filename',
|
|
234
|
+
// // message:
|
|
235
|
+
// // 'Do not use __filename in ES modules or TypeScript; use import.meta.url or path.resolve() instead.',
|
|
236
|
+
// // },
|
|
237
|
+
// // ],
|
|
238
|
+
// },
|
|
239
|
+
// },
|
|
219
240
|
|
|
220
241
|
{
|
|
221
242
|
files: ['**/*.mjs'],
|
|
222
|
-
languageOptions: {
|
|
223
|
-
ecmaVersion: 2022,
|
|
224
|
-
sourceType: 'module',
|
|
225
|
-
},
|
|
226
243
|
rules: {
|
|
227
244
|
...nodePlugin.configs['flat/recommended-module'].rules,
|
|
228
245
|
},
|
|
@@ -232,7 +249,6 @@ const server = [
|
|
|
232
249
|
files: ['**/*.ts'],
|
|
233
250
|
languageOptions: {
|
|
234
251
|
parser: tseslint.parser,
|
|
235
|
-
sourceType: 'module',
|
|
236
252
|
},
|
|
237
253
|
plugins: {
|
|
238
254
|
'@typescript-eslint': tseslint.plugin,
|
|
@@ -240,6 +256,35 @@ const server = [
|
|
|
240
256
|
rules: {
|
|
241
257
|
...tseslint.configs.recommended.rules,
|
|
242
258
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
259
|
+
|
|
260
|
+
'no-redeclare': 'off',
|
|
261
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
262
|
+
|
|
263
|
+
'no-unused-vars': 'off',
|
|
264
|
+
'@typescript-eslint/no-unused-vars': [
|
|
265
|
+
'error',
|
|
266
|
+
{
|
|
267
|
+
argsIgnorePattern: '^_',
|
|
268
|
+
varsIgnorePattern: '^_',
|
|
269
|
+
caughtErrorsIgnorePattern: '^_',
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
{
|
|
276
|
+
files: ['**/__tests__/**/*.test.ts'],
|
|
277
|
+
plugins: {
|
|
278
|
+
vitest,
|
|
279
|
+
},
|
|
280
|
+
// settings: {
|
|
281
|
+
// vitest: {
|
|
282
|
+
// typecheck: true,
|
|
283
|
+
// },
|
|
284
|
+
// },
|
|
285
|
+
rules: {
|
|
286
|
+
...vitest.configs.recommended.rules,
|
|
287
|
+
'vitest/no-focused-tests': ['error', { fixable: false }],
|
|
243
288
|
},
|
|
244
289
|
},
|
|
245
290
|
|