@kouts/eslint-config 1.3.7 → 1.3.8
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/dist/index.cjs +14 -0
- package/dist/index.js +14 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -422,6 +422,19 @@ const vue = (options) => {
|
|
|
422
422
|
return config;
|
|
423
423
|
};
|
|
424
424
|
|
|
425
|
+
const pluginImportTypescript = Object.keys(pluginImport.flatConfigs.typescript).reduce(
|
|
426
|
+
(acc, key) => ({
|
|
427
|
+
...acc,
|
|
428
|
+
[key]: Object.keys(pluginImport.flatConfigs.typescript[key]).reduce(
|
|
429
|
+
(innerAcc, curr) => ({
|
|
430
|
+
...innerAcc,
|
|
431
|
+
[curr.replace("import-x", "import")]: pluginImport.flatConfigs.typescript[key][curr]
|
|
432
|
+
}),
|
|
433
|
+
{}
|
|
434
|
+
)
|
|
435
|
+
}),
|
|
436
|
+
{}
|
|
437
|
+
);
|
|
425
438
|
const config = (options) => {
|
|
426
439
|
const opts = {
|
|
427
440
|
noJsx: true,
|
|
@@ -478,6 +491,7 @@ const config = (options) => {
|
|
|
478
491
|
plugins: {
|
|
479
492
|
import: pluginImport
|
|
480
493
|
},
|
|
494
|
+
...opts.ts ? pluginImportTypescript : {},
|
|
481
495
|
rules: {
|
|
482
496
|
"import/export": "error",
|
|
483
497
|
"import/first": "error",
|
package/dist/index.js
CHANGED
|
@@ -421,6 +421,19 @@ const vue = (options) => {
|
|
|
421
421
|
return config;
|
|
422
422
|
};
|
|
423
423
|
|
|
424
|
+
const pluginImportTypescript = Object.keys(pluginImport.flatConfigs.typescript).reduce(
|
|
425
|
+
(acc, key) => ({
|
|
426
|
+
...acc,
|
|
427
|
+
[key]: Object.keys(pluginImport.flatConfigs.typescript[key]).reduce(
|
|
428
|
+
(innerAcc, curr) => ({
|
|
429
|
+
...innerAcc,
|
|
430
|
+
[curr.replace("import-x", "import")]: pluginImport.flatConfigs.typescript[key][curr]
|
|
431
|
+
}),
|
|
432
|
+
{}
|
|
433
|
+
)
|
|
434
|
+
}),
|
|
435
|
+
{}
|
|
436
|
+
);
|
|
424
437
|
const config = (options) => {
|
|
425
438
|
const opts = {
|
|
426
439
|
noJsx: true,
|
|
@@ -477,6 +490,7 @@ const config = (options) => {
|
|
|
477
490
|
plugins: {
|
|
478
491
|
import: pluginImport
|
|
479
492
|
},
|
|
493
|
+
...opts.ts ? pluginImportTypescript : {},
|
|
480
494
|
rules: {
|
|
481
495
|
"import/export": "error",
|
|
482
496
|
"import/first": "error",
|