@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": "
|
|
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
|
|
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-
|
|
27
|
+
"eslint-plugin-n": "^14.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@babel/core": "7.
|
|
31
|
-
"@babel/eslint-parser": "7.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "
|
|
33
|
-
"@typescript-eslint/parser": "
|
|
34
|
-
"eslint": "8.
|
|
35
|
-
"eslint-plugin-jest": "27.
|
|
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-
|
|
37
|
+
"eslint-plugin-n": "14.0.0",
|
|
38
38
|
"eslint-plugin-notice": "0.9.10",
|
|
39
|
-
"eslint-plugin-react": "7.
|
|
39
|
+
"eslint-plugin-react": "7.34.1",
|
|
40
40
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
41
|
-
"husky": "
|
|
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.
|
|
46
|
+
"typescript": "5.4.3"
|
|
47
47
|
},
|
|
48
48
|
"keywords": [
|
|
49
49
|
"eslint",
|
|
@@ -6,43 +6,43 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
module.exports = {
|
|
9
|
-
plugins: ['
|
|
9
|
+
plugins: ['n'],
|
|
10
10
|
rules: {
|
|
11
11
|
// require error handling in callbacks
|
|
12
|
-
'
|
|
12
|
+
'n/handle-callback-err': 0,
|
|
13
13
|
// ensure Node.js-style error-first callback pattern is followed
|
|
14
|
-
'
|
|
14
|
+
'n/no-callback-literal': 1,
|
|
15
15
|
// disallow the assignment to `exports`
|
|
16
|
-
'
|
|
16
|
+
'n/no-exports-assign': 2,
|
|
17
17
|
// disallow `import` declarations which import extraneous modules
|
|
18
|
-
'
|
|
18
|
+
'n/no-extraneous-import': 0,
|
|
19
19
|
// disallow `require()` expressions which import extraneous modules
|
|
20
|
-
'
|
|
20
|
+
'n/no-extraneous-require': 0,
|
|
21
21
|
// disallow `import` declarations which import non-existence modules
|
|
22
|
-
'
|
|
22
|
+
'n/no-missing-import': 0,
|
|
23
23
|
// disallow `require()` expressions which import non-existence modules
|
|
24
|
-
'
|
|
24
|
+
'n/no-missing-require': 2,
|
|
25
25
|
// disallow `new` operators with calls to `require`
|
|
26
|
-
'
|
|
26
|
+
'n/no-new-require': 0,
|
|
27
27
|
// disallow string concatenation with `__dirname` and `__filename`
|
|
28
|
-
'
|
|
28
|
+
'n/no-path-concat': 2,
|
|
29
29
|
// disallow `process.exit()`
|
|
30
|
-
'
|
|
30
|
+
'n/no-process-exit': 2,
|
|
31
31
|
// disallow `bin` files that npm ignores
|
|
32
|
-
'
|
|
32
|
+
'n/no-unpublished-bin': 2,
|
|
33
33
|
// disallow `import` declarations which import private modules
|
|
34
|
-
'
|
|
34
|
+
'n/no-unpublished-import': 0,
|
|
35
35
|
// disallow `require()` expressions which import private modules
|
|
36
|
-
'
|
|
36
|
+
'n/no-unpublished-require': 0,
|
|
37
37
|
// disallow unsupported ECMAScript built-ins on the specified version
|
|
38
|
-
'
|
|
38
|
+
'n/no-unsupported-features/es-builtins': 2,
|
|
39
39
|
// disallow unsupported ECMAScript syntax on the specified version
|
|
40
|
-
'
|
|
40
|
+
'n/no-unsupported-features/es-syntax': 0,
|
|
41
41
|
// disallow unsupported Node.js built-in APIs on the specified version
|
|
42
|
-
'
|
|
42
|
+
'n/no-unsupported-features/node-builtins': 2,
|
|
43
43
|
// make process.exit() expressions the same code path as throw
|
|
44
|
-
'
|
|
44
|
+
'n/process-exit-as-throw': 2,
|
|
45
45
|
// suggest correct usage of shebang
|
|
46
|
-
'
|
|
46
|
+
'n/shebang': 0
|
|
47
47
|
}
|
|
48
48
|
};
|
|
@@ -6,43 +6,43 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
module.exports = {
|
|
9
|
-
plugins: ['
|
|
9
|
+
plugins: ['n'],
|
|
10
10
|
rules: {
|
|
11
11
|
// enforce `return` after a callback
|
|
12
|
-
'
|
|
12
|
+
'n/callback-return': 0,
|
|
13
13
|
// enforce either `module.exports` or `exports`
|
|
14
|
-
'
|
|
14
|
+
'n/exports-style': 0,
|
|
15
15
|
// enforce the style of file extensions in `import` declarations
|
|
16
|
-
'
|
|
16
|
+
'n/file-extension-in-import': 0,
|
|
17
17
|
// enforce `require()` on top-level module scope
|
|
18
|
-
'
|
|
18
|
+
'n/global-require': 1,
|
|
19
19
|
// disallow mixing regular variable and `require` declarations
|
|
20
|
-
'
|
|
20
|
+
'n/no-mixed-requires': [0, false],
|
|
21
21
|
// disallow use of `process.env`
|
|
22
|
-
'
|
|
22
|
+
'n/no-process-env': 0,
|
|
23
23
|
// disallow specified modules when loaded by `import` declarations
|
|
24
|
-
'
|
|
24
|
+
'n/no-restricted-import': 0,
|
|
25
25
|
// disallow specified modules when loaded by `require`
|
|
26
|
-
'
|
|
26
|
+
'n/no-restricted-require': 0,
|
|
27
27
|
// disallow use of synchronous methods
|
|
28
|
-
'
|
|
28
|
+
'n/no-sync': 0,
|
|
29
29
|
// enforce either `Buffer` or `require("buffer").Buffer`
|
|
30
|
-
'
|
|
30
|
+
'n/prefer-global/buffer': [2, 'always'],
|
|
31
31
|
// enforce either `console` or `require("console")`
|
|
32
|
-
'
|
|
32
|
+
'n/prefer-global/console': [2, 'always'],
|
|
33
33
|
// enforce either `process` or `require("process")`
|
|
34
|
-
'
|
|
34
|
+
'n/prefer-global/process': [2, 'always'],
|
|
35
35
|
// enforce either `TextDecoder` or `require("util").TextDecoder`
|
|
36
|
-
'
|
|
36
|
+
'n/prefer-global/text-decoder': [2, 'always'],
|
|
37
37
|
// enforce either `TextEncoder` or `require("util").TextEncoder`
|
|
38
|
-
'
|
|
38
|
+
'n/prefer-global/text-encoder': [2, 'always'],
|
|
39
39
|
// enforce either `URLSearchParams` or `require("url").URLSearchParams`
|
|
40
|
-
'
|
|
40
|
+
'n/prefer-global/url-search-params': [2, 'always'],
|
|
41
41
|
// enforce either `URL` or `require("url").URL`
|
|
42
|
-
'
|
|
42
|
+
'n/prefer-global/url': [2, 'always'],
|
|
43
43
|
// enforce `require("dns").promises`
|
|
44
|
-
'
|
|
44
|
+
'n/prefer-promises/dns': 1,
|
|
45
45
|
// enforce `require("fs").promises`
|
|
46
|
-
'
|
|
46
|
+
'n/prefer-promises/fs': 1
|
|
47
47
|
}
|
|
48
48
|
};
|
package/plugins/typescript.js
CHANGED
|
@@ -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
|
};
|