@lvce-editor/eslint-config 1.19.0 → 1.20.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 +6 -1
- package/package.json +1 -1
- package/rules.js +37 -14
package/index.js
CHANGED
|
@@ -127,8 +127,12 @@ const defaultConfig = tseslint.config(
|
|
|
127
127
|
files: ['**/package.json'],
|
|
128
128
|
extends: [packageJson],
|
|
129
129
|
},
|
|
130
|
-
eslintPluginUnicorn.configs['flat/recommended'],
|
|
131
130
|
{
|
|
131
|
+
files: ['**/*.ts'],
|
|
132
|
+
...eslintPluginUnicorn.configs['flat/recommended'],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
files: ['**/*.ts'],
|
|
132
136
|
rules: {
|
|
133
137
|
'unicorn/filename-case': 'off',
|
|
134
138
|
'unicorn/prefer-event-target': 'off',
|
|
@@ -174,6 +178,7 @@ const defaultConfig = tseslint.config(
|
|
|
174
178
|
export const recommendedNode = [
|
|
175
179
|
nodePlugin.configs['flat/recommended'],
|
|
176
180
|
{
|
|
181
|
+
files: ['**/*.ts'],
|
|
177
182
|
rules: {
|
|
178
183
|
'n/prefer-node-protocol': 'error',
|
|
179
184
|
'n/no-unpublished-import': 'off', // TODO enable this for some node packages, which don't bundle dependencies
|
package/package.json
CHANGED
package/rules.js
CHANGED
|
@@ -4,9 +4,12 @@ var __export = (target, all) => {
|
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
// src/
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// src/index.ts
|
|
8
|
+
import json from "@eslint/json";
|
|
9
|
+
|
|
10
|
+
// src/tsconfig-allow-importing-ts-extensions.ts
|
|
11
|
+
var tsconfig_allow_importing_ts_extensions_exports = {};
|
|
12
|
+
__export(tsconfig_allow_importing_ts_extensions_exports, {
|
|
10
13
|
create: () => create2,
|
|
11
14
|
meta: () => meta
|
|
12
15
|
});
|
|
@@ -40,18 +43,18 @@ var create = (context, name) => {
|
|
|
40
43
|
};
|
|
41
44
|
};
|
|
42
45
|
|
|
43
|
-
// src/tsconfig-
|
|
46
|
+
// src/tsconfig-allow-importing-ts-extensions.ts
|
|
44
47
|
var meta = {
|
|
45
48
|
type: "problem",
|
|
46
49
|
docs: {
|
|
47
|
-
description: "
|
|
50
|
+
description: "Ensure that the allowImportingTsExtensions is enabled"
|
|
48
51
|
},
|
|
49
52
|
messages: {
|
|
50
|
-
|
|
53
|
+
allowImportingTsExtensions: "allowImportingTsExtensions rule should be enabled"
|
|
51
54
|
}
|
|
52
55
|
};
|
|
53
56
|
var create2 = (context) => {
|
|
54
|
-
return create(context, "
|
|
57
|
+
return create(context, "allowImportingTsExtensions");
|
|
55
58
|
};
|
|
56
59
|
|
|
57
60
|
// src/tsconfig-force-consistent-casing-in-file-names.ts
|
|
@@ -73,13 +76,32 @@ var create3 = (context) => {
|
|
|
73
76
|
return create(context, "forceConsistentCasingInFileNames");
|
|
74
77
|
};
|
|
75
78
|
|
|
76
|
-
// src/tsconfig-
|
|
77
|
-
var
|
|
78
|
-
__export(
|
|
79
|
+
// src/tsconfig-no-unchecked-side-effect-imports.ts
|
|
80
|
+
var tsconfig_no_unchecked_side_effect_imports_exports = {};
|
|
81
|
+
__export(tsconfig_no_unchecked_side_effect_imports_exports, {
|
|
79
82
|
create: () => create4,
|
|
80
83
|
meta: () => meta3
|
|
81
84
|
});
|
|
82
85
|
var meta3 = {
|
|
86
|
+
type: "problem",
|
|
87
|
+
docs: {
|
|
88
|
+
description: "Disallow not allowed keys in JSON objects"
|
|
89
|
+
},
|
|
90
|
+
messages: {
|
|
91
|
+
noUncheckedSideEffectImports: "noUncheckedSideEffectImports rule should be enabled"
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var create4 = (context) => {
|
|
95
|
+
return create(context, "noUncheckedSideEffectImports");
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// src/tsconfig-strict.ts
|
|
99
|
+
var tsconfig_strict_exports = {};
|
|
100
|
+
__export(tsconfig_strict_exports, {
|
|
101
|
+
create: () => create5,
|
|
102
|
+
meta: () => meta4
|
|
103
|
+
});
|
|
104
|
+
var meta4 = {
|
|
83
105
|
type: "problem",
|
|
84
106
|
docs: {
|
|
85
107
|
description: "Ensure that the strict mode is enabled"
|
|
@@ -88,12 +110,11 @@ var meta3 = {
|
|
|
88
110
|
strict: "strict mode should be enabled"
|
|
89
111
|
}
|
|
90
112
|
};
|
|
91
|
-
var
|
|
113
|
+
var create5 = (context) => {
|
|
92
114
|
return create(context, "strict");
|
|
93
115
|
};
|
|
94
116
|
|
|
95
117
|
// src/index.ts
|
|
96
|
-
import json from "@eslint/json";
|
|
97
118
|
var plugin = {
|
|
98
119
|
meta: {
|
|
99
120
|
name: "tsconfig",
|
|
@@ -102,7 +123,8 @@ var plugin = {
|
|
|
102
123
|
rules: {
|
|
103
124
|
"no-unchecked-side-effect-imports": tsconfig_no_unchecked_side_effect_imports_exports,
|
|
104
125
|
"force-consistent-casing-in-file-names": tsconfig_force_consistent_casing_in_file_names_exports,
|
|
105
|
-
strict: tsconfig_strict_exports
|
|
126
|
+
strict: tsconfig_strict_exports,
|
|
127
|
+
"allow-importing-ts-extensions": tsconfig_allow_importing_ts_extensions_exports
|
|
106
128
|
},
|
|
107
129
|
configs: {}
|
|
108
130
|
};
|
|
@@ -126,7 +148,8 @@ var recommended = [
|
|
|
126
148
|
rules: {
|
|
127
149
|
"tsconfig/no-unchecked-side-effect-imports": "error",
|
|
128
150
|
"tsconfig/force-consistent-casing-in-file-names": "error",
|
|
129
|
-
"tsconfig/strict": "error"
|
|
151
|
+
"tsconfig/strict": "error",
|
|
152
|
+
"tsconfig/allow-importing-ts-extensions": "error"
|
|
130
153
|
}
|
|
131
154
|
}
|
|
132
155
|
];
|