@w0s/eslint-config 7.3.1 → 8.0.1
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 +2 -2
- package/eslint.config.js +1 -3
- package/package.json +12 -11
- package/rules/eslint/layout&formatting.js +1 -3
- package/rules/eslint/possible-problems.js +1 -3
- package/rules/eslint/suggestions.js +1 -3
- package/rules/import.js +6 -7
- package/rules/jsdoc.js +1 -3
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# eslint-config
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@w0s/eslint-config)
|
|
4
|
-
[](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml)
|
|
5
5
|
|
|
6
6
|
ESLint configuration file used on my personal website ([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp)).
|
|
7
7
|
|
|
@@ -22,7 +22,7 @@ ESLint configuration file used on my personal website ([`w0s.jp`](https://github
|
|
|
22
22
|
```javascript
|
|
23
23
|
import w0sConfig from '@w0s/eslint-config';
|
|
24
24
|
|
|
25
|
-
/** @type {import("eslint").Linter.
|
|
25
|
+
/** @type {import("eslint").Linter.Config[]} */
|
|
26
26
|
export default [
|
|
27
27
|
...w0sConfig,
|
|
28
28
|
{
|
package/eslint.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@w0s/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "ESLint configuration file used on `w0s.jp`",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -21,22 +21,23 @@
|
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "node __tests__/index.test.js",
|
|
24
|
-
"
|
|
24
|
+
"prelint": "tsc",
|
|
25
|
+
"lint": "eslint __tests__/valid/**/*.{js,ts} __tests__/*.test.js rules/**/*.js eslint.config.js"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@eslint/js": "^
|
|
28
|
-
"eslint-plugin-import": "^2.
|
|
29
|
-
"eslint-plugin-jsdoc": "^50.
|
|
30
|
-
"globals": "^15.
|
|
31
|
-
"typescript-eslint": "^8.
|
|
28
|
+
"@eslint/js": "^9.12.0",
|
|
29
|
+
"eslint-plugin-import": "^2.31.0",
|
|
30
|
+
"eslint-plugin-jsdoc": "^50.3.1",
|
|
31
|
+
"globals": "^15.10.0",
|
|
32
|
+
"typescript-eslint": "^8.8.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@types/
|
|
35
|
-
"@types/node": "^22.
|
|
36
|
-
"eslint": "^
|
|
35
|
+
"@types/eslint__js": "^8.42.3",
|
|
36
|
+
"@types/node": "^22.7.4",
|
|
37
|
+
"eslint": "^9.12.0"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
|
-
"eslint": "^
|
|
40
|
+
"eslint": "^9.12.0"
|
|
40
41
|
},
|
|
41
42
|
"publishConfig": {
|
|
42
43
|
"access": "public"
|
package/rules/import.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
// @ts-check
|
|
2
1
|
/* eslint-disable jsdoc/lines-before-block */
|
|
3
2
|
|
|
4
|
-
/** @type {import("eslint").Linter.
|
|
3
|
+
/** @type {import("eslint").Linter.Config} */
|
|
5
4
|
export default {
|
|
6
5
|
rules: {
|
|
7
6
|
/**
|
|
8
7
|
* Helpful warnings
|
|
9
8
|
*/
|
|
10
9
|
/* ✅ import/export */
|
|
11
|
-
|
|
10
|
+
'import/no-deprecated': 'error',
|
|
12
11
|
'import/no-empty-named-blocks': 'error',
|
|
13
12
|
'import/no-extraneous-dependencies': [
|
|
14
13
|
'error',
|
|
@@ -20,8 +19,8 @@ export default {
|
|
|
20
19
|
},
|
|
21
20
|
],
|
|
22
21
|
'import/no-mutable-exports': 'error',
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
/* ✅ import/no-named-as-default */
|
|
23
|
+
/* ✅ import/no-named-as-default-member */
|
|
25
24
|
/* import/no-unused-modules */
|
|
26
25
|
|
|
27
26
|
/**
|
|
@@ -36,9 +35,9 @@ export default {
|
|
|
36
35
|
/**
|
|
37
36
|
* Static analysis
|
|
38
37
|
*/
|
|
39
|
-
|
|
38
|
+
/* ✅ import/default */
|
|
40
39
|
/* ✅ import/named */
|
|
41
|
-
|
|
40
|
+
/* ✅ import/namespace */
|
|
42
41
|
'import/no-absolute-path': 'error',
|
|
43
42
|
/* import/no-cycle ⚠ This rule is comparatively computationally expensive */
|
|
44
43
|
/* import/no-dynamic-require */
|