@kouts/eslint-config 1.3.23 → 2.0.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/dist/index.cjs +7 -38
- package/dist/index.js +7 -38
- package/package.json +9 -10
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var pluginVitest = require('@vitest/eslint-plugin');
|
|
4
4
|
var pluginHtml = require('eslint-plugin-html');
|
|
5
|
-
var pluginImport = require('eslint-plugin-import-x');
|
|
6
5
|
var pluginPrettier = require('eslint-plugin-prettier/recommended');
|
|
7
6
|
var pluginSimpleImportSort = require('eslint-plugin-simple-import-sort');
|
|
8
7
|
var neostandard = require('neostandard');
|
|
@@ -13,7 +12,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
var name = "@eslint/js";
|
|
16
|
-
var version$1 = "9.
|
|
15
|
+
var version$1 = "9.17.0";
|
|
17
16
|
var description = "ESLint JavaScript language implementation";
|
|
18
17
|
var main = "./src/index.js";
|
|
19
18
|
var types = "./types/index.d.ts";
|
|
@@ -478,19 +477,6 @@ const vue = (options) => {
|
|
|
478
477
|
return config;
|
|
479
478
|
};
|
|
480
479
|
|
|
481
|
-
const pluginImportTypescript = Object.keys(pluginImport.flatConfigs.typescript).reduce(
|
|
482
|
-
(acc, key) => ({
|
|
483
|
-
...acc,
|
|
484
|
-
[key]: Object.keys(pluginImport.flatConfigs.typescript[key]).reduce(
|
|
485
|
-
(innerAcc, curr) => ({
|
|
486
|
-
...innerAcc,
|
|
487
|
-
[curr.replace("import-x", "import")]: pluginImport.flatConfigs.typescript[key][curr]
|
|
488
|
-
}),
|
|
489
|
-
{}
|
|
490
|
-
)
|
|
491
|
-
}),
|
|
492
|
-
{}
|
|
493
|
-
);
|
|
494
480
|
const config = (options) => {
|
|
495
481
|
const opts = {
|
|
496
482
|
noJsx: true,
|
|
@@ -538,32 +524,15 @@ const config = (options) => {
|
|
|
538
524
|
],
|
|
539
525
|
// Console and debugger settings depending whether we're on production or not
|
|
540
526
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
541
|
-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
|
|
542
|
-
|
|
543
|
-
},
|
|
544
|
-
// Import
|
|
545
|
-
{
|
|
546
|
-
name: "kouts/import",
|
|
547
|
-
plugins: {
|
|
548
|
-
import: pluginImport
|
|
549
|
-
},
|
|
550
|
-
...opts.ts ? pluginImportTypescript : {},
|
|
551
|
-
rules: {
|
|
552
|
-
// TypeScript compilation already ensures that named imports exist in the referenced module
|
|
553
|
-
// and has its own version of no-unused-vars
|
|
527
|
+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
528
|
+
// Import rules
|
|
554
529
|
...opts.ts ? {
|
|
555
|
-
"import/named": "off",
|
|
530
|
+
"import-x/named": "off",
|
|
556
531
|
"no-unused-vars": "off"
|
|
557
532
|
} : {},
|
|
558
|
-
"import/
|
|
559
|
-
"import/
|
|
560
|
-
"import/no-
|
|
561
|
-
"import/no-mutable-exports": "error",
|
|
562
|
-
"import/no-named-default": "error",
|
|
563
|
-
"import/no-self-import": "error",
|
|
564
|
-
"import/no-webpack-loader-syntax": "error",
|
|
565
|
-
"import/no-absolute-path": ["error", { esmodule: true, commonjs: true, amd: false }],
|
|
566
|
-
"import/newline-after-import": ["error", { count: 1 }]
|
|
533
|
+
"import-x/no-mutable-exports": "error",
|
|
534
|
+
"import-x/newline-after-import": ["error", { count: 1 }],
|
|
535
|
+
"import-x/no-self-import": "error"
|
|
567
536
|
}
|
|
568
537
|
},
|
|
569
538
|
// Sort imports
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import pluginVitest from '@vitest/eslint-plugin';
|
|
2
2
|
import pluginHtml from 'eslint-plugin-html';
|
|
3
|
-
import pluginImport from 'eslint-plugin-import-x';
|
|
4
3
|
import pluginPrettier from 'eslint-plugin-prettier/recommended';
|
|
5
4
|
import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
6
5
|
import neostandard, { plugins, resolveIgnoresFromGitignore } from 'neostandard';
|
|
@@ -12,7 +11,7 @@ function getDefaultExportFromCjs (x) {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
var name = "@eslint/js";
|
|
15
|
-
var version$1 = "9.
|
|
14
|
+
var version$1 = "9.17.0";
|
|
16
15
|
var description = "ESLint JavaScript language implementation";
|
|
17
16
|
var main = "./src/index.js";
|
|
18
17
|
var types = "./types/index.d.ts";
|
|
@@ -477,19 +476,6 @@ const vue = (options) => {
|
|
|
477
476
|
return config;
|
|
478
477
|
};
|
|
479
478
|
|
|
480
|
-
const pluginImportTypescript = Object.keys(pluginImport.flatConfigs.typescript).reduce(
|
|
481
|
-
(acc, key) => ({
|
|
482
|
-
...acc,
|
|
483
|
-
[key]: Object.keys(pluginImport.flatConfigs.typescript[key]).reduce(
|
|
484
|
-
(innerAcc, curr) => ({
|
|
485
|
-
...innerAcc,
|
|
486
|
-
[curr.replace("import-x", "import")]: pluginImport.flatConfigs.typescript[key][curr]
|
|
487
|
-
}),
|
|
488
|
-
{}
|
|
489
|
-
)
|
|
490
|
-
}),
|
|
491
|
-
{}
|
|
492
|
-
);
|
|
493
479
|
const config = (options) => {
|
|
494
480
|
const opts = {
|
|
495
481
|
noJsx: true,
|
|
@@ -537,32 +523,15 @@ const config = (options) => {
|
|
|
537
523
|
],
|
|
538
524
|
// Console and debugger settings depending whether we're on production or not
|
|
539
525
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
540
|
-
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
|
|
541
|
-
|
|
542
|
-
},
|
|
543
|
-
// Import
|
|
544
|
-
{
|
|
545
|
-
name: "kouts/import",
|
|
546
|
-
plugins: {
|
|
547
|
-
import: pluginImport
|
|
548
|
-
},
|
|
549
|
-
...opts.ts ? pluginImportTypescript : {},
|
|
550
|
-
rules: {
|
|
551
|
-
// TypeScript compilation already ensures that named imports exist in the referenced module
|
|
552
|
-
// and has its own version of no-unused-vars
|
|
526
|
+
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
|
527
|
+
// Import rules
|
|
553
528
|
...opts.ts ? {
|
|
554
|
-
"import/named": "off",
|
|
529
|
+
"import-x/named": "off",
|
|
555
530
|
"no-unused-vars": "off"
|
|
556
531
|
} : {},
|
|
557
|
-
"import/
|
|
558
|
-
"import/
|
|
559
|
-
"import/no-
|
|
560
|
-
"import/no-mutable-exports": "error",
|
|
561
|
-
"import/no-named-default": "error",
|
|
562
|
-
"import/no-self-import": "error",
|
|
563
|
-
"import/no-webpack-loader-syntax": "error",
|
|
564
|
-
"import/no-absolute-path": ["error", { esmodule: true, commonjs: true, amd: false }],
|
|
565
|
-
"import/newline-after-import": ["error", { count: 1 }]
|
|
532
|
+
"import-x/no-mutable-exports": "error",
|
|
533
|
+
"import-x/newline-after-import": ["error", { count: 1 }],
|
|
534
|
+
"import-x/no-self-import": "error"
|
|
566
535
|
}
|
|
567
536
|
},
|
|
568
537
|
// Sort imports
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kouts/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
5
|
-
"packageManager": "pnpm@9.
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"packageManager": "pnpm@9.15.0",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
|
8
8
|
},
|
|
@@ -70,25 +70,24 @@
|
|
|
70
70
|
"url": "git+https://github.com/kouts/eslint-config.git"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@vitest/eslint-plugin": "^1.1.
|
|
73
|
+
"@vitest/eslint-plugin": "^1.1.16",
|
|
74
74
|
"eslint-config-prettier": "^9.1.0",
|
|
75
75
|
"eslint-plugin-html": "^8.1.2",
|
|
76
|
-
"eslint-plugin-import-x": "^4.4.3",
|
|
77
76
|
"eslint-plugin-prettier": "^5.2.1",
|
|
78
77
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
79
|
-
"eslint-plugin-vue": "^9.
|
|
80
|
-
"neostandard": "^0.
|
|
78
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
79
|
+
"neostandard": "^0.12.0",
|
|
81
80
|
"prettier": "^3.3.3"
|
|
82
81
|
},
|
|
83
82
|
"devDependencies": {
|
|
84
|
-
"@commitlint/cli": "^19.6.
|
|
83
|
+
"@commitlint/cli": "^19.6.1",
|
|
85
84
|
"@commitlint/config-conventional": "^19.6.0",
|
|
86
85
|
"@semantic-release/changelog": "^6.0.3",
|
|
87
86
|
"@semantic-release/git": "^10.0.1",
|
|
88
|
-
"@types/node": "^22.10.
|
|
89
|
-
"eslint": "^9.
|
|
87
|
+
"@types/node": "^22.10.2",
|
|
88
|
+
"eslint": "^9.17.0",
|
|
90
89
|
"husky": "^9.1.7",
|
|
91
|
-
"lint-staged": "^15.2.
|
|
90
|
+
"lint-staged": "^15.2.11",
|
|
92
91
|
"pkgroll": "^2.5.1",
|
|
93
92
|
"semantic-release": "^24.2.0",
|
|
94
93
|
"typescript": "^5.5.4"
|