@zendeskgarden/eslint-config 37.0.0 → 39.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zendeskgarden/eslint-config",
3
- "version": "37.0.0",
3
+ "version": "39.0.0",
4
4
  "description": "Garden ESLint config",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Zendesk Garden <garden@zendesk.com>",
@@ -17,33 +17,33 @@
17
17
  "scripts": {
18
18
  "format": "prettier-package-json --write",
19
19
  "lint": "eslint index.js plugins/*.js rules/*.js --max-warnings 0",
20
- "prepare": "husky install",
20
+ "prepare": "husky",
21
21
  "tag": "[ `git rev-parse --abbrev-ref HEAD` = 'main' ] && standard-version --no-verify",
22
22
  "test": "npm run format && npm run lint && git diff --quiet"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@babel/eslint-parser": "^7.15.0",
26
26
  "eslint": "^8.56.0",
27
- "eslint-plugin-node": "^11.1.0"
27
+ "eslint-plugin-n": "^14.0.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@babel/core": "7.23.7",
31
- "@babel/eslint-parser": "7.23.3",
32
- "@typescript-eslint/eslint-plugin": "6.19.0",
33
- "@typescript-eslint/parser": "6.19.0",
34
- "eslint": "8.56.0",
35
- "eslint-plugin-jest": "27.6.3",
30
+ "@babel/core": "7.24.3",
31
+ "@babel/eslint-parser": "7.24.1",
32
+ "@typescript-eslint/eslint-plugin": "7.4.0",
33
+ "@typescript-eslint/parser": "7.4.0",
34
+ "eslint": "8.57.0",
35
+ "eslint-plugin-jest": "27.9.0",
36
36
  "eslint-plugin-jsx-a11y": "6.8.0",
37
- "eslint-plugin-node": "11.1.0",
37
+ "eslint-plugin-n": "14.0.0",
38
38
  "eslint-plugin-notice": "0.9.10",
39
- "eslint-plugin-react": "7.33.2",
39
+ "eslint-plugin-react": "7.34.1",
40
40
  "eslint-plugin-react-hooks": "4.6.0",
41
- "husky": "8.0.3",
41
+ "husky": "9.0.11",
42
42
  "jest": "29.7.0",
43
43
  "prettier-package-json": "2.8.0",
44
44
  "react": "18.2.0",
45
45
  "standard-version": "9.5.0",
46
- "typescript": "5.3.3"
46
+ "typescript": "5.4.3"
47
47
  },
