@ntnyq/eslint-config 2.3.0 → 2.4.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/README.md +1 -1
- package/dist/index.cjs +15 -4
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +14 -4
- package/package.json +2 -1
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -52,6 +52,7 @@ __export(src_exports, {
|
|
|
52
52
|
GLOB_TSX: () => GLOB_TSX,
|
|
53
53
|
GLOB_VUE: () => GLOB_VUE,
|
|
54
54
|
GLOB_YAML: () => GLOB_YAML,
|
|
55
|
+
command: () => command,
|
|
55
56
|
comments: () => comments,
|
|
56
57
|
defineConfig: () => defineConfig,
|
|
57
58
|
getVueVersion: () => getVueVersion,
|
|
@@ -313,7 +314,11 @@ var unicorn = defineConfig([
|
|
|
313
314
|
unicorn: import_eslint_plugin_unicorn.default
|
|
314
315
|
},
|
|
315
316
|
rules: {
|
|
317
|
+
// Disabled
|
|
316
318
|
"unicorn/no-unsafe-regex": "off",
|
|
319
|
+
"unicorn/prefer-top-level-await": "off",
|
|
320
|
+
"unicorn/explicit-length-check": "off",
|
|
321
|
+
"unicorn/no-array-callback-reference": "off",
|
|
317
322
|
"unicorn/error-message": "error",
|
|
318
323
|
"unicorn/escape-case": "error",
|
|
319
324
|
"unicorn/no-new-buffer": "error",
|
|
@@ -327,12 +332,10 @@ var unicorn = defineConfig([
|
|
|
327
332
|
"unicorn/prefer-set-size": "error",
|
|
328
333
|
"unicorn/better-regex": "error",
|
|
329
334
|
"unicorn/prefer-regexp-test": "error",
|
|
330
|
-
"unicorn/prefer-top-level-await": "error",
|
|
331
335
|
"unicorn/no-static-only-class": "error",
|
|
332
336
|
"unicorn/no-zero-fractions": "error",
|
|
333
337
|
"unicorn/custom-error-definition": "error",
|
|
334
338
|
"unicorn/prefer-modern-math-apis": "error",
|
|
335
|
-
"unicorn/explicit-length-check": "error",
|
|
336
339
|
"unicorn/new-for-builtins": "error",
|
|
337
340
|
"unicorn/no-console-spaces": "error",
|
|
338
341
|
"unicorn/no-for-loop": "error",
|
|
@@ -371,7 +374,6 @@ var unicorn = defineConfig([
|
|
|
371
374
|
"unicorn/no-new-array": "error",
|
|
372
375
|
"unicorn/no-instanceof-array": "error",
|
|
373
376
|
"unicorn/no-array-push-push": "error",
|
|
374
|
-
"unicorn/no-array-callback-reference": "error",
|
|
375
377
|
"unicorn/no-array-method-this-argument": "error",
|
|
376
378
|
"unicorn/prefer-array-find": "error",
|
|
377
379
|
"unicorn/prefer-array-some": "error",
|
|
@@ -884,6 +886,10 @@ var unocss = defineConfig([
|
|
|
884
886
|
}
|
|
885
887
|
]);
|
|
886
888
|
|
|
889
|
+
// src/configs/command.ts
|
|
890
|
+
var import_config = __toESM(require("eslint-plugin-command/config"), 1);
|
|
891
|
+
var command = defineConfig([(0, import_config.default)()]);
|
|
892
|
+
|
|
887
893
|
// src/configs/yml.ts
|
|
888
894
|
var yml = defineConfig([
|
|
889
895
|
{
|
|
@@ -1472,7 +1478,8 @@ function ntnyq(config = [], {
|
|
|
1472
1478
|
vue: enableVue = hasVue,
|
|
1473
1479
|
unocss: enableUnoCSS = hasUnoCSS,
|
|
1474
1480
|
prettier: enablePrettier = true,
|
|
1475
|
-
markdown: enableMarkdown = true
|
|
1481
|
+
markdown: enableMarkdown = true,
|
|
1482
|
+
command: enableCommand = true
|
|
1476
1483
|
} = {}) {
|
|
1477
1484
|
const configs = defineConfig([...presetBasic, ...yml, ...presetJsonc]);
|
|
1478
1485
|
if (enableVue) {
|
|
@@ -1487,6 +1494,9 @@ function ntnyq(config = [], {
|
|
|
1487
1494
|
if (enableMarkdown) {
|
|
1488
1495
|
configs.push(...markdown);
|
|
1489
1496
|
}
|
|
1497
|
+
if (enableCommand) {
|
|
1498
|
+
configs.push(...command);
|
|
1499
|
+
}
|
|
1490
1500
|
if (Object.keys(config).length > 0) {
|
|
1491
1501
|
configs.push(...Array.isArray(config) ? config : [config]);
|
|
1492
1502
|
}
|
|
@@ -1516,6 +1526,7 @@ function ntnyq(config = [], {
|
|
|
1516
1526
|
GLOB_TSX,
|
|
1517
1527
|
GLOB_VUE,
|
|
1518
1528
|
GLOB_YAML,
|
|
1529
|
+
command,
|
|
1519
1530
|
comments,
|
|
1520
1531
|
defineConfig,
|
|
1521
1532
|
getVueVersion,
|
package/dist/index.d.cts
CHANGED
|
@@ -101,11 +101,12 @@ declare const presetAll: FlatConfig[];
|
|
|
101
101
|
/**
|
|
102
102
|
* Custom framework support
|
|
103
103
|
*/
|
|
104
|
-
declare function ntnyq(config?: FlatConfig | FlatConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, }?: {
|
|
104
|
+
declare function ntnyq(config?: FlatConfig | FlatConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, command: enableCommand, }?: {
|
|
105
105
|
vue?: boolean | undefined;
|
|
106
106
|
unocss?: boolean | undefined;
|
|
107
107
|
prettier?: boolean | undefined;
|
|
108
108
|
markdown?: boolean | undefined;
|
|
109
|
+
command?: boolean | undefined;
|
|
109
110
|
}): FlatConfig[];
|
|
110
111
|
|
|
111
112
|
/**
|
|
@@ -133,6 +134,8 @@ declare const typescript: FlatConfig[];
|
|
|
133
134
|
|
|
134
135
|
declare const unocss: FlatConfig[];
|
|
135
136
|
|
|
137
|
+
declare const command: FlatConfig[];
|
|
138
|
+
|
|
136
139
|
declare const yml: FlatConfig[];
|
|
137
140
|
|
|
138
141
|
declare const sortPackageJson: FlatConfig[];
|
|
@@ -153,4 +156,4 @@ type InteropDefault<T> = T extends {
|
|
|
153
156
|
} ? U : T;
|
|
154
157
|
declare function interopDefault<T>(m: T): InteropDefault<T>;
|
|
155
158
|
|
|
156
|
-
export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, type RuleRecord, type RuleRecordEntry, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
159
|
+
export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, type RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -101,11 +101,12 @@ declare const presetAll: FlatConfig[];
|
|
|
101
101
|
/**
|
|
102
102
|
* Custom framework support
|
|
103
103
|
*/
|
|
104
|
-
declare function ntnyq(config?: FlatConfig | FlatConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, }?: {
|
|
104
|
+
declare function ntnyq(config?: FlatConfig | FlatConfig[], { vue: enableVue, unocss: enableUnoCSS, prettier: enablePrettier, markdown: enableMarkdown, command: enableCommand, }?: {
|
|
105
105
|
vue?: boolean | undefined;
|
|
106
106
|
unocss?: boolean | undefined;
|
|
107
107
|
prettier?: boolean | undefined;
|
|
108
108
|
markdown?: boolean | undefined;
|
|
109
|
+
command?: boolean | undefined;
|
|
109
110
|
}): FlatConfig[];
|
|
110
111
|
|
|
111
112
|
/**
|
|
@@ -133,6 +134,8 @@ declare const typescript: FlatConfig[];
|
|
|
133
134
|
|
|
134
135
|
declare const unocss: FlatConfig[];
|
|
135
136
|
|
|
137
|
+
declare const command: FlatConfig[];
|
|
138
|
+
|
|
136
139
|
declare const yml: FlatConfig[];
|
|
137
140
|
|
|
138
141
|
declare const sortPackageJson: FlatConfig[];
|
|
@@ -153,4 +156,4 @@ type InteropDefault<T> = T extends {
|
|
|
153
156
|
} ? U : T;
|
|
154
157
|
declare function interopDefault<T>(m: T): InteropDefault<T>;
|
|
155
158
|
|
|
156
|
-
export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, type RuleRecord, type RuleRecordEntry, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
159
|
+
export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, type RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -210,7 +210,11 @@ var unicorn = defineConfig([
|
|
|
210
210
|
unicorn: default5
|
|
211
211
|
},
|
|
212
212
|
rules: {
|
|
213
|
+
// Disabled
|
|
213
214
|
"unicorn/no-unsafe-regex": "off",
|
|
215
|
+
"unicorn/prefer-top-level-await": "off",
|
|
216
|
+
"unicorn/explicit-length-check": "off",
|
|
217
|
+
"unicorn/no-array-callback-reference": "off",
|
|
214
218
|
"unicorn/error-message": "error",
|
|
215
219
|
"unicorn/escape-case": "error",
|
|
216
220
|
"unicorn/no-new-buffer": "error",
|
|
@@ -224,12 +228,10 @@ var unicorn = defineConfig([
|
|
|
224
228
|
"unicorn/prefer-set-size": "error",
|
|
225
229
|
"unicorn/better-regex": "error",
|
|
226
230
|
"unicorn/prefer-regexp-test": "error",
|
|
227
|
-
"unicorn/prefer-top-level-await": "error",
|
|
228
231
|
"unicorn/no-static-only-class": "error",
|
|
229
232
|
"unicorn/no-zero-fractions": "error",
|
|
230
233
|
"unicorn/custom-error-definition": "error",
|
|
231
234
|
"unicorn/prefer-modern-math-apis": "error",
|
|
232
|
-
"unicorn/explicit-length-check": "error",
|
|
233
235
|
"unicorn/new-for-builtins": "error",
|
|
234
236
|
"unicorn/no-console-spaces": "error",
|
|
235
237
|
"unicorn/no-for-loop": "error",
|
|
@@ -268,7 +270,6 @@ var unicorn = defineConfig([
|
|
|
268
270
|
"unicorn/no-new-array": "error",
|
|
269
271
|
"unicorn/no-instanceof-array": "error",
|
|
270
272
|
"unicorn/no-array-push-push": "error",
|
|
271
|
-
"unicorn/no-array-callback-reference": "error",
|
|
272
273
|
"unicorn/no-array-method-this-argument": "error",
|
|
273
274
|
"unicorn/prefer-array-find": "error",
|
|
274
275
|
"unicorn/prefer-array-some": "error",
|
|
@@ -781,6 +782,10 @@ var unocss = defineConfig([
|
|
|
781
782
|
}
|
|
782
783
|
]);
|
|
783
784
|
|
|
785
|
+
// src/configs/command.ts
|
|
786
|
+
import createCommandPlugin from "eslint-plugin-command/config";
|
|
787
|
+
var command = defineConfig([createCommandPlugin()]);
|
|
788
|
+
|
|
784
789
|
// src/configs/yml.ts
|
|
785
790
|
var yml = defineConfig([
|
|
786
791
|
{
|
|
@@ -1369,7 +1374,8 @@ function ntnyq(config = [], {
|
|
|
1369
1374
|
vue: enableVue = hasVue,
|
|
1370
1375
|
unocss: enableUnoCSS = hasUnoCSS,
|
|
1371
1376
|
prettier: enablePrettier = true,
|
|
1372
|
-
markdown: enableMarkdown = true
|
|
1377
|
+
markdown: enableMarkdown = true,
|
|
1378
|
+
command: enableCommand = true
|
|
1373
1379
|
} = {}) {
|
|
1374
1380
|
const configs = defineConfig([...presetBasic, ...yml, ...presetJsonc]);
|
|
1375
1381
|
if (enableVue) {
|
|
@@ -1384,6 +1390,9 @@ function ntnyq(config = [], {
|
|
|
1384
1390
|
if (enableMarkdown) {
|
|
1385
1391
|
configs.push(...markdown);
|
|
1386
1392
|
}
|
|
1393
|
+
if (enableCommand) {
|
|
1394
|
+
configs.push(...command);
|
|
1395
|
+
}
|
|
1387
1396
|
if (Object.keys(config).length > 0) {
|
|
1388
1397
|
configs.push(...Array.isArray(config) ? config : [config]);
|
|
1389
1398
|
}
|
|
@@ -1412,6 +1421,7 @@ export {
|
|
|
1412
1421
|
GLOB_TSX,
|
|
1413
1422
|
GLOB_VUE,
|
|
1414
1423
|
GLOB_YAML,
|
|
1424
|
+
command,
|
|
1415
1425
|
comments,
|
|
1416
1426
|
defineConfig,
|
|
1417
1427
|
getVueVersion,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"packageManager": "pnpm@9.4.0",
|
|
6
6
|
"description": "ESLint flat config of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@types/eslint": "^8.56.10",
|
|
57
57
|
"@unocss/eslint-plugin": "^0.61.0",
|
|
58
58
|
"eslint-config-prettier": "^9.1.0",
|
|
59
|
+
"eslint-plugin-command": "^0.2.3",
|
|
59
60
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
60
61
|
"eslint-plugin-import-x": "^0.5.2",
|
|
61
62
|
"eslint-plugin-jsdoc": "^48.5.0",
|