@w0s/eslint-config 9.1.0 → 9.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/README.md CHANGED
@@ -1,49 +1,49 @@
1
- # eslint-config
2
-
3
- [![npm version](https://badge.fury.io/js/%40w0s%2Feslint-config.svg)](https://www.npmjs.com/package/@w0s/eslint-config)
4
- [![Workflow status](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml/badge.svg)](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml)
5
-
6
- ESLint configuration file used on my personal website ([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp)).
7
-
8
- ## Base rules & plugins
9
-
10
- ### All files (Vanilla JavaScript, etc.)
11
-
12
- - [eslint:recommended](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-eslintrecommended)
13
- - [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import):recommended
14
- - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc):recommended
15
- - [eslint-plugin-safely-storage](https://github.com/SaekiTominaga/eslint-plugin/tree/main/packages/safely-storage)
16
- - and, some customizations
17
-
18
- ### TypeScript
19
-
20
- - [@typescript-eslint/eslint-plugin:strict-type-checked](https://typescript-eslint.io/users/configs/#strict-type-checked)
21
- - [@typescript-eslint/eslint-plugin:stylistic-type-checked](https://typescript-eslint.io/users/configs/#stylistic-type-checked)
22
- - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/):recommended-typescript
23
- - and, some customizations
24
-
25
- ## Usage
26
-
27
- ```javascript
28
- import w0sConfig from '@w0s/eslint-config';
29
-
30
- /** @type {import("eslint").Linter.Config[]} */
31
- export default [
32
- ...w0sConfig,
33
- {
34
- // other options
35
- },
36
- ];
37
- ```
38
-
39
- or
40
-
41
- ```javascript
42
- import { defineConfig } from 'eslint/config';
43
- import w0sConfig from '@w0s/eslint-config';
44
-
45
- /** @type {import("eslint").Linter.Config[]} */
46
- export default defineConfig(w0sConfig, {
47
- // other options
48
- });
49
- ```
1
+ # eslint-config
2
+
3
+ [![npm version](https://badge.fury.io/js/%40w0s%2Feslint-config.svg)](https://www.npmjs.com/package/@w0s/eslint-config)
4
+ [![Workflow status](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml/badge.svg)](https://github.com/SaekiTominaga/w0s/actions/workflows/eslint.yml)
5
+
6
+ ESLint configuration file used on my personal website ([`w0s.jp`](https://github.com/SaekiTominaga/w0s.jp)).
7
+
8
+ ## Base rules & plugins
9
+
10
+ ### All files (Vanilla JavaScript, etc.)
11
+
12
+ - [eslint:recommended](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-eslintrecommended)
13
+ - [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import):recommended
14
+ - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc):recommended
15
+ - [eslint-plugin-safely-storage](https://github.com/SaekiTominaga/eslint-plugin/tree/main/packages/safely-storage)
16
+ - and, some customizations
17
+
18
+ ### TypeScript
19
+
20
+ - [@typescript-eslint/eslint-plugin:strict-type-checked](https://typescript-eslint.io/users/configs/#strict-type-checked)
21
+ - [@typescript-eslint/eslint-plugin:stylistic-type-checked](https://typescript-eslint.io/users/configs/#stylistic-type-checked)
22
+ - [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/):recommended-typescript
23
+ - and, some customizations
24
+
25
+ ## Usage
26
+
27
+ ```javascript
28
+ import w0sConfig from '@w0s/eslint-config';
29
+
30
+ /** @type {import("eslint").Linter.Config[]} */
31
+ export default [
32
+ ...w0sConfig,
33
+ {
34
+ // other options
35
+ },
36
+ ];
37
+ ```
38
+
39
+ or
40
+
41
+ ```javascript
42
+ import { defineConfig } from 'eslint/config';
43
+ import w0sConfig from '@w0s/eslint-config';
44
+
45
+ /** @type {import("eslint").Linter.Config[]} */
46
+ export default defineConfig(w0sConfig, {
47
+ // other options
48
+ });
49
+ ```
package/eslint.config.js CHANGED
@@ -1,97 +1,97 @@
1
- // @ts-check
2
-
3
- // eslint-disable-next-line import/no-unresolved
4
- import { defineConfig } from 'eslint/config';
5
- import pluginImport from 'eslint-plugin-import';
6
- import { jsdoc as pluginJsdoc } from 'eslint-plugin-jsdoc';
7
- import pluginSafelyStorage from 'eslint-plugin-safely-storage';
8
- import globals from 'globals';
9
- // eslint-disable-next-line import/no-unresolved
10
- import tseslint from 'typescript-eslint';
11
- import eslint from '@eslint/js';
12
- import configEslintLayoutFormatting from './rules/eslint/layout&formatting.js';
13
- import configEslintPossibleProblems from './rules/eslint/possible-problems.js';
14
- import configEslintSuggestions from './rules/eslint/suggestions.js';
15
- import configImport from './rules/import.js';
16
- import configJsdoc from './rules/jsdoc.js';
17
-
18
- export default defineConfig(
19
- eslint.configs.recommended,
20
- configEslintPossibleProblems,
21
- configEslintSuggestions,
22
- configEslintLayoutFormatting,
23
-
24
- /* Plugins */
25
- pluginImport.flatConfigs.recommended,
26
- configImport,
27
-
28
- pluginJsdoc({ config: 'flat/recommended' }),
29
- configJsdoc,
30
-
31
- pluginSafelyStorage.configs.default,
32
-
33
- {
34
- files: ['**/*.js'],
35
- languageOptions: {
36
- ecmaVersion: 'latest', // デフォルト値は 'latest' だが明示的な指定が必要
37
- globals: globals.nodeBuiltin,
38
- },
39
- },
40
- {
41
- files: ['**/*.ts'],
42
- languageOptions: {
43
- parserOptions: {
44
- project: true,
45
- },
46
- },
47
- extends: [tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked, pluginJsdoc({ config: 'flat/recommended-typescript' })],
48
- rules: {
49
- 'dot-notation': 'off',
50
- 'no-unused-vars': 'off',
51
- 'import/extensions': [
52
- 'error',
53
- 'ignorePackages',
54
- {
55
- js: 'never',
56
- },
57
- ],
58
- 'import/no-unresolved': 'off',
59
- '@typescript-eslint/no-unused-vars': [
60
- 'error',
61
- {
62
- caughtErrors: 'none',
63
- },
64
- ],
65
- '@typescript-eslint/strict-boolean-expressions': [
66
- 'error',
67
- {
68
- allowNullableBoolean: true,
69
- allowNullableObject: false,
70
- allowNumber: false,
71
- allowString: false,
72
- },
73
- ],
74
- },
75
- },
76
- {
77
- files: ['**/*.config.js'],
78
- rules: {
79
- 'import/no-extraneous-dependencies': 'off',
80
- },
81
- },
82
- {
83
- files: ['**/*.test.js', '**/*.test.ts'],
84
- rules: {
85
- 'no-new': 'off',
86
- 'no-unused-expressions': 'off',
87
- 'import/no-extraneous-dependencies': 'off',
88
- },
89
- },
90
- {
91
- files: ['**/*.test.ts'],
92
- rules: {
93
- '@typescript-eslint/no-non-null-assertion': 'off',
94
- '@typescript-eslint/no-unnecessary-type-assertion': 'off',
95
- },
96
- },
97
- );
1
+ // @ts-check
2
+
3
+ // eslint-disable-next-line import/no-unresolved
4
+ import { defineConfig } from 'eslint/config';
5
+ import pluginImport from 'eslint-plugin-import';
6
+ import { jsdoc as pluginJsdoc } from 'eslint-plugin-jsdoc';
7
+ import pluginSafelyStorage from 'eslint-plugin-safely-storage';
8
+ import globals from 'globals';
9
+ // eslint-disable-next-line import/no-unresolved
10
+ import tseslint from 'typescript-eslint';
11
+ import eslint from '@eslint/js';
12
+ import configEslintLayoutFormatting from './rules/eslint/layout&formatting.js';
13
+ import configEslintPossibleProblems from './rules/eslint/possible-problems.js';
14
+ import configEslintSuggestions from './rules/eslint/suggestions.js';
15
+ import configImport from './rules/import.js';
16
+ import configJsdoc from './rules/jsdoc.js';
17
+
18
+ export default defineConfig(
19
+ eslint.configs.recommended,
20
+ configEslintPossibleProblems,
21
+ configEslintSuggestions,
22
+ configEslintLayoutFormatting,
23
+
24
+ /* Plugins */
25
+ pluginImport.flatConfigs.recommended,
26
+ configImport,
27
+
28
+ pluginJsdoc({ config: 'flat/recommended' }),
29
+ configJsdoc,
30
+
31
+ pluginSafelyStorage.configs.default,
32
+
33
+ {
34
+ files: ['**/*.js'],
35
+ languageOptions: {
36
+ ecmaVersion: 'latest', // デフォルト値は 'latest' だが明示的な指定が必要
37
+ globals: globals.nodeBuiltin,
38
+ },
39
+ },
40
+ {
41
+ files: ['**/*.ts'],
42
+ languageOptions: {
43
+ parserOptions: {
44
+ project: true,
45
+ },
46
+ },
47
+ extends: [tseslint.configs.strictTypeChecked, tseslint.configs.stylisticTypeChecked, pluginJsdoc({ config: 'flat/recommended-typescript' })],
48
+ rules: {
49
+ 'dot-notation': 'off',
50
+ 'no-unused-vars': 'off',
51
+ 'import/extensions': [
52
+ 'error',
53
+ 'ignorePackages',
54
+ {
55
+ js: 'never',
56
+ },
57
+ ],
58
+ 'import/no-unresolved': 'off',
59
+ '@typescript-eslint/no-unused-vars': [
60
+ 'error',
61
+ {
62
+ caughtErrors: 'none',
63
+ },
64
+ ],
65
+ '@typescript-eslint/strict-boolean-expressions': [
66
+ 'error',
67
+ {
68
+ allowNullableBoolean: true,
69
+ allowNullableObject: false,
70
+ allowNumber: false,
71
+ allowString: false,
72
+ },
73
+ ],
74
+ },
75
+ },
76
+ {
77
+ files: ['**/*.config.js'],
78
+ rules: {
79
+ 'import/no-extraneous-dependencies': 'off',
80
+ },
81
+ },
82
+ {
83
+ files: ['**/*.test.js', '**/*.test.ts'],
84
+ rules: {
85
+ 'no-new': 'off',
86
+ 'no-unused-expressions': 'off',
87
+ 'import/no-extraneous-dependencies': 'off',
88
+ },
89
+ },
90
+ {
91
+ files: ['**/*.test.ts'],
92
+ rules: {
93
+ '@typescript-eslint/no-non-null-assertion': 'off',
94
+ '@typescript-eslint/no-unnecessary-type-assertion': 'off',
95
+ },
96
+ },
97
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w0s/eslint-config",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "description": "ESLint configuration file used on `w0s.jp`",
5
5
  "keywords": [
6
6
  "eslint",
@@ -25,19 +25,19 @@
25
25
  "lint": "eslint __tests__/valid/**/*.{js,ts} __tests__/*.test.js rules/**/*.js eslint.config.js"
26
26
  },
27
27
  "dependencies": {
28
- "@eslint/js": "^9.35.0",
28
+ "@eslint/js": "^9.37.0",
29
29
  "eslint-plugin-import": "^2.32.0",
30
- "eslint-plugin-jsdoc": "^57.0.8",
30
+ "eslint-plugin-jsdoc": "^60.8.3",
31
31
  "eslint-plugin-safely-storage": "^1.0.2",
32
32
  "globals": "^16.4.0",
33
- "typescript-eslint": "^8.43.0"
33
+ "typescript-eslint": "^8.46.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/node": "^24.4.0",
37
- "eslint": "^9.35.0"
36
+ "@types/node": "^24.7.0",
37
+ "eslint": "^9.37.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "eslint": "^9.23.0"
40
+ "eslint": "^9.35.0"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"
@@ -10,6 +10,7 @@ export default {
10
10
  'no-await-in-loop': 'error', // eslint-config-airbnb-base@15.0.0; errors
11
11
  'no-cond-assign': ['error', 'always'], // eslint-config-airbnb-base@15.0.0; errors
12
12
  'no-console': 'warn', // eslint-config-airbnb-base@15.0.0; errors
13
+ 'no-continue': 'error', // eslint-config-airbnb-base@15.0.0; style
13
14
  'no-constructor-return': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
14
15
  'no-irregular-whitespace': [
15
16
  'error',
@@ -22,6 +23,7 @@ export default {
22
23
  'no-promise-executor-return': 'error', // eslint-config-airbnb-base@15.0.0; errors
23
24
  'no-self-compare': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
24
25
  'no-template-curly-in-string': 'error', // eslint-config-airbnb-base@15.0.0; errors
26
+ 'no-unassigned-vars': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
25
27
  'no-unmodified-loop-condition': 'error',
26
28
  'no-unsafe-optional-chaining': [
27
29
  'error',
@@ -35,6 +37,7 @@ export default {
35
37
  caughtErrors: 'none',
36
38
  },
37
39
  ],
40
+ 'no-useless-assignment': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
38
41
  'valid-typeof': [
39
42
  'error',
40
43
  {
@@ -28,7 +28,6 @@ export default {
28
28
  'no-array-constructor': 'error', // eslint-config-airbnb-base@15.0.0; style
29
29
  'no-bitwise': 'error', // eslint-config-airbnb-base@15.0.0; style
30
30
  'no-caller': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
31
- 'no-continue': 'error', // eslint-config-airbnb-base@15.0.0; style
32
31
  'no-else-return': 'error',
33
32
  'no-empty': [
34
33
  'error',
@@ -138,6 +137,7 @@ export default {
138
137
  'prefer-rest-params': 'error', // eslint-config-airbnb-base@15.0.0; es6
139
138
  'prefer-spread': 'error', // eslint-config-airbnb-base@15.0.0; es6
140
139
  'prefer-template': 'error', // eslint-config-airbnb-base@15.0.0; es6
140
+ 'preserve-caught-error': 'error', // ESLint 10 recommended candidate https://github.com/eslint/eslint/issues/19966
141
141
  radix: 'error', // eslint-config-airbnb-base@15.0.0; best-practices
142
142
  'require-await': 'error',
143
143
  'require-unicode-regexp': 'error',