@w0s/eslint-config 7.0.0-rc.5 → 7.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/eslint.config.js CHANGED
@@ -80,4 +80,12 @@ export default tseslint.config(
80
80
  'import/no-extraneous-dependencies': 'off',
81
81
  },
82
82
  },
83
+ {
84
+ files: ['**/*.test.js', '**/*.test.ts'],
85
+ rules: {
86
+ 'no-new': 'off',
87
+ 'no-unused-expressions': 'off',
88
+ 'import/no-extraneous-dependencies': 'off',
89
+ },
90
+ },
83
91
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w0s/eslint-config",
3
- "version": "7.0.0-rc.5",
3
+ "version": "7.0.0",
4
4
  "description": "ESLint configuration file used on `w0s.jp`",
5
5
  "keywords": [
6
6
  "eslint",
@@ -3,6 +3,13 @@
3
3
  /** @type {import("eslint").Linter.FlatConfig} */
4
4
  export default {
5
5
  rules: {
6
+ 'line-comment-position': [
7
+ 'error',
8
+ {
9
+ position: 'beside',
10
+ ignorePattern: '@ts-',
11
+ },
12
+ ],
6
13
  'unicode-bom': 'error',
7
14
  },
8
15
  };
@@ -20,8 +20,10 @@ export default {
20
20
  'dot-notation': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
21
21
  eqeqeq: 'error',
22
22
  'func-names': 'warn', // eslint-config-airbnb-base@15.0.0; style
23
+ 'func-style': 'error',
23
24
  'grouped-accessor-pairs': ['error', 'getBeforeSet'],
24
25
  'guard-for-in': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
26
+ 'logical-assignment-operators': 'error',
25
27
  'max-classes-per-file': 'error', // eslint-config-airbnb-base@15.0.0; best-practices
26
28
  'new-cap': 'error',
27
29
  'no-alert': 'warn', // eslint-config-airbnb-base@15.0.0; best-practices
package/rules/import.js CHANGED
@@ -3,9 +3,11 @@
3
3
  /** @type {import("eslint").Linter.FlatConfig} */
4
4
  export default {
5
5
  rules: {
6
- /* Helpful warnings */
7
- // import/export
8
- // import/no-deprecated TODO: parserPath or languageOptions.parser is required!
6
+ /**
7
+ * Helpful warnings
8
+ */
9
+ /* ✅ import/export */
10
+ /* import/no-deprecated TODO: parserPath or languageOptions.parser is required! */
9
11
  'import/no-empty-named-blocks': 'error',
10
12
  'import/no-extraneous-dependencies': [
11
13
  'error',
@@ -19,46 +21,52 @@ export default {
19
21
  'import/no-mutable-exports': 'error',
20
22
  'import/no-named-as-default': 'off', // ✅ TODO: parserPath or languageOptions.parser is required! / 有効にする際は *.test.js での無効化を検討
21
23
  'import/no-named-as-default-member': 'off', // ✅ TODO: parserPath or languageOptions.parser is required! / 有効にする際は *.test.js での無効化を検討
22
- // import/no-unused-modules
24
+ /* import/no-unused-modules */
23
25
 
24
- /* Module systems */
25
- // import/no-amd
26
- // import/no-commonjs
27
- // import/no-import-module-exports
28
- // import/no-nodejs-modules
29
- // import/unambiguous
26
+ /**
27
+ * Module systems
28
+ */
29
+ /* import/no-amd */
30
+ /* import/no-commonjs */
31
+ /* import/no-import-module-exports */
32
+ /* import/no-nodejs-modules */
33
+ /* import/unambiguous */
30
34
 
31
- /* Static analysis */
35
+ /**
36
+ * Static analysis
37
+ */
32
38
  'import/default': 'off', // ✅ TODO: parserPath or languageOptions.parser is required!
33
- // ✅ import/named
39
+ /* ✅ import/named */
34
40
  'import/namespace': 'off', // ✅ TODO: parserPath or languageOptions.parser is required!
35
41
  'import/no-absolute-path': 'error',
36
- // import/no-cycle ⚠ This rule is comparatively computationally expensive
37
- // import/no-dynamic-require
38
- // import/no-internal-modules
39
- // import/no-relative-packages
40
- // import/no-relative-parent-imports
41
- // import/no-restricted-paths
42
+ /* import/no-cycle ⚠ This rule is comparatively computationally expensive */
43
+ /* import/no-dynamic-require */
44
+ /* import/no-internal-modules */
45
+ /* import/no-relative-packages */
46
+ /* import/no-relative-parent-imports */
47
+ /* import/no-restricted-paths */
42
48
  'import/no-self-import': 'error',
43
- // ✅ import/no-unresolved
49
+ /* ✅ import/no-unresolved */
44
50
  'import/no-useless-path-segments': 'error',
45
51
  'import/no-webpack-loader-syntax': 'error',
46
52
 
47
- /* Style guide */
48
- // import/consistent-type-specifier-style
49
- // import/dynamic-import-chunkname
50
- // import/exports-last
53
+ /**
54
+ * Style guide
55
+ */
56
+ /* import/consistent-type-specifier-style */
57
+ /* import/dynamic-import-chunkname */
58
+ /* import/exports-last */
51
59
  'import/extensions': ['error', 'ignorePackages'],
52
60
  'import/first': 'error',
53
- // import/group-exports
54
- // import/max-dependencies
61
+ /* import/group-exports */
62
+ /* import/max-dependencies */
55
63
  'import/newline-after-import': 'error',
56
- // import/no-anonymous-default-export
57
- // import/no-default-export
58
- // ✅ import/no-duplicates
64
+ /* import/no-anonymous-default-export */
65
+ /* import/no-default-export */
66
+ /* ✅ import/no-duplicates */
59
67
  'import/no-named-default': 'error',
60
- // import/no-named-export
61
- // import/no-namespace
68
+ /* import/no-named-export */
69
+ /* import/no-namespace */
62
70
  'import/no-unassigned-import': 'error',
63
71
  'import/order': 'error',
64
72
  'import/prefer-default-export': 'error',