48
48
  "keywords": [
49
49
  "eslint",
@@ -6,9 +6,9 @@
6
6
  */
7
7
 
8
8
  module.exports = {
9
- plugins: ['node'],
9
+ plugins: ['n'],
10
10
  rules: {
11
11
  // disallow deprecated APIs
12
- 'node/no-deprecated-api': 2
12
+ 'n/no-deprecated-api': 2
13
13
  }
14
14
  };
@@ -6,43 +6,43 @@
6
6
  */
7
7
 
8
8
  module.exports = {
9
- plugins: ['node'],
9
+ plugins: ['n'],
10
10
  rules: {
11
11
  // require error handling in callbacks
12
- 'node/handle-callback-err': 0,
12
+ 'n/handle-callback-err': 0,
13
13
  // ensure Node.js-style error-first callback pattern is followed
14
- 'node/no-callback-literal': 1,
14
+ 'n/no-callback-literal': 1,
15
15
  // disallow the assignment to `exports`
16
- 'node/no-exports-assign': 2,
16
+ 'n/no-exports-assign': 2,
17
17
  // disallow `import` declarations which import extraneous modules
18
- 'node/no-extraneous-import': 0,
18
+ 'n/no-extraneous-import': 0,
19
19
  // disallow `require()` expressions which import extraneous modules
20
- 'node/no-extraneous-require': 0,
20
+ 'n/no-extraneous-require': 0,
21
21
  // disallow `import` declarations which import non-existence modules
22
- 'node/no-missing-import': 0,
22
+ 'n/no-missing-import': 0,
23
23
  // disallow `require()` expressions which import non-existence modules
24
- 'node/no-missing-require': 2,
24
+ 'n/no-missing-require': 2,
25
25
  // disallow `new` operators with calls to `require`
26
- 'node/no-new-require': 0,
26
+ 'n/no-new-require': 0,
27
27
  // disallow string concatenation with `__dirname` and `__filename`
28
- 'node/no-path-concat': 2,
28
+ 'n/no-path-concat': 2,
29
29
  // disallow `process.exit()`
30
- 'node/no-process-exit': 2,
30
+ 'n/no-process-exit': 2,
31
31
  // disallow `bin` files that npm ignores
32
- 'node/no-unpublished-bin': 2,
32
+ 'n/no-unpublished-bin': 2,
33
33
  // disallow `import` declarations which import private modules
34
- 'node/no-unpublished-import': 0,
34
+ 'n/no-unpublished-import': 0,
35
35
  // disallow `require()` expressions which import private modules
36
- 'node/no-unpublished-require': 0,
36
+ 'n/no-unpublished-require': 0,
37
37
  // disallow unsupported ECMAScript built-ins on the specified version
38
- 'node/no-unsupported-features/es-builtins': 2,
38
+ 'n/no-unsupported-features/es-builtins': 2,
39
39
  // disallow unsupported ECMAScript syntax on the specified version
40
- 'node/no-unsupported-features/es-syntax': 0,
40
+ 'n/no-unsupported-features/es-syntax': 0,
41
41
  // disallow unsupported Node.js built-in APIs on the specified version
42
- 'node/no-unsupported-features/node-builtins': 2,
42
+ 'n/no-unsupported-features/node-builtins': 2,
43
43
  // make process.exit() expressions the same code path as throw
44
- 'node/process-exit-as-throw': 2,
44
+ 'n/process-exit-as-throw': 2,
45
45
  // suggest correct usage of shebang
46
- 'node/shebang': 0
46
+ 'n/shebang': 0
47
47
  }
48
48
  };
@@ -6,43 +6,43 @@
6
6
  */
7
7
 
8
8
  module.exports = {
9
- plugins: ['node'],
9
+ plugins: ['n'],
10
10
  rules: {
11
11
  // enforce `return` after a callback
12
- 'node/callback-return': 0,
12
+ 'n/callback-return': 0,
13
13
  // enforce either `module.exports` or `exports`
14
- 'node/exports-style': 0,
14
+ 'n/exports-style': 0,
15
15
  // enforce the style of file extensions in `import` declarations
16
- 'node/file-extension-in-import': 0,
16
+ 'n/file-extension-in-import': 0,
17
17
  // enforce `require()` on top-level module scope
18
- 'node/global-require': 1,
18
+ 'n/global-require': 1,
19
19
  // disallow mixing regular variable and `require` declarations
20
- 'node/no-mixed-requires': [0, false],
20
+ 'n/no-mixed-requires': [0, false],
21
21
  // disallow use of `process.env`
22
- 'node/no-process-env': 0,
22
+ 'n/no-process-env': 0,
23
23
  // disallow specified modules when loaded by `import` declarations
24
- 'node/no-restricted-import': 0,
24
+ 'n/no-restricted-import': 0,
25
25
  // disallow specified modules when loaded by `require`
26
- 'node/no-restricted-require': 0,
26
+ 'n/no-restricted-require': 0,
27
27
  // disallow use of synchronous methods
28
- 'node/no-sync': 0,
28
+ 'n/no-sync': 0,
29
29
  // enforce either `Buffer` or `require("buffer").Buffer`
30
- 'node/prefer-global/buffer': [2, 'always'],
30
+ 'n/prefer-global/buffer': [2, 'always'],
31
31
  // enforce either `console` or `require("console")`
32
- 'node/prefer-global/console': [2, 'always'],
32
+ 'n/prefer-global/console': [2, 'always'],
33
33
  // enforce either `process` or `require("process")`
34
- 'node/prefer-global/process': [2, 'always'],
34
+ 'n/prefer-global/process': [2, 'always'],
35
35
  // enforce either `TextDecoder` or `require("util").TextDecoder`
36
- 'node/prefer-global/text-decoder': [2, 'always'],
36
+ 'n/prefer-global/text-decoder': [2, 'always'],
37
37
  // enforce either `TextEncoder` or `require("util").TextEncoder`
38
- 'node/prefer-global/text-encoder': [2, 'always'],
38
+ 'n/prefer-global/text-encoder': [2, 'always'],
39
39
  // enforce either `URLSearchParams` or `require("url").URLSearchParams`
40
- 'node/prefer-global/url-search-params': [2, 'always'],
40
+ 'n/prefer-global/url-search-params': [2, 'always'],
41
41
  // enforce either `URL` or `require("url").URL`
42
- 'node/prefer-global/url': [2, 'always'],
42
+ 'n/prefer-global/url': [2, 'always'],
43
43
  // enforce `require("dns").promises`
44
- 'node/prefer-promises/dns': 1,
44
+ 'n/prefer-promises/dns': 1,
45
45
  // enforce `require("fs").promises`
46
- 'node/prefer-promises/fs': 1
46
+ 'n/prefer-promises/fs': 1
47
47
  }
48
48
  };
@@ -208,6 +208,8 @@ module.exports = {
208
208
  // requires type annotations to exist
209
209
  '@typescript-eslint/typedef': 2,
210
210
  // warns for any two overloads that could be unified into one by using a union or an optional/rest parameter
211
- '@typescript-eslint/unified-signatures': 2
211
+ '@typescript-eslint/unified-signatures': 2,
212
+ // requires type annotation of catch() parameter remain unknown
213
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 2
212
214
  }
213
215
  };