@w5s/eslint-config 2.0.3 → 2.0.4

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.
@@ -19,7 +19,7 @@ const config = dev_1.ESLintConfig.concat(imports_1.default,
19
19
  // mjs: 'never',
20
20
  },
21
21
  ],
22
- 'import/no-deprecated': 'off',
22
+ 'import/no-deprecated': 'off', // Performance issues
23
23
  'import/no-extraneous-dependencies': [
24
24
  'error',
25
25
  {
@@ -33,9 +33,9 @@ const config = dev_1.ESLintConfig.concat(imports_1.default,
33
33
  ],
34
34
  },
35
35
  ],
36
- 'import/no-named-as-default': 'off',
37
- 'import/no-unused-modules': 'off',
38
- 'import/prefer-default-export': 'off',
36
+ 'import/no-named-as-default': 'off', // Performance issues
37
+ 'import/no-unused-modules': 'off', // Performance issues
38
+ 'import/prefer-default-export': 'off', // Not aligned, default export does not bring sufficient semantic
39
39
  'import/unambiguous': dev_1.ESLintConfig.fixme('off'), // Disable because proposal still in progress
40
40
  },
41
41
  settings: {
@@ -3,13 +3,13 @@ const config = {
3
3
  extends: ['plugin:jsdoc/recommended'],
4
4
  plugins: ['jsdoc'],
5
5
  rules: {
6
- 'jsdoc/no-undefined-types': 'off',
6
+ 'jsdoc/no-undefined-types': 'off', // https://github.com/gajus/eslint-plugin-jsdoc/issues/839
7
7
  'jsdoc/require-hyphen-before-param-description': ['warn', 'always'],
8
8
  'jsdoc/require-jsdoc': 'off',
9
9
  'jsdoc/require-param-description': 'off',
10
10
  'jsdoc/require-returns': 'off',
11
11
  'jsdoc/tag-lines': ['warn', 'any', { startLines: 1 }],
12
- 'jsdoc/valid-types': 'off',
12
+ 'jsdoc/valid-types': 'off', // FIXME: reports lots of false positive
13
13
  strict: ['error', 'safe'],
14
14
  },
15
15
  settings: {
@@ -4,7 +4,7 @@ const config = dev_1.ESLintConfig.concat({
4
4
  extends: ['plugin:promise/recommended'],
5
5
  plugins: ['promise'],
6
6
  rules: {
7
- 'promise/prefer-await-to-callbacks': dev_1.ESLintConfig.fixme('error'),
7
+ 'promise/prefer-await-to-callbacks': dev_1.ESLintConfig.fixme('error'), // https://github.com/xjamundx/eslint-plugin-promise/issues/212
8
8
  'promise/prefer-await-to-then': 'error',
9
9
  },
10
10
  });
@@ -16,16 +16,16 @@ const config = dev_1.ESLintConfig.concat(recommended_js_1.default, {
16
16
  'unicorn/error-message': 'error',
17
17
  'unicorn/explicit-length-check': ['error', { 'non-zero': 'greater-than' }],
18
18
  'unicorn/filename-case': 'off',
19
- 'unicorn/import-index': 'off',
20
- 'unicorn/new-for-builtins': 'off',
19
+ 'unicorn/import-index': 'off', // Not playing well with ES Module
20
+ 'unicorn/new-for-builtins': 'off', // error, @see https://github.com/sindresorhus/eslint-plugin-unicorn/issues/122
21
21
  'unicorn/no-abusive-eslint-disable': 'error',
22
22
  'unicorn/no-array-instanceof': 'error',
23
23
  'unicorn/no-console-spaces': 'off',
24
- 'unicorn/no-fn-reference-in-iterator': 'off',
24
+ 'unicorn/no-fn-reference-in-iterator': 'off', // error ?
25
25
  'unicorn/no-for-loop': 'error',
26
26
  'unicorn/no-hex-escape': 'error',
27
27
  'unicorn/no-new-buffer': 'error',
28
- 'unicorn/no-null': 'off',
28
+ 'unicorn/no-null': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/612
29
29
  'unicorn/no-process-exit': 'off',
30
30
  'unicorn/no-unreadable-array-destructuring': 'off',
31
31
  'unicorn/no-unsafe-regex': 'error',
@@ -60,11 +60,11 @@ const config = dev_1.ESLintConfig.concat(recommended_js_1.default, {
60
60
  ],
61
61
  rules: {
62
62
  'unicorn/consistent-destructuring': 'off',
63
- 'unicorn/consistent-function-scoping': 'off',
64
- 'unicorn/no-array-callback-reference': 'off',
65
- 'unicorn/no-array-for-each': 'off',
66
- 'unicorn/no-array-method-this-argument': 'off',
67
- 'unicorn/no-array-reduce': 'off',
63
+ 'unicorn/consistent-function-scoping': 'off', // Too many false positive
64
+ 'unicorn/no-array-callback-reference': 'off', // Many false positive reported
65
+ 'unicorn/no-array-for-each': 'off', // This rule could change browser compatibility
66
+ 'unicorn/no-array-method-this-argument': 'off', // Many false positive reported
67
+ 'unicorn/no-array-reduce': 'off', // Array#reduce can be used
68
68
  'unicorn/no-object-as-default-parameter': 'off',
69
69
  'unicorn/prefer-default-parameters': 'off',
70
70
  'unicorn/prevent-abbreviations': 'off', // This rule is so dangerous : it potentially break code while fixing in many cases !!
@@ -19,6 +19,7 @@ const getGitignore = (prefix = '') => {
19
19
  const config = {
20
20
  ignorePatterns: [
21
21
  '!.*',
22
+ '.docusaurus',
22
23
  '.yarn',
23
24
  '.common/',
24
25
  '.config/package-lock.json',
@@ -41,7 +42,7 @@ const config = {
41
42
  '**/vendors/**',
42
43
  '*.min.*',
43
44
  '*.toml',
44
- '*.timestamp-*.mjs',
45
+ '*.timestamp-*.mjs', // esbuild/vite temporary files
45
46
  ...getGitignore(),
46
47
  ...getGitignore('android'),
47
48
  ...getGitignore('ios'),
@@ -11,7 +11,7 @@ const config = dev_1.ESLintConfig.concat({
11
11
  plugins: ['jest'],
12
12
  rules: {
13
13
  'jest/consistent-test-it': 'error',
14
- 'jest/expect-expect': 'off',
14
+ 'jest/expect-expect': 'off', // Disabled because it does not handle functions that does the expect
15
15
  'jest/no-alias-methods': 'error',
16
16
  'jest/prefer-spy-on': 'error',
17
17
  'jest/prefer-to-contain': 'error',
@@ -44,7 +44,7 @@ const config = dev_1.ESLintConfig.concat({
44
44
  */
45
45
  {
46
46
  rules: {
47
- '@typescript-eslint/dot-notation': dev_1.ESLintConfig.fixme(undefined),
47
+ '@typescript-eslint/dot-notation': dev_1.ESLintConfig.fixme(undefined), // eslint-plugin-jest seems to break this rule
48
48
  '@typescript-eslint/naming-convention': 'off',
49
49
  '@typescript-eslint/no-non-null-assertion': 'off',
50
50
  '@typescript-eslint/no-unsafe-assignment': 'off',
@@ -41,8 +41,8 @@ const config = {
41
41
  'license',
42
42
  'qna',
43
43
  'author',
44
- 'maintainers',
45
- 'contributors',
44
+ 'maintainers', // Key order (per item): name, email, url
45
+ 'contributors', // Key order (per item): name, email, url
46
46
  'publisher',
47
47
  'sideEffects',
48
48
  'type',
@@ -67,16 +67,16 @@ const config = {
67
67
  'assets',
68
68
  'bin',
69
69
  'man',
70
- 'directories',
71
- 'files',
70
+ 'directories', // Key order: lib, bin, man, doc, example, test
71
+ 'files', // Unique items
72
72
  'workspaces',
73
- 'binary',
74
- 'scripts',
75
- 'betterScripts',
73
+ 'binary', // Key order: module_name, module_path, remote_path, package_name, host
74
+ 'scripts', // Script sort
75
+ 'betterScripts', // Script sort
76
76
  'contributes',
77
- 'activationEvents',
78
- 'husky',
79
- 'simple-git-hooks',
77
+ 'activationEvents', // Unique items
78
+ 'husky', // Sorts the hooks field using git hook sort
79
+ 'simple-git-hooks', // Key sort using git hook sort
80
80
  'pre-commit',
81
81
  'commitlint',
82
82
  'lint-staged',
@@ -86,10 +86,10 @@ const config = {
86
86
  'babel',
87
87
  'browserslist',
88
88
  'xo',
89
- 'prettier',
90
- 'eslintConfig',
89
+ 'prettier', // Prettier sort
90
+ 'eslintConfig', // ESLint sort
91
91
  'eslintIgnore',
92
- 'npmpackagejsonlint',
92
+ 'npmpackagejsonlint', // Key sort (also recognizes: npmPackageJsonLintConfig, npmpkgjsonlint)
93
93
  'release',
94
94
  'remarkConfig',
95
95
  'stylelint',
@@ -101,9 +101,9 @@ const config = {
101
101
  'resolutions',
102
102
  'dependencies',
103
103
  'devDependencies',
104
- 'dependenciesMeta',
104
+ 'dependenciesMeta', // Key sort (deep)
105
105
  'peerDependencies',
106
- 'peerDependenciesMeta',
106
+ 'peerDependenciesMeta', // Key sort (deep)
107
107
  'optionalDependencies',
108
108
  'bundledDependencies',
109
109
  'bundleDependencies',
@@ -113,14 +113,14 @@ const config = {
113
113
  'packageManager',
114
114
  'engines',
115
115
  'engineStrict',
116
- 'volta',
116
+ 'volta', // Key order: node, npm, yarn
117
117
  'languageName',
118
118
  'os',
119
119
  'cpu',
120
120
  'preferGlobal',
121
121
  'publishConfig',
122
122
  'icon',
123
- 'badges',
123
+ 'badges', // Key order (per item): description, url, href
124
124
  'galleryBanner',
125
125
  'preview',
126
126
  'markdown',
@@ -89,7 +89,7 @@ const config = dev_1.ESLintConfig.concat(
89
89
  '@typescript-eslint/no-dupe-class-members': baseRules['no-dupe-class-members'],
90
90
  '@typescript-eslint/no-empty-function': baseRules['no-empty-function'],
91
91
  '@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],
92
- '@typescript-eslint/no-explicit-any': 'off',
92
+ '@typescript-eslint/no-explicit-any': 'off', // if any is explicit then it's wanted
93
93
  '@typescript-eslint/no-extra-parens': baseRules['no-extra-parens'],
94
94
  '@typescript-eslint/no-extra-semi': baseRules['no-extra-semi'],
95
95
  '@typescript-eslint/no-inferrable-types': 'error',
@@ -97,7 +97,7 @@ const config = dev_1.ESLintConfig.concat(
97
97
  '@typescript-eslint/no-loss-of-precision': baseRules['no-loss-of-precision'],
98
98
  '@typescript-eslint/no-magic-numbers': baseRules['no-magic-numbers'],
99
99
  '@typescript-eslint/no-misused-new': 'error',
100
- '@typescript-eslint/no-namespace': 'off',
100
+ '@typescript-eslint/no-namespace': 'off', // We don't agree with community, namespaces are great and not deprecated
101
101
  '@typescript-eslint/no-non-null-assertion': 'error',
102
102
  '@typescript-eslint/no-redeclare': dev_1.ESLintConfig.fixme(baseRules['no-redeclare']),
103
103
  '@typescript-eslint/no-require-imports': 'error',
@@ -192,7 +192,7 @@ const config = dev_1.ESLintConfig.concat(
192
192
  'func-call-spacing': 'off',
193
193
  'getter-return': 'off',
194
194
  'import/default': duplicateTSC,
195
- 'import/export': dev_1.ESLintConfig.fixme('error'),
195
+ 'import/export': dev_1.ESLintConfig.fixme('error'), // https://github.com/benmosher/eslint-plugin-import/issues/1964
196
196
  'import/named': duplicateTSC,
197
197
  'import/namespace': duplicateTSC,
198
198
  'import/no-named-as-default-member': duplicateTSC,
@@ -211,7 +211,7 @@ const config = dev_1.ESLintConfig.concat(
211
211
  'no-func-assign': 'off',
212
212
  'no-implied-eval': 'off',
213
213
  'no-import-assign': 'off',
214
- 'no-inner-declarations': dev_1.ESLintConfig.fixme('error'),
214
+ 'no-inner-declarations': dev_1.ESLintConfig.fixme('error'), // https://github.com/typescript-eslint/typescript-eslint/issues/239
215
215
  'no-loop-func': 'off',
216
216
  'no-loss-of-precision': 'off',
217
217
  'no-magic-numbers': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@w5s/eslint-config",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "ESLint configuration presets",
5
5
  "keywords": [
6
6
  "eslint",
@@ -35,8 +35,8 @@
35
35
  "@rushstack/eslint-patch": "^1.1.0",
36
36
  "@typescript-eslint/eslint-plugin": "^6.0.0",
37
37
  "@typescript-eslint/parser": "^6.0.0",
38
- "@w5s/dev": "^2.0.3",
39
- "@w5s/prettier-config": "^2.0.1",
38
+ "@w5s/dev": "^2.0.4",
39
+ "@w5s/prettier-config": "^2.0.2",
40
40
  "eslint-config-airbnb-base": "^15.0.0",
41
41
  "eslint-config-prettier": "^9.0.0",
42
42
  "eslint-plugin-import": "^2.25.0",
@@ -45,7 +45,7 @@
45
45
  "eslint-plugin-jsonc": "^2.4.0",
46
46
  "eslint-plugin-prettier": "^5.0.0-alpha.0",
47
47
  "eslint-plugin-promise": "^6.0.0",
48
- "eslint-plugin-unicorn": "^48.0.0",
48
+ "eslint-plugin-unicorn": "^49.0.0",
49
49
  "eslint-plugin-yml": "^1.1.0",
50
50
  "find-up": "^5.0.0",
51
51
  "parse-gitignore": "^2.0.0"
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "214e0244a63211d31c96ad0d43fd5b9d080beb67"
72
+ "gitHead": "3b3fdc935f9a82009a8e7c0c7951ee2b4d8f7943"
73
73
  }
@@ -18,6 +18,7 @@ const getGitignore = (prefix = '') => {
18
18
  const config: eslint.Linter.Config = {
19
19
  ignorePatterns: [
20
20
  '!.*',
21
+ '.docusaurus',
21
22
  '.yarn',
22
23
  '.common/',
23
24
  '.config/package-lock.json',