@abinnovision/eslint-config-base 2.1.2 → 2.2.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +18 -3
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +18 -3
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/abinnovision/js-commons/compare/eslint-config-base-v2.1.2...eslint-config-base-v2.2.0) (2024-10-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **eslint:** add unused-imports plugin and update rules ([#356](https://github.com/abinnovision/js-commons/issues/356)) ([303352c](https://github.com/abinnovision/js-commons/commit/303352c986709a06ec7a02aff322ce2e5dcf7342))
|
|
9
|
+
|
|
3
10
|
## [2.1.2](https://github.com/abinnovision/js-commons/compare/eslint-config-base-v2.1.1...eslint-config-base-v2.1.2) (2024-10-16)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.cjs
CHANGED
|
@@ -35,13 +35,13 @@ __export(src_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(src_exports);
|
|
36
36
|
var import_base = __toESM(require("eslint-config-alloy/base.js"), 1);
|
|
37
37
|
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
|
|
38
|
+
var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
|
|
38
39
|
var config = [
|
|
39
40
|
{
|
|
40
41
|
files: ["**/*.{ts,tsx,js,jsx}"],
|
|
41
42
|
languageOptions: {
|
|
42
43
|
ecmaVersion: "latest"
|
|
43
44
|
},
|
|
44
|
-
ignores: [".next", "dist", ".wrangler", ".vercel", ".turbo", ".yarn"],
|
|
45
45
|
plugins: {
|
|
46
46
|
/**
|
|
47
47
|
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
@@ -49,7 +49,8 @@ var config = [
|
|
|
49
49
|
*
|
|
50
50
|
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
51
51
|
*/
|
|
52
|
-
import: import_eslint_plugin_import.default
|
|
52
|
+
import: import_eslint_plugin_import.default,
|
|
53
|
+
"unused-imports": import_eslint_plugin_unused_imports.default
|
|
53
54
|
},
|
|
54
55
|
rules: {
|
|
55
56
|
/**
|
|
@@ -104,7 +105,21 @@ var config = [
|
|
|
104
105
|
/**
|
|
105
106
|
* Disable the "no-return-await" rule.
|
|
106
107
|
*/
|
|
107
|
-
"no-return-await": "off"
|
|
108
|
+
"no-return-await": "off",
|
|
109
|
+
/**
|
|
110
|
+
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
111
|
+
*/
|
|
112
|
+
"no-unused-vars": "off",
|
|
113
|
+
"unused-imports/no-unused-imports": "error",
|
|
114
|
+
"unused-imports/no-unused-vars": [
|
|
115
|
+
"warn",
|
|
116
|
+
{
|
|
117
|
+
vars: "all",
|
|
118
|
+
varsIgnorePattern: "^_",
|
|
119
|
+
args: "after-used",
|
|
120
|
+
argsIgnorePattern: "^_"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
108
123
|
}
|
|
109
124
|
}
|
|
110
125
|
];
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as eslint from 'eslint';
|
|
2
|
+
|
|
1
3
|
declare const config: {
|
|
2
4
|
files: string[];
|
|
3
5
|
languageOptions: {
|
|
4
6
|
ecmaVersion: "latest";
|
|
5
7
|
};
|
|
6
|
-
ignores: string[];
|
|
7
8
|
plugins: {
|
|
8
9
|
/**
|
|
9
10
|
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
@@ -12,6 +13,7 @@ declare const config: {
|
|
|
12
13
|
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
13
14
|
*/
|
|
14
15
|
import: Plugin;
|
|
16
|
+
"unused-imports": eslint.ESLint.Plugin;
|
|
15
17
|
};
|
|
16
18
|
rules: {
|
|
17
19
|
/**
|
|
@@ -54,6 +56,17 @@ declare const config: {
|
|
|
54
56
|
* Disable the "no-return-await" rule.
|
|
55
57
|
*/
|
|
56
58
|
"no-return-await": "off";
|
|
59
|
+
/**
|
|
60
|
+
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
61
|
+
*/
|
|
62
|
+
"no-unused-vars": "off";
|
|
63
|
+
"unused-imports/no-unused-imports": "error";
|
|
64
|
+
"unused-imports/no-unused-vars": ["warn", {
|
|
65
|
+
vars: string;
|
|
66
|
+
varsIgnorePattern: string;
|
|
67
|
+
args: string;
|
|
68
|
+
argsIgnorePattern: string;
|
|
69
|
+
}];
|
|
57
70
|
};
|
|
58
71
|
}[];
|
|
59
72
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as eslint from 'eslint';
|
|
2
|
+
|
|
1
3
|
declare const config: {
|
|
2
4
|
files: string[];
|
|
3
5
|
languageOptions: {
|
|
4
6
|
ecmaVersion: "latest";
|
|
5
7
|
};
|
|
6
|
-
ignores: string[];
|
|
7
8
|
plugins: {
|
|
8
9
|
/**
|
|
9
10
|
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
@@ -12,6 +13,7 @@ declare const config: {
|
|
|
12
13
|
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
13
14
|
*/
|
|
14
15
|
import: Plugin;
|
|
16
|
+
"unused-imports": eslint.ESLint.Plugin;
|
|
15
17
|
};
|
|
16
18
|
rules: {
|
|
17
19
|
/**
|
|
@@ -54,6 +56,17 @@ declare const config: {
|
|
|
54
56
|
* Disable the "no-return-await" rule.
|
|
55
57
|
*/
|
|
56
58
|
"no-return-await": "off";
|
|
59
|
+
/**
|
|
60
|
+
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
61
|
+
*/
|
|
62
|
+
"no-unused-vars": "off";
|
|
63
|
+
"unused-imports/no-unused-imports": "error";
|
|
64
|
+
"unused-imports/no-unused-vars": ["warn", {
|
|
65
|
+
vars: string;
|
|
66
|
+
varsIgnorePattern: string;
|
|
67
|
+
args: string;
|
|
68
|
+
argsIgnorePattern: string;
|
|
69
|
+
}];
|
|
57
70
|
};
|
|
58
71
|
}[];
|
|
59
72
|
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import AlloyBase from "eslint-config-alloy/base.js";
|
|
3
3
|
import eslintPluginImport from "eslint-plugin-import";
|
|
4
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
4
5
|
var config = [
|
|
5
6
|
{
|
|
6
7
|
files: ["**/*.{ts,tsx,js,jsx}"],
|
|
7
8
|
languageOptions: {
|
|
8
9
|
ecmaVersion: "latest"
|
|
9
10
|
},
|
|
10
|
-
ignores: [".next", "dist", ".wrangler", ".vercel", ".turbo", ".yarn"],
|
|
11
11
|
plugins: {
|
|
12
12
|
/**
|
|
13
13
|
* eslint-plugin-import is not yet compatible with ESLint v9.
|
|
@@ -15,7 +15,8 @@ var config = [
|
|
|
15
15
|
*
|
|
16
16
|
* @see https://github.com/import-js/eslint-plugin-import/issues/2948
|
|
17
17
|
*/
|
|
18
|
-
import: eslintPluginImport
|
|
18
|
+
import: eslintPluginImport,
|
|
19
|
+
"unused-imports": unusedImports
|
|
19
20
|
},
|
|
20
21
|
rules: {
|
|
21
22
|
/**
|
|
@@ -70,7 +71,21 @@ var config = [
|
|
|
70
71
|
/**
|
|
71
72
|
* Disable the "no-return-await" rule.
|
|
72
73
|
*/
|
|
73
|
-
"no-return-await": "off"
|
|
74
|
+
"no-return-await": "off",
|
|
75
|
+
/**
|
|
76
|
+
* Disable the "no-unused-vars" rule as unused-imports is used instead.
|
|
77
|
+
*/
|
|
78
|
+
"no-unused-vars": "off",
|
|
79
|
+
"unused-imports/no-unused-imports": "error",
|
|
80
|
+
"unused-imports/no-unused-vars": [
|
|
81
|
+
"warn",
|
|
82
|
+
{
|
|
83
|
+
vars: "all",
|
|
84
|
+
varsIgnorePattern: "^_",
|
|
85
|
+
args: "after-used",
|
|
86
|
+
argsIgnorePattern: "^_"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
74
89
|
}
|
|
75
90
|
}
|
|
76
91
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abinnovision/eslint-config-base",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/abinnovision/js-commons"
|
|
@@ -43,12 +43,13 @@
|
|
|
43
43
|
"prettier": "@abinnovision/prettier-config",
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"eslint-config-alloy": "^5.1.2",
|
|
46
|
-
"eslint-plugin-import": "^2.31.0"
|
|
46
|
+
"eslint-plugin-import": "^2.31.0",
|
|
47
|
+
"eslint-plugin-unused-imports": "^4.1.4"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@abinnovision/prettier-config": "^2.1.3",
|
|
50
51
|
"@types/eslint": "^9.6.1",
|
|
51
|
-
"eslint": "^9.
|
|
52
|
+
"eslint": "^9.13.0",
|
|
52
53
|
"globals": "^15.11.0",
|
|
53
54
|
"prettier": "^3.3.3",
|
|
54
55
|
"tsup": "^8.3.0"
|