@lvce-editor/eslint-config 1.12.0 → 1.14.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/index.js +36 -11
- package/package.json +4 -3
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { join } from 'node:path'
|
|
|
8
8
|
import process from 'node:process'
|
|
9
9
|
import tseslint from 'typescript-eslint'
|
|
10
10
|
import packageJson from 'eslint-plugin-package-json/configs/recommended'
|
|
11
|
+
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
11
12
|
|
|
12
13
|
const root = process.cwd()
|
|
13
14
|
|
|
@@ -46,10 +47,27 @@ const fileCompositionConfig = createFileComposition({
|
|
|
46
47
|
],
|
|
47
48
|
})
|
|
48
49
|
|
|
50
|
+
tseslint.configs.recommendedTypeChecked
|
|
49
51
|
/**
|
|
50
52
|
* @type {any}
|
|
51
53
|
*/
|
|
52
54
|
const defaultConfig = tseslint.config(
|
|
55
|
+
{
|
|
56
|
+
files: ['**/*.ts'],
|
|
57
|
+
plugins: {
|
|
58
|
+
perfectionist,
|
|
59
|
+
},
|
|
60
|
+
rules: {
|
|
61
|
+
'perfectionist/sort-imports': [
|
|
62
|
+
'error',
|
|
63
|
+
{
|
|
64
|
+
type: 'natural',
|
|
65
|
+
order: 'asc',
|
|
66
|
+
newlinesBetween: 'never',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
53
71
|
{
|
|
54
72
|
files: ['**/*.ts'],
|
|
55
73
|
extends: [
|
|
@@ -64,18 +82,10 @@ const defaultConfig = tseslint.config(
|
|
|
64
82
|
},
|
|
65
83
|
},
|
|
66
84
|
],
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
files: ['**/*.ts'],
|
|
70
88
|
rules: {
|
|
71
|
-
'perfectionist/sort-imports': [
|
|
72
|
-
'error',
|
|
73
|
-
{
|
|
74
|
-
type: 'natural',
|
|
75
|
-
order: 'asc',
|
|
76
|
-
newlinesBetween: 'never',
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
89
|
'@typescript-eslint/consistent-type-exports': 'error',
|
|
80
90
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
81
91
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
@@ -110,6 +120,21 @@ const defaultConfig = tseslint.config(
|
|
|
110
120
|
files: ['**/package.json'],
|
|
111
121
|
extends: [packageJson],
|
|
112
122
|
},
|
|
123
|
+
eslintPluginUnicorn.configs['flat/recommended'],
|
|
124
|
+
{
|
|
125
|
+
rules: {
|
|
126
|
+
'unicorn/filename-case': 'off',
|
|
127
|
+
'unicorn/prefer-event-target': 'off',
|
|
128
|
+
'unicorn/no-null': 'off',
|
|
129
|
+
'unicorn/prevent-abbreviations': 'off',
|
|
130
|
+
'unicorn/import-style': 'off',
|
|
131
|
+
'unicorn/no-useless-undefined': 'off',
|
|
132
|
+
'unicorn/switch-case-braces': 'off',
|
|
133
|
+
'unicorn/prefer-add-event-listener': 'off',
|
|
134
|
+
'unicorn/prefer-set-has': 'off',
|
|
135
|
+
'unicorn/prefer-node-protocol': 'off',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
113
138
|
{
|
|
114
139
|
ignores: [
|
|
115
140
|
'dist',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
"@eslint/js": "^9.18.0",
|
|
23
23
|
"eslint-plugin-jest": "^28.11.0",
|
|
24
24
|
"eslint-plugin-n": "^17.15.1",
|
|
25
|
+
"eslint-plugin-package-json": "^0.19.0",
|
|
25
26
|
"eslint-plugin-perfectionist": "^4.6.0",
|
|
26
27
|
"eslint-plugin-project-structure": "^3.13.1",
|
|
27
|
-
"
|
|
28
|
-
"eslint
|
|
28
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
29
|
+
"typescript-eslint": "^8.20.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependencies": {
|
|
31
32
|
"eslint": ">= 9"
|