@ithinkdt/lint 4.2.0 → 4.2.2
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/package.json +17 -14
- package/src/base.js +3 -0
- package/src/rules/no-relative-parent-imports.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ithinkdt/lint",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "iThinkDT 项目的 ESLint、StyleLint 配置",
|
|
6
6
|
"keywords": [
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"@eslint/json": ">=2.0.1",
|
|
38
38
|
"@eslint/markdown": "^8.0.3",
|
|
39
39
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
40
|
-
"@typescript-eslint/parser": "^8.
|
|
40
|
+
"@typescript-eslint/parser": "^8.67.0",
|
|
41
41
|
"@unocss/eslint-config": "^66.7.5",
|
|
42
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
43
|
-
"@vue/compiler-sfc": "^3.5.
|
|
42
|
+
"@vitest/eslint-plugin": "^1.6.27",
|
|
43
|
+
"@vue/compiler-sfc": "^3.5.41",
|
|
44
44
|
"eslint-flat-config-utils": "^3.2.0",
|
|
45
45
|
"eslint-import-resolver-custom-alias": "^1.3.2",
|
|
46
46
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
@@ -48,19 +48,22 @@
|
|
|
48
48
|
"eslint-plugin-format": "^2.0.1",
|
|
49
49
|
"eslint-plugin-import": "npm:eslint-plugin-import-x@^4.17.1",
|
|
50
50
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
51
|
-
"eslint-plugin-playwright": "^2.
|
|
51
|
+
"eslint-plugin-playwright": "^2.11.0",
|
|
52
52
|
"eslint-plugin-tsdoc": ">=0.5.2",
|
|
53
|
-
"eslint-plugin-unicorn": "^
|
|
54
|
-
"eslint-plugin-vue": "^10.
|
|
53
|
+
"eslint-plugin-unicorn": "^73.0.0",
|
|
54
|
+
"eslint-plugin-vue": "^10.10.0",
|
|
55
55
|
"eslint-processor-vue-blocks": "^2.0.0",
|
|
56
|
-
"globals": "^17.
|
|
57
|
-
"globby": "^16.2.
|
|
56
|
+
"globals": "^17.11.0",
|
|
57
|
+
"globby": "^16.2.3",
|
|
58
58
|
"is-glob": "^4.0.3",
|
|
59
|
-
"postcss-html": "^
|
|
59
|
+
"postcss-html": "^2.0.0",
|
|
60
|
+
"stylelint-config-html": "^2.0.0",
|
|
61
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
62
|
+
"stylelint-config-recommended-vue": "^2.0.0",
|
|
60
63
|
"stylelint-config-standard": "^40.0.0",
|
|
61
|
-
"stylelint-config-standard-vue": "^
|
|
64
|
+
"stylelint-config-standard-vue": "^2.0.0",
|
|
62
65
|
"stylelint-order": "^8.1.1",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
66
|
+
"typescript-eslint": "^8.67.0",
|
|
64
67
|
"vue-eslint-parser": "^10.4.1"
|
|
65
68
|
},
|
|
66
69
|
"peerDependencies": {
|
|
@@ -69,8 +72,8 @@
|
|
|
69
72
|
"typescript": ">=5.8"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
|
-
"eslint": "^10.
|
|
73
|
-
"stylelint": "~17.14.
|
|
75
|
+
"eslint": "^10.8.1",
|
|
76
|
+
"stylelint": "~17.14.1",
|
|
74
77
|
"typescript": "~6.0.3"
|
|
75
78
|
},
|
|
76
79
|
"license": "MIT",
|
package/src/base.js
CHANGED
|
@@ -164,6 +164,7 @@ export function base({ stylistic: stylisticOptions, inCI }) {
|
|
|
164
164
|
checkArguments: false,
|
|
165
165
|
checkArrowFunctionBody: false,
|
|
166
166
|
}],
|
|
167
|
+
'unicorn/prefer-then-catch': ['warn'],
|
|
167
168
|
'unicorn/no-null': 'off',
|
|
168
169
|
|
|
169
170
|
// 关闭 优先 String#replaceAll(),使用全局标志进行正则表达式搜索
|
|
@@ -235,6 +236,8 @@ export function base({ stylistic: stylisticOptions, inCI }) {
|
|
|
235
236
|
|
|
236
237
|
'unicorn/no-array-callback-reference': 'off',
|
|
237
238
|
|
|
239
|
+
'unicorn/single-line-block-comment-style': 'off',
|
|
240
|
+
|
|
238
241
|
// vue 中 this 会误报
|
|
239
242
|
'unicorn/no-this-outside-of-class': 'off',
|
|
240
243
|
|
|
@@ -16,8 +16,8 @@ export const noRelativeParentImportRule = {
|
|
|
16
16
|
const aliasModuleDeclarations = (node) => {
|
|
17
17
|
const importModuleName = node.source?.value
|
|
18
18
|
if (
|
|
19
|
-
|
|
20
|
-
||
|
|
19
|
+
typeof importModuleName !== 'string'
|
|
20
|
+
|| !node.source?.range
|
|
21
21
|
|| importModuleName[0] !== '.'
|
|
22
22
|
|| importModuleName[1] !== '.'
|
|
23
23
|
)
|