linter-bundle 2.23.0 → 2.24.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 CHANGED
@@ -6,7 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.23.0...HEAD)
9
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.24.0...HEAD)
10
+
11
+ ## [2.24.0] - 2022-09-23
12
+
13
+ ### Changed
14
+
15
+ - [eslint/overrides-javascript] Replace [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node) by the fork [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n)
16
+
17
+ [Show all code changes](https://github.com/jens-duttke/linter-bundle/compare/v2.23.0...v2.24.0)
10
18
 
11
19
  ## [2.23.0] - 2022-09-21
12
20
 
package/README.md CHANGED
@@ -29,7 +29,7 @@ This setup is using the following additional plugins:
29
29
  - [eslint-plugin-jest](https://www.npmjs.com/package/eslint-plugin-jest)
30
30
  - [eslint-plugin-jsdoc](https://www.npmjs.com/package/eslint-plugin-jsdoc)
31
31
  - [eslint-plugin-jsx-a11y](https://www.npmjs.com/package/eslint-plugin-jsx-a11y)
32
- - [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node)
32
+ - [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) (fork of [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node))
33
33
  - [eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise)
34
34
  - [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
35
35
  - [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react)
package/eslint/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  /* eslint-disable max-lines -- The rules can be easier managed if they are all in one file */
6
- /* eslint-disable node/no-process-env -- `process.env` is required to inject configuration adjustments */
6
+ /* eslint-disable n/no-process-env -- `process.env` is required to inject configuration adjustments */
7
7
 
8
8
  const fs = require('fs');
9
9
  const path = require('path');
@@ -105,11 +105,11 @@ module.exports = {
105
105
  files: ['gatsby-browser.js'],
106
106
  rules: {
107
107
  /**
108
- * eslint-plugin-node
108
+ * eslint-plugin-n
109
109
  *
110
- * @see https://github.com/mysticatea/eslint-plugin-node
110
+ * @see https://github.com/eslint-community/eslint-plugin-n
111
111
  */
112
- 'node/no-unsupported-features/es-syntax': 'off'
112
+ 'n/no-unsupported-features/es-syntax': 'off'
113
113
  }
114
114
  }
115
115
  ]
@@ -10,7 +10,7 @@ module.exports = {
10
10
  node: true,
11
11
  es6: true
12
12
  },
13
- plugins: ['node'],
13
+ plugins: ['n'],
14
14
  rules: {
15
15
  /**
16
16
  * eslint
@@ -47,53 +47,53 @@ module.exports = {
47
47
  'import/no-nodejs-modules': 'off',
48
48
 
49
49
  /**
50
- * eslint-plugin-node
50
+ * eslint-plugin-n
51
51
  *
52
- * @see https://github.com/mysticatea/eslint-plugin-node
52
+ * @see https://github.com/eslint-community/eslint-plugin-n
53
53
  */
54
54
 
55
55
  // Possible Errors
56
- 'node/handle-callback-err': 'error',
57
- 'node/no-callback-literal': 'error',
58
- 'node/no-exports-assign': 'error',
59
- 'node/no-extraneous-import': 'error',
60
- 'node/no-extraneous-require': 'error',
61
- 'node/no-missing-import': 'error',
62
- 'node/no-missing-require': 'error',
63
- 'node/no-new-require': 'error',
64
- 'node/no-path-concat': 'error',
65
- 'node/no-process-exit': 'error',
66
- 'node/no-unpublished-bin': 'error',
67
- 'node/no-unpublished-import': 'error',
68
- 'node/no-unpublished-require': 'off', // Since we use .js files only for the dev-environment, we don't need this rule
69
- 'node/no-unsupported-features/es-builtins': 'error',
70
- 'node/no-unsupported-features/es-syntax': 'error',
71
- 'node/no-unsupported-features/node-builtins': 'error',
72
- 'node/process-exit-as-throw': 'error',
73
- 'node/shebang': 'error',
56
+ 'n/handle-callback-err': 'error',
57
+ 'n/no-callback-literal': 'error',
58
+ 'n/no-exports-assign': 'error',
59
+ 'n/no-extraneous-import': 'error',
60
+ 'n/no-extraneous-require': 'error',
61
+ 'n/no-missing-import': 'error',
62
+ 'n/no-missing-require': 'error',
63
+ 'n/no-new-require': 'error',
64
+ 'n/no-path-concat': 'error',
65
+ 'n/no-process-exit': 'error',
66
+ 'n/no-unpublished-bin': 'error',
67
+ 'n/no-unpublished-import': 'error',
68
+ 'n/no-unpublished-require': 'off', // Since we use .js files only for the dev-environment, we don't need this rule
69
+ 'n/no-unsupported-features/es-builtins': 'error',
70
+ 'n/no-unsupported-features/es-syntax': 'error',
71
+ 'n/no-unsupported-features/node-builtins': 'error',
72
+ 'n/process-exit-as-throw': 'error',
73
+ 'n/shebang': 'error',
74
74
 
75
75
  // Best Practices
76
- 'node/no-deprecated-api': 'error',
76
+ 'n/no-deprecated-api': 'error',
77
77
 
78
78
  // Stylistic Issues
79
- 'node/callback-return': 'error',
80
- 'node/exports-style': 'error',
81
- 'node/file-extension-in-import': 'error',
82
- 'node/global-require': 'off',
83
- 'node/no-mixed-requires': 'error',
84
- 'node/no-process-env': 'error',
85
- 'node/no-restricted-import': 'error',
86
- 'node/no-restricted-require': 'error',
87
- 'node/no-sync': 'off', // Since the .js files are used in the CLI, preventing the use of sync functions is not required
88
- 'node/prefer-global/buffer': 'error',
89
- 'node/prefer-global/console': 'error',
90
- 'node/prefer-global/process': 'error',
91
- 'node/prefer-global/text-decoder': 'error',
92
- 'node/prefer-global/text-encoder': 'error',
93
- 'node/prefer-global/url-search-params': 'error',
94
- 'node/prefer-global/url': 'error',
95
- 'node/prefer-promises/dns': 'error',
96
- 'node/prefer-promises/fs': 'error',
79
+ 'n/callback-return': 'error',
80
+ 'n/exports-style': 'error',
81
+ 'n/file-extension-in-import': 'error',
82
+ 'n/global-require': 'off',
83
+ 'n/no-mixed-requires': 'error',
84
+ 'n/no-process-env': 'error',
85
+ 'n/no-restricted-import': 'error',
86
+ 'n/no-restricted-require': 'error',
87
+ 'n/no-sync': 'off', // Since the .js files are used in the CLI, preventing the use of sync functions is not required
88
+ 'n/prefer-global/buffer': 'error',
89
+ 'n/prefer-global/console': 'error',
90
+ 'n/prefer-global/process': 'error',
91
+ 'n/prefer-global/text-decoder': 'error',
92
+ 'n/prefer-global/text-encoder': 'error',
93
+ 'n/prefer-global/url-search-params': 'error',
94
+ 'n/prefer-global/url': 'error',
95
+ 'n/prefer-promises/dns': 'error',
96
+ 'n/prefer-promises/fs': 'error',
97
97
 
98
98
  /**
99
99
  * eslint-plugin-unicorn
@@ -105,7 +105,7 @@ module.exports = {
105
105
  kebabCase: true
106
106
  }
107
107
  }],
108
- 'unicorn/no-process-exit': 'off', // node/no-process-exit
108
+ 'unicorn/no-process-exit': 'off', // n/no-process-exit
109
109
  'unicorn/prefer-module': 'off', // @todo Requires Node.js v13.2. Activate in 2023
110
110
  'unicorn/prefer-node-protocol': 'off', // @todo Requires Node.js v16. Activate in 2025
111
111
  'unicorn/prevent-abbreviations': ['error', { ignore: ['args', 'dev', 'env', 'i', 'j', 'i18n', 'pkg', 'ref', 'Ref', 'req', 'res', 'setupDevServerMiddleware'] }],
@@ -13,7 +13,7 @@ module.exports = {
13
13
  jest: {
14
14
  version: (() => {
15
15
  try {
16
- // eslint-disable-next-line node/no-missing-require, import/no-dynamic-require -- If "overrides-jest" is used, "jest" should be installed, and it should be searched in the working directory of the process.
16
+ // eslint-disable-next-line n/no-missing-require, import/no-dynamic-require -- If "overrides-jest" is used, "jest" should be installed, and it should be searched in the working directory of the process.
17
17
  const jestVersion = require(require.resolve('jest', { paths: [process.cwd()] })).getVersion().split('.')[0];
18
18
 
19
19
  process.stdout.write(`Detected Jest version: ${jestVersion}\n\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linter-bundle",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -52,7 +52,7 @@
52
52
  "eslint-plugin-jest": "27.0.4",
53
53
  "eslint-plugin-jsdoc": "39.3.6",
54
54
  "eslint-plugin-jsx-a11y": "6.6.1",
55
- "eslint-plugin-node": "11.1.0",
55
+ "eslint-plugin-n": "15.3.0",
56
56
  "eslint-plugin-promise": "6.0.1",
57
57
  "eslint-plugin-react": "7.31.8",
58
58
  "eslint-plugin-react-hooks": "4.6.0",