@pumpn/eslint-config 17.2.3 → 18.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/_common/_exports.js +5 -0
- package/_common/all-extensions/_exports.js +1 -0
- package/_common/all-extensions/js-extensions.js +10 -0
- package/_common/all-extensions.js +6 -0
- package/_common/convert-extensions-to-glob.js +12 -0
- package/_common/js-jsx-extensions.js +3 -0
- package/_common/ts-extensions.js +10 -0
- package/_common/ts-jsx-extensions.js +3 -0
- package/config/_common/_exports.js +5 -0
- package/config/_common/add-prefix-to-rules.js +13 -0
- package/config/_common/core-json-rules.js +24 -0
- package/config/_common/json-plugins.js +9 -0
- package/config/_common/pick-unicorn-rules-for-language/_exports.js +2 -0
- package/config/_common/pick-unicorn-rules-for-language/pick-rules-for-language.js +52 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/_exports.js +9 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/binary-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/hexadecimal-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/maximum-nested-calls.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/number-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/octal-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/patterns.js +28 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/_exports.js +1 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/consistent-function-style.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules.js +66 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-preference-rules.js +199 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-redundancy-rules.js +47 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn.js +368 -0
- package/config/_common/pick-unicorn-rules-for-language.js +14 -0
- package/config/_exports.js +11 -0
- package/config/converted-globals.js +16 -0
- package/config/css-config/_exports.js +2 -0
- package/config/css-config/css-plugins.js +9 -0
- package/config/css-config/css-rules/_exports.js +1 -0
- package/config/css-config/css-rules/core-css-rules.js +25 -0
- package/config/css-config/css-rules.js +10 -0
- package/config/css-config.js +17 -0
- package/config/default-glob.js +6 -0
- package/config/html-config/_exports.js +2 -0
- package/config/html-config/html-plugins.js +9 -0
- package/config/html-config/html-rules/_exports.js +1 -0
- package/config/html-config/html-rules/core-html-rules/_exports.js +4 -0
- package/config/html-config/html-rules/core-html-rules/core-html-accessibility-rules.js +28 -0
- package/config/html-config/html-rules/core-html-rules/core-html-best-practice-rules.js +42 -0
- package/config/html-config/html-rules/core-html-rules/core-html-seo-rules.js +16 -0
- package/config/html-config/html-rules/core-html-rules/core-html-style-rules.js +23 -0
- package/config/html-config/html-rules/core-html-rules.js +27 -0
- package/config/html-config/html-rules.js +10 -0
- package/config/html-config.js +12 -0
- package/config/json-config/_exports.js +1 -0
- package/config/json-config/json-rules.js +9 -0
- package/config/json-config.js +13 -0
- package/config/jsonc-config/_exports.js +1 -0
- package/config/jsonc-config/jsonc-rules.js +9 -0
- package/config/jsonc-config.js +26 -0
- package/config/jsx-glob/_exports.js +1 -0
- package/config/jsx-glob/jsx-extensions.js +6 -0
- package/config/jsx-glob.js +7 -0
- package/config/md-config/_exports.js +2 -0
- package/config/md-config/md-plugins.js +9 -0
- package/config/md-config/md-rules/_exports.js +1 -0
- package/config/md-config/md-rules/core-md-rules.js +30 -0
- package/config/md-config/md-rules.js +10 -0
- package/config/md-config.js +15 -0
- package/{plugins.js → config/plugins.js} +7 -6
- package/{rules → config/rules}/_common/_exports.js +0 -1
- package/{rules → config/rules}/_exports.js +1 -4
- package/config/rules/better-tailwindcss/correctness.js +13 -0
- package/config/rules/better-tailwindcss/stylistic.js +42 -0
- package/config/rules/better-tailwindcss.js +15 -0
- package/config/rules/command.js +17 -0
- package/config/rules/depend.js +17 -0
- package/config/rules/eslint-comments/best-practices.js +14 -0
- package/config/rules/eslint-comments/stylistic-issues.js +17 -0
- package/config/rules/eslint-comments.js +15 -0
- package/config/rules/import-x/helpful-warnings.js +26 -0
- package/config/rules/import-x/module-systems.js +14 -0
- package/config/rules/import-x/static-analysis.js +40 -0
- package/config/rules/import-x/style-guide/_exports.js +1 -0
- package/config/rules/import-x/style-guide/max-dependencies.js +3 -0
- package/config/rules/import-x/style-guide.js +94 -0
- package/config/rules/import-x.js +22 -0
- package/config/rules/jsdoc.js +464 -0
- package/config/rules/no-secrets/_exports.js +1 -0
- package/config/rules/no-secrets/tolerance.js +3 -0
- package/config/rules/no-secrets.js +30 -0
- package/config/rules/perfectionist.js +331 -0
- package/config/rules/promise.js +53 -0
- package/config/rules/react/core.js +69 -0
- package/config/rules/react/debug.js +14 -0
- package/config/rules/react/dom.js +25 -0
- package/config/rules/react/jsx.js +23 -0
- package/config/rules/react/naming-convention.js +12 -0
- package/config/rules/react/rsc.js +10 -0
- package/config/rules/react/web-api.js +15 -0
- package/config/rules/react.js +28 -0
- package/config/rules/regexp/best-practices.js +47 -0
- package/config/rules/regexp/possible-errors.js +31 -0
- package/config/rules/regexp/stylistic-issues.js +79 -0
- package/config/rules/regexp.js +20 -0
- package/config/rules/security.js +31 -0
- package/config/rules/sonarjs/problem.js +134 -0
- package/config/rules/sonarjs/suggestion.js +167 -0
- package/config/rules/sonarjs.js +15 -0
- package/config/rules/stylistic/_common/_exports.js +1 -0
- package/{rules → config/rules}/stylistic/_exports.js +1 -1
- package/config/rules/stylistic/brackets/_exports.js +2 -0
- package/config/rules/stylistic/brackets/min-elements-for-curly-newline.js +3 -0
- package/config/rules/stylistic/brackets/wrap-multilines-default.js +3 -0
- package/config/rules/stylistic/brackets.js +90 -0
- package/config/rules/stylistic/commas.js +18 -0
- package/config/rules/stylistic/comments.js +13 -0
- package/config/rules/stylistic/disallow.js +36 -0
- package/config/rules/stylistic/indent.js +19 -0
- package/config/rules/stylistic/jsx.js +42 -0
- package/config/rules/stylistic/linebreaks/_exports.js +1 -0
- package/config/rules/stylistic/linebreaks/max-ignored-chain-depth.js +3 -0
- package/config/rules/stylistic/linebreaks.js +67 -0
- package/config/rules/stylistic/misc.js +49 -0
- package/config/rules/stylistic/operators.js +31 -0
- package/config/rules/stylistic/quotes.js +12 -0
- package/config/rules/stylistic/semis.js +19 -0
- package/config/rules/stylistic/spacing.js +68 -0
- package/config/rules/stylistic/types.js +12 -0
- package/config/rules/stylistic.js +40 -0
- package/config/rules/suggestions/_exports.js +9 -0
- package/config/rules/suggestions/max-classes-per-file.js +3 -0
- package/config/rules/suggestions/max-depth.js +3 -0
- package/config/rules/suggestions/max-identifier-length.js +3 -0
- package/config/rules/suggestions/max-lines-per-file.js +3 -0
- package/config/rules/suggestions/max-lines-per-function.js +3 -0
- package/config/rules/suggestions/max-nested-callbacks.js +3 -0
- package/config/rules/suggestions/max-parameters.js +3 -0
- package/config/rules/suggestions/max-statements.js +3 -0
- package/config/rules/suggestions/min-identifier-length.js +3 -0
- package/{rules → config/rules}/suggestions.js +17 -15
- package/config/rules.js +50 -0
- package/config/ts-glob.js +6 -0
- package/config.js +51 -53
- package/package.json +51 -38
- package/.ls-lint.yml +0 -6
- package/.vscode/settings.json +0 -18
- package/deno.json +0 -78
- package/deno.lock +0 -1632
- package/eslint.config.js +0 -25
- package/rules/better-tailwindcss/correctness.js +0 -7
- package/rules/better-tailwindcss/stylistic.js +0 -38
- package/rules/better-tailwindcss.js +0 -19
- package/rules/command.js +0 -12
- package/rules/depend.js +0 -12
- package/rules/eslint-comments/best-practices.js +0 -9
- package/rules/eslint-comments/stylistic-issues.js +0 -12
- package/rules/eslint-comments.js +0 -19
- package/rules/import-x/helpful-warnings.js +0 -21
- package/rules/import-x/module-systems.js +0 -9
- package/rules/import-x/static-analysis.js +0 -35
- package/rules/import-x/style-guide.js +0 -89
- package/rules/import-x.js +0 -19
- package/rules/jsdoc.js +0 -433
- package/rules/no-secrets.js +0 -25
- package/rules/perfectionist.js +0 -318
- package/rules/promise.js +0 -48
- package/rules/react/core.js +0 -59
- package/rules/react/debug.js +0 -6
- package/rules/react/dom.js +0 -15
- package/rules/react/jsx.js +0 -18
- package/rules/react/naming-convention.js +0 -6
- package/rules/react/rsc.js +0 -5
- package/rules/react/web-api.js +0 -10
- package/rules/react.js +0 -19
- package/rules/regexp/best-practices.js +0 -42
- package/rules/regexp/possible-errors.js +0 -26
- package/rules/regexp/stylistic-issues.js +0 -74
- package/rules/regexp.js +0 -19
- package/rules/security.js +0 -25
- package/rules/sonarjs/problem.js +0 -123
- package/rules/sonarjs/suggestion.js +0 -135
- package/rules/sonarjs.js +0 -19
- package/rules/stylistic/_common/_exports.js +0 -3
- package/rules/stylistic/brackets.js +0 -87
- package/rules/stylistic/commas.js +0 -13
- package/rules/stylistic/comments.js +0 -8
- package/rules/stylistic/disallow.js +0 -31
- package/rules/stylistic/indent.js +0 -14
- package/rules/stylistic/jsx.js +0 -37
- package/rules/stylistic/linebreaks.js +0 -63
- package/rules/stylistic/misc.js +0 -45
- package/rules/stylistic/operators.js +0 -26
- package/rules/stylistic/quotes.js +0 -7
- package/rules/stylistic/semis.js +0 -14
- package/rules/stylistic/spacing.js +0 -63
- package/rules/stylistic/types.js +0 -7
- package/rules/stylistic.js +0 -19
- package/rules/unicorn.js +0 -306
- package/rules.js +0 -19
- package/scripts/update-import-map.js +0 -47
- package/scripts/update-package-json.js +0 -66
- package/scripts/update-tsconfig.js +0 -46
- package/tsconfig.json +0 -27
- /package/{rules → config}/_common/tab-width.js +0 -0
- /package/{rules → config/rules}/_common/maximum-line-length.js +0 -0
- /package/{rules → config/rules}/better-tailwindcss/_exports.js +0 -0
- /package/{rules → config/rules}/eslint-comments/_exports.js +0 -0
- /package/{rules → config/rules}/import-x/_exports.js +0 -0
- /package/{rules → config/rules}/layout-and-formatting.js +0 -0
- /package/{rules → config/rules}/possible-problems.js +0 -0
- /package/{rules → config/rules}/react/_exports.js +0 -0
- /package/{rules → config/rules}/regexp/_exports.js +0 -0
- /package/{rules → config/rules}/sonarjs/_exports.js +0 -0
- /package/{rules → config/rules}/stylistic/_common/min-items-for-array-newline.js +0 -0
package/rules/security.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @import { Linter } from "eslint";
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @satisfies {Linter.RulesRecord}
|
|
7
|
-
*/
|
|
8
|
-
const securityRules = {
|
|
9
|
-
"security/detect-bidi-characters": "warn",
|
|
10
|
-
"security/detect-buffer-noassert": "warn",
|
|
11
|
-
"security/detect-child-process": "warn",
|
|
12
|
-
"security/detect-disable-mustache-escape": "warn",
|
|
13
|
-
"security/detect-eval-with-expression": "warn",
|
|
14
|
-
"security/detect-new-buffer": "warn",
|
|
15
|
-
"security/detect-no-csrf-before-method-override": "warn",
|
|
16
|
-
"security/detect-non-literal-fs-filename": "warn",
|
|
17
|
-
"security/detect-non-literal-regexp": "warn",
|
|
18
|
-
"security/detect-non-literal-require": "warn",
|
|
19
|
-
"security/detect-object-injection": "off",
|
|
20
|
-
"security/detect-possible-timing-attacks": "warn",
|
|
21
|
-
"security/detect-pseudoRandomBytes": "warn",
|
|
22
|
-
"security/detect-unsafe-regex": "warn"
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export default securityRules;
|
package/rules/sonarjs/problem.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
const problemRules = {
|
|
2
|
-
"sonarjs/anchor-precedence": "error",
|
|
3
|
-
"sonarjs/array-callback-without-return": "error",
|
|
4
|
-
"sonarjs/aws-apigateway-public-api": "error",
|
|
5
|
-
"sonarjs/aws-ec2-rds-dms-public": "error",
|
|
6
|
-
"sonarjs/aws-ec2-unencrypted-ebs-volume": "error",
|
|
7
|
-
"sonarjs/aws-efs-unencrypted": "error",
|
|
8
|
-
"sonarjs/aws-iam-all-privileges": "error",
|
|
9
|
-
"sonarjs/aws-iam-all-resources-accessible": "error",
|
|
10
|
-
"sonarjs/aws-iam-privilege-escalation": "error",
|
|
11
|
-
"sonarjs/aws-iam-public-access": "error",
|
|
12
|
-
"sonarjs/aws-opensearchservice-domain": "error",
|
|
13
|
-
"sonarjs/aws-rds-unencrypted-databases": "error",
|
|
14
|
-
"sonarjs/aws-restricted-ip-admin-access": "error",
|
|
15
|
-
"sonarjs/aws-s3-bucket-granted-access": "error",
|
|
16
|
-
"sonarjs/aws-s3-bucket-insecure-http": "error",
|
|
17
|
-
"sonarjs/aws-s3-bucket-public-access": "error",
|
|
18
|
-
"sonarjs/aws-s3-bucket-versioning": "error",
|
|
19
|
-
"sonarjs/aws-sagemaker-unencrypted-notebook": "error",
|
|
20
|
-
"sonarjs/aws-sns-unencrypted-topics": "error",
|
|
21
|
-
"sonarjs/aws-sqs-unencrypted-queue": "error",
|
|
22
|
-
"sonarjs/bitwise-operators": "error",
|
|
23
|
-
"sonarjs/code-eval": "error",
|
|
24
|
-
"sonarjs/comma-or-logical-or-case": "error",
|
|
25
|
-
"sonarjs/confidential-information-logging": "error",
|
|
26
|
-
"sonarjs/constructor-for-side-effects": "error",
|
|
27
|
-
"sonarjs/content-length": "error",
|
|
28
|
-
"sonarjs/content-security-policy": "error",
|
|
29
|
-
"sonarjs/cookie-no-httponly": "error",
|
|
30
|
-
"sonarjs/cors": "error",
|
|
31
|
-
"sonarjs/csrf": "error",
|
|
32
|
-
"sonarjs/different-types-comparison": "error",
|
|
33
|
-
"sonarjs/disabled-auto-escaping": "error",
|
|
34
|
-
"sonarjs/disabled-resource-integrity": "error",
|
|
35
|
-
"sonarjs/disabled-timeout": "error",
|
|
36
|
-
"sonarjs/dompurify-unsafe-config": "error",
|
|
37
|
-
"sonarjs/empty-string-repetition": "error",
|
|
38
|
-
"sonarjs/encryption-secure-mode": "error",
|
|
39
|
-
"sonarjs/existing-groups": "error",
|
|
40
|
-
"sonarjs/file-permissions": "error",
|
|
41
|
-
"sonarjs/file-uploads": "error",
|
|
42
|
-
"sonarjs/for-in": "error",
|
|
43
|
-
"sonarjs/for-loop-increment-sign": "error",
|
|
44
|
-
"sonarjs/frame-ancestors": "error",
|
|
45
|
-
"sonarjs/generator-without-yield": "error",
|
|
46
|
-
"sonarjs/hashing": "error",
|
|
47
|
-
"sonarjs/hidden-files": "error",
|
|
48
|
-
"sonarjs/in-operator-type-error": "error",
|
|
49
|
-
"sonarjs/insecure-cookie": "error",
|
|
50
|
-
"sonarjs/insecure-jwt-token": "error",
|
|
51
|
-
"sonarjs/jsx-no-leaked-render": "error",
|
|
52
|
-
"sonarjs/link-with-target-blank": "error",
|
|
53
|
-
"sonarjs/new-operator-misuse": "error",
|
|
54
|
-
"sonarjs/no-all-duplicated-branches": "error",
|
|
55
|
-
"sonarjs/no-alphabetical-sort": "error",
|
|
56
|
-
"sonarjs/no-angular-bypass-sanitization": "error",
|
|
57
|
-
"sonarjs/no-built-in-override": "error",
|
|
58
|
-
"sonarjs/no-clear-text-protocols": "error",
|
|
59
|
-
"sonarjs/no-collection-size-mischeck": "error",
|
|
60
|
-
"sonarjs/no-control-regex": "error",
|
|
61
|
-
"sonarjs/no-delete-var": "error",
|
|
62
|
-
"sonarjs/no-element-overwrite": "error",
|
|
63
|
-
"sonarjs/no-empty-alternatives": "error",
|
|
64
|
-
"sonarjs/no-empty-character-class": "error",
|
|
65
|
-
"sonarjs/no-empty-collection": "error",
|
|
66
|
-
"sonarjs/no-exclusive-tests": "error",
|
|
67
|
-
"sonarjs/no-extra-arguments": "error",
|
|
68
|
-
"sonarjs/no-function-declaration-in-block": "error",
|
|
69
|
-
"sonarjs/no-globals-shadowing": "error",
|
|
70
|
-
"sonarjs/no-hardcoded-ip": "error",
|
|
71
|
-
"sonarjs/no-hardcoded-passwords": "error",
|
|
72
|
-
"sonarjs/no-hardcoded-secrets": "error",
|
|
73
|
-
"sonarjs/no-hook-setter-in-body": "error",
|
|
74
|
-
"sonarjs/no-identical-conditions": "error",
|
|
75
|
-
"sonarjs/no-identical-expressions": "error",
|
|
76
|
-
"sonarjs/no-ignored-return": "error",
|
|
77
|
-
"sonarjs/no-intrusive-permissions": "error",
|
|
78
|
-
"sonarjs/no-invalid-regexp": "error",
|
|
79
|
-
"sonarjs/no-ip-forward": "error",
|
|
80
|
-
"sonarjs/no-literal-call": "error",
|
|
81
|
-
"sonarjs/no-mime-sniff": "error",
|
|
82
|
-
"sonarjs/no-misleading-character-class": "error",
|
|
83
|
-
"sonarjs/no-mixed-content": "error",
|
|
84
|
-
"sonarjs/no-os-command-from-path": "error",
|
|
85
|
-
"sonarjs/no-parameter-reassignment": "error",
|
|
86
|
-
"sonarjs/no-reference-error": "error",
|
|
87
|
-
"sonarjs/no-referrer-policy": "error",
|
|
88
|
-
"sonarjs/no-same-argument-assert": "error",
|
|
89
|
-
"sonarjs/no-try-promise": "error",
|
|
90
|
-
"sonarjs/no-unsafe-unzip": "error",
|
|
91
|
-
"sonarjs/no-unthrown-error": "error",
|
|
92
|
-
"sonarjs/no-use-of-empty-return-value": "error",
|
|
93
|
-
"sonarjs/no-useless-increment": "error",
|
|
94
|
-
"sonarjs/no-useless-intersection": "error",
|
|
95
|
-
"sonarjs/no-useless-react-setstate": "error",
|
|
96
|
-
"sonarjs/no-weak-cipher": "error",
|
|
97
|
-
"sonarjs/no-weak-keys": "error",
|
|
98
|
-
"sonarjs/non-existent-operator": "error",
|
|
99
|
-
"sonarjs/null-dereference": "error",
|
|
100
|
-
"sonarjs/os-command": "error",
|
|
101
|
-
"sonarjs/post-message": "error",
|
|
102
|
-
"sonarjs/production-debug": "error",
|
|
103
|
-
"sonarjs/pseudo-random": "error",
|
|
104
|
-
"sonarjs/publicly-writable-directories": "error",
|
|
105
|
-
"sonarjs/reduce-initial-value": "error",
|
|
106
|
-
"sonarjs/session-regeneration": "error",
|
|
107
|
-
"sonarjs/slow-regex": "error",
|
|
108
|
-
"sonarjs/sql-queries": "error",
|
|
109
|
-
"sonarjs/stateful-regex": "error",
|
|
110
|
-
"sonarjs/strict-transport-security": "error",
|
|
111
|
-
"sonarjs/table-header": "error",
|
|
112
|
-
"sonarjs/table-header-reference": "error",
|
|
113
|
-
"sonarjs/unicode-aware-regex": "error",
|
|
114
|
-
"sonarjs/unverified-certificate": "error",
|
|
115
|
-
"sonarjs/unverified-hostname": "error",
|
|
116
|
-
"sonarjs/updated-const-var": "error",
|
|
117
|
-
"sonarjs/weak-ssl": "error",
|
|
118
|
-
"sonarjs/x-powered-by": "error",
|
|
119
|
-
"sonarjs/xml-parser-xxe": "error"
|
|
120
|
-
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export default problemRules;
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
const suggestionRules = {
|
|
2
|
-
"sonarjs/argument-type": "error",
|
|
3
|
-
"sonarjs/arguments-order": "error",
|
|
4
|
-
"sonarjs/arguments-usage": "error",
|
|
5
|
-
"sonarjs/array-constructor": "error",
|
|
6
|
-
"sonarjs/arrow-function-convention": "off",
|
|
7
|
-
"sonarjs/assertions-in-tests": "error",
|
|
8
|
-
"sonarjs/block-scoped-var": "error",
|
|
9
|
-
"sonarjs/bool-param-default": "error",
|
|
10
|
-
"sonarjs/call-argument-line": "error",
|
|
11
|
-
"sonarjs/chai-determinate-assertion": "error",
|
|
12
|
-
"sonarjs/class-name": "error",
|
|
13
|
-
"sonarjs/class-prototype": "error",
|
|
14
|
-
"sonarjs/cognitive-complexity": "error",
|
|
15
|
-
"sonarjs/comment-regex": "error",
|
|
16
|
-
"sonarjs/concise-regex": "error",
|
|
17
|
-
"sonarjs/cyclomatic-complexity": "error",
|
|
18
|
-
"sonarjs/declarations-in-global-scope": "error",
|
|
19
|
-
"sonarjs/deprecation": "error",
|
|
20
|
-
"sonarjs/destructuring-assignment-syntax": "error",
|
|
21
|
-
"sonarjs/duplicates-in-character-class": "error",
|
|
22
|
-
"sonarjs/elseif-without-else": "error",
|
|
23
|
-
"sonarjs/expression-complexity": "error",
|
|
24
|
-
"sonarjs/file-header": "off",
|
|
25
|
-
"sonarjs/file-name-differ-from-class": "off",
|
|
26
|
-
"sonarjs/fixme-tag": "error",
|
|
27
|
-
"sonarjs/function-inside-loop": "error",
|
|
28
|
-
"sonarjs/function-name": "off",
|
|
29
|
-
"sonarjs/function-return-type": "error",
|
|
30
|
-
"sonarjs/future-reserved-words": "error",
|
|
31
|
-
"sonarjs/inconsistent-function-call": "error",
|
|
32
|
-
"sonarjs/index-of-compare-to-positive-number": "error",
|
|
33
|
-
"sonarjs/inverted-assertion-arguments": "error",
|
|
34
|
-
"sonarjs/label-position": "error",
|
|
35
|
-
"sonarjs/max-lines": "error",
|
|
36
|
-
"sonarjs/max-lines-per-function": "error",
|
|
37
|
-
"sonarjs/max-switch-cases": "error",
|
|
38
|
-
"sonarjs/max-union-size": "error",
|
|
39
|
-
"sonarjs/misplaced-loop-counter": "error",
|
|
40
|
-
"sonarjs/nested-control-flow": "error",
|
|
41
|
-
"sonarjs/no-array-delete": "error",
|
|
42
|
-
"sonarjs/no-associative-arrays": "error",
|
|
43
|
-
"sonarjs/no-async-constructor": "error",
|
|
44
|
-
"sonarjs/no-case-label-in-switch": "error",
|
|
45
|
-
"sonarjs/no-code-after-done": "error",
|
|
46
|
-
"sonarjs/no-collapsible-if": "error",
|
|
47
|
-
"sonarjs/no-commented-code": "error",
|
|
48
|
-
"sonarjs/no-dead-store": "error",
|
|
49
|
-
"sonarjs/no-duplicate-in-composite": "error",
|
|
50
|
-
"sonarjs/no-duplicate-string": "error",
|
|
51
|
-
"sonarjs/no-duplicated-branches": "error",
|
|
52
|
-
"sonarjs/no-empty-after-reluctant": "error",
|
|
53
|
-
"sonarjs/no-empty-group": "error",
|
|
54
|
-
"sonarjs/no-empty-test-file": "error",
|
|
55
|
-
"sonarjs/no-equals-in-for-termination": "error",
|
|
56
|
-
"sonarjs/no-fallthrough": "error",
|
|
57
|
-
"sonarjs/no-for-in-iterable": "error",
|
|
58
|
-
"sonarjs/no-global-this": "error",
|
|
59
|
-
"sonarjs/no-gratuitous-expressions": "error",
|
|
60
|
-
"sonarjs/no-identical-functions": "error",
|
|
61
|
-
"sonarjs/no-ignored-exceptions": "error",
|
|
62
|
-
"sonarjs/no-implicit-dependencies": "off",
|
|
63
|
-
"sonarjs/no-implicit-global": "error",
|
|
64
|
-
"sonarjs/no-in-misuse": "error",
|
|
65
|
-
"sonarjs/no-incomplete-assertions": "error",
|
|
66
|
-
"sonarjs/no-inconsistent-returns": "error",
|
|
67
|
-
"sonarjs/no-incorrect-string-concat": "error",
|
|
68
|
-
"sonarjs/no-internal-api-use": "error",
|
|
69
|
-
"sonarjs/no-invariant-returns": "error",
|
|
70
|
-
"sonarjs/no-inverted-boolean-check": "error",
|
|
71
|
-
"sonarjs/no-labels": "error",
|
|
72
|
-
"sonarjs/no-misleading-array-reverse": "error",
|
|
73
|
-
"sonarjs/no-nested-assignment": "error",
|
|
74
|
-
"sonarjs/no-nested-conditional": "error",
|
|
75
|
-
"sonarjs/no-nested-functions": "error",
|
|
76
|
-
"sonarjs/no-nested-incdec": "error",
|
|
77
|
-
"sonarjs/no-nested-switch": "error",
|
|
78
|
-
"sonarjs/no-nested-template-literals": "error",
|
|
79
|
-
"sonarjs/no-primitive-wrappers": "error",
|
|
80
|
-
"sonarjs/no-redundant-assignments": "error",
|
|
81
|
-
"sonarjs/no-redundant-boolean": "error",
|
|
82
|
-
"sonarjs/no-redundant-jump": "error",
|
|
83
|
-
"sonarjs/no-redundant-optional": "error",
|
|
84
|
-
"sonarjs/no-regex-spaces": "error",
|
|
85
|
-
"sonarjs/no-require-or-define": "error",
|
|
86
|
-
"sonarjs/no-return-type-any": "error",
|
|
87
|
-
"sonarjs/no-same-line-conditional": "error",
|
|
88
|
-
"sonarjs/no-selector-parameter": "error",
|
|
89
|
-
"sonarjs/no-skipped-tests": "error",
|
|
90
|
-
"sonarjs/no-small-switch": "error",
|
|
91
|
-
"sonarjs/no-sonar-comments": "error",
|
|
92
|
-
"sonarjs/no-table-as-layout": "error",
|
|
93
|
-
"sonarjs/no-undefined-argument": "error",
|
|
94
|
-
"sonarjs/no-undefined-assignment": "off",
|
|
95
|
-
"sonarjs/no-unenclosed-multiline-block": "error",
|
|
96
|
-
"sonarjs/no-uniq-key": "error",
|
|
97
|
-
"sonarjs/no-unused-collection": "error",
|
|
98
|
-
"sonarjs/no-unused-function-argument": "error",
|
|
99
|
-
"sonarjs/no-unused-vars": "error",
|
|
100
|
-
"sonarjs/no-useless-catch": "error",
|
|
101
|
-
"sonarjs/no-variable-usage-before-declaration": "error",
|
|
102
|
-
"sonarjs/no-wildcard-import": "off",
|
|
103
|
-
"sonarjs/non-number-in-arithmetic-expression": "error",
|
|
104
|
-
"sonarjs/object-alt-content": "error",
|
|
105
|
-
"sonarjs/operation-returning-nan": "error",
|
|
106
|
-
"sonarjs/prefer-default-last": "error",
|
|
107
|
-
"sonarjs/prefer-immediate-return": "error",
|
|
108
|
-
"sonarjs/prefer-object-literal": "error",
|
|
109
|
-
"sonarjs/prefer-promise-shorthand": "error",
|
|
110
|
-
"sonarjs/prefer-read-only-props": "error",
|
|
111
|
-
"sonarjs/prefer-regexp-exec": "error",
|
|
112
|
-
"sonarjs/prefer-single-boolean-return": "error",
|
|
113
|
-
"sonarjs/prefer-type-guard": "error",
|
|
114
|
-
"sonarjs/prefer-while": "error",
|
|
115
|
-
"sonarjs/public-static-readonly": "error",
|
|
116
|
-
"sonarjs/redundant-type-aliases": "error",
|
|
117
|
-
"sonarjs/regex-complexity": "error",
|
|
118
|
-
"sonarjs/shorthand-property-grouping": "off",
|
|
119
|
-
"sonarjs/single-char-in-character-classes": "error",
|
|
120
|
-
"sonarjs/single-character-alternation": "error",
|
|
121
|
-
"sonarjs/stable-tests": "error",
|
|
122
|
-
"sonarjs/strings-comparison": "error",
|
|
123
|
-
"sonarjs/test-check-exception": "error",
|
|
124
|
-
"sonarjs/todo-tag": "off",
|
|
125
|
-
"sonarjs/too-many-break-or-continue-in-loop": "error",
|
|
126
|
-
"sonarjs/unused-import": "error",
|
|
127
|
-
"sonarjs/unused-named-groups": "error",
|
|
128
|
-
"sonarjs/updated-loop-counter": "error",
|
|
129
|
-
"sonarjs/use-type-alias": "error",
|
|
130
|
-
"sonarjs/values-not-convertible-to-numbers": "error",
|
|
131
|
-
"sonarjs/variable-name": "error",
|
|
132
|
-
"sonarjs/void-use": "error"
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export default suggestionRules;
|
package/rules/sonarjs.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as sonarjsRuleSets from "./sonarjs/_exports.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @import { Linter } from "eslint";
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @satisfies {Linter.RulesRecord}
|
|
9
|
-
*/
|
|
10
|
-
const sonarjsRules = Object.values(sonarjsRuleSets)
|
|
11
|
-
.reduce(
|
|
12
|
-
(allRules, ruleSet) => ({
|
|
13
|
-
...allRules,
|
|
14
|
-
...ruleSet
|
|
15
|
-
}),
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default sonarjsRules;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { minItemsForArrayNewline } from "./_common/_exports.js";
|
|
2
|
-
|
|
3
|
-
const minElementsForCurlyNewline = 3;
|
|
4
|
-
const wrapMultilinesDefault = "parens-new-line";
|
|
5
|
-
|
|
6
|
-
const bracketsRules = {
|
|
7
|
-
"@stylistic/array-bracket-newline": [
|
|
8
|
-
"error",
|
|
9
|
-
{
|
|
10
|
-
minItems: minItemsForArrayNewline,
|
|
11
|
-
multiline: true
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"@stylistic/array-bracket-spacing": ["error", "never"],
|
|
15
|
-
"@stylistic/arrow-parens": ["error", "always"],
|
|
16
|
-
"@stylistic/brace-style": ["error", "stroustrup"],
|
|
17
|
-
"@stylistic/curly-newline": [
|
|
18
|
-
"error",
|
|
19
|
-
{
|
|
20
|
-
minElements: minElementsForCurlyNewline,
|
|
21
|
-
consistent: true,
|
|
22
|
-
multiline: true
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"@stylistic/function-paren-newline": ["error", "multiline-arguments"],
|
|
26
|
-
"@stylistic/jsx-closing-bracket-location": "error",
|
|
27
|
-
"@stylistic/jsx-curly-brace-presence": [
|
|
28
|
-
"error",
|
|
29
|
-
{
|
|
30
|
-
children: "never",
|
|
31
|
-
propElementValues: "always",
|
|
32
|
-
props: "never"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"@stylistic/jsx-curly-newline": [
|
|
36
|
-
"error",
|
|
37
|
-
{
|
|
38
|
-
multiline: "consistent",
|
|
39
|
-
singleline: "forbid"
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
"@stylistic/jsx-curly-spacing": [
|
|
43
|
-
"error",
|
|
44
|
-
{
|
|
45
|
-
attributes: true,
|
|
46
|
-
children: true,
|
|
47
|
-
when: "never"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"@stylistic/jsx-wrap-multilines": [
|
|
51
|
-
"error",
|
|
52
|
-
{
|
|
53
|
-
arrow: wrapMultilinesDefault,
|
|
54
|
-
assignment: wrapMultilinesDefault,
|
|
55
|
-
condition: wrapMultilinesDefault,
|
|
56
|
-
declaration: wrapMultilinesDefault,
|
|
57
|
-
logical: wrapMultilinesDefault,
|
|
58
|
-
prop: wrapMultilinesDefault,
|
|
59
|
-
propertyValue: wrapMultilinesDefault,
|
|
60
|
-
return: wrapMultilinesDefault
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"@stylistic/new-parens": ["error", "always"],
|
|
64
|
-
"@stylistic/object-curly-newline": [
|
|
65
|
-
"error",
|
|
66
|
-
{
|
|
67
|
-
minProperties: minElementsForCurlyNewline,
|
|
68
|
-
consistent: true,
|
|
69
|
-
multiline: true
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"@stylistic/object-curly-spacing": ["error", "always"],
|
|
73
|
-
"@stylistic/space-before-function-paren": [
|
|
74
|
-
"error",
|
|
75
|
-
{
|
|
76
|
-
anonymous: "always",
|
|
77
|
-
asyncArrow: "always",
|
|
78
|
-
named: "never"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"@stylistic/space-in-parens": ["error", "never"],
|
|
82
|
-
"@stylistic/template-curly-spacing": ["error", "never"],
|
|
83
|
-
"@stylistic/wrap-iife": ["error", "inside"],
|
|
84
|
-
"@stylistic/wrap-regex": "off"
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export default bracketsRules;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const disallowRules = {
|
|
2
|
-
"@stylistic/no-confusing-arrow": "error",
|
|
3
|
-
"@stylistic/no-extra-parens": ["error", "functions"],
|
|
4
|
-
"@stylistic/no-floating-decimal": "error",
|
|
5
|
-
"@stylistic/no-mixed-spaces-and-tabs": "error",
|
|
6
|
-
"@stylistic/no-multi-spaces": [
|
|
7
|
-
"error",
|
|
8
|
-
{
|
|
9
|
-
exceptions: { Property: false }
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"@stylistic/no-multiple-empty-lines": [
|
|
13
|
-
"error",
|
|
14
|
-
{
|
|
15
|
-
max: 1,
|
|
16
|
-
maxBOF: 0,
|
|
17
|
-
maxEOF: 1
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"@stylistic/no-tabs": "off",
|
|
21
|
-
"@stylistic/no-trailing-spaces": [
|
|
22
|
-
"error",
|
|
23
|
-
{
|
|
24
|
-
ignoreComments: false,
|
|
25
|
-
skipBlankLines: false
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
|
-
"@stylistic/no-whitespace-before-property": "error"
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export default disallowRules;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const indentRules = {
|
|
2
|
-
"@stylistic/indent": [
|
|
3
|
-
"error",
|
|
4
|
-
"tab",
|
|
5
|
-
{
|
|
6
|
-
SwitchCase: 1,
|
|
7
|
-
tabLength: 4
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"@stylistic/indent-binary-ops": ["error", "tab"],
|
|
11
|
-
"@stylistic/jsx-indent-props": ["error", "tab"]
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default indentRules;
|
package/rules/stylistic/jsx.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const jsxRules = {
|
|
2
|
-
"@stylistic/exp-jsx-props-style": [
|
|
3
|
-
"error",
|
|
4
|
-
{
|
|
5
|
-
multiLine: {
|
|
6
|
-
minItems: 0
|
|
7
|
-
},
|
|
8
|
-
singleLine: {
|
|
9
|
-
maxItems: 3
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"@stylistic/jsx-child-element-spacing": "error",
|
|
14
|
-
"@stylistic/jsx-closing-tag-location": ["error", "line-aligned"],
|
|
15
|
-
"@stylistic/jsx-equals-spacing": ["error", "never"],
|
|
16
|
-
"@stylistic/jsx-max-props-per-line": [
|
|
17
|
-
"error",
|
|
18
|
-
{
|
|
19
|
-
maximum: 1,
|
|
20
|
-
when: "multiline"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"@stylistic/jsx-one-expression-per-line": ["error", { allow: "single-line" }],
|
|
24
|
-
"@stylistic/jsx-pascal-case": ["error", { allowNamespace: true }],
|
|
25
|
-
"@stylistic/jsx-self-closing-comp": "error",
|
|
26
|
-
"@stylistic/jsx-tag-spacing": [
|
|
27
|
-
"error",
|
|
28
|
-
{
|
|
29
|
-
beforeClosing: "allow",
|
|
30
|
-
beforeSelfClosing: "always",
|
|
31
|
-
afterOpening: "never",
|
|
32
|
-
closingSlash: "never"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default jsxRules;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { minItemsForArrayNewline } from "./_common/_exports.js";
|
|
2
|
-
|
|
3
|
-
const maxIgnoredChainDepth = 3;
|
|
4
|
-
|
|
5
|
-
const lineBreaksRules = {
|
|
6
|
-
"@stylistic/array-element-newline": [
|
|
7
|
-
"error",
|
|
8
|
-
{
|
|
9
|
-
minItems: minItemsForArrayNewline,
|
|
10
|
-
multiline: true
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"@stylistic/eol-last": ["error", "always"],
|
|
14
|
-
"@stylistic/function-call-argument-newline": ["error", "consistent"],
|
|
15
|
-
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
|
|
16
|
-
"@stylistic/jsx-first-prop-new-line": ["error", "multiline"],
|
|
17
|
-
"@stylistic/jsx-function-call-newline": ["error", "multiline"],
|
|
18
|
-
"@stylistic/jsx-newline": "error",
|
|
19
|
-
"@stylistic/linebreak-style": ["error", "unix"],
|
|
20
|
-
"@stylistic/lines-between-class-members": ["error", "always"],
|
|
21
|
-
"@stylistic/newline-per-chained-call": [
|
|
22
|
-
"error",
|
|
23
|
-
{
|
|
24
|
-
ignoreChainWithDepth: maxIgnoredChainDepth
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"@stylistic/object-property-newline": [
|
|
28
|
-
"error",
|
|
29
|
-
{
|
|
30
|
-
allowAllPropertiesOnSameLine: false
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"@stylistic/padding-line-between-statements": [
|
|
34
|
-
"error",
|
|
35
|
-
{
|
|
36
|
-
prev: "*",
|
|
37
|
-
next: "return",
|
|
38
|
-
blankLine: "always"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
prev: ["const", "let", "var"],
|
|
42
|
-
next: "*",
|
|
43
|
-
blankLine: "always"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
prev: ["const", "let", "var"],
|
|
47
|
-
next: ["const", "let", "var"],
|
|
48
|
-
blankLine: "any"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
prev: [
|
|
52
|
-
"return",
|
|
53
|
-
"break",
|
|
54
|
-
"block",
|
|
55
|
-
"block-like"
|
|
56
|
-
],
|
|
57
|
-
next: ["case", "default"],
|
|
58
|
-
blankLine: "always"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default lineBreaksRules;
|
package/rules/stylistic/misc.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import maximumLineLength from "../_common/maximum-line-length.js";
|
|
2
|
-
import tabWidth from "../_common/tab-width.js";
|
|
3
|
-
|
|
4
|
-
const miscRules = {
|
|
5
|
-
"@stylistic/max-len": [
|
|
6
|
-
"error",
|
|
7
|
-
{
|
|
8
|
-
code: maximumLineLength,
|
|
9
|
-
ignoreComments: true,
|
|
10
|
-
ignoreRegExpLiterals: true,
|
|
11
|
-
ignoreStrings: true,
|
|
12
|
-
ignoreTemplateLiterals: true,
|
|
13
|
-
ignoreTrailingComments: false,
|
|
14
|
-
ignoreUrls: true,
|
|
15
|
-
tabWidth
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"@stylistic/max-statements-per-line": ["error", { max: 1 }],
|
|
19
|
-
"@stylistic/member-delimiter-style": [
|
|
20
|
-
"error",
|
|
21
|
-
{
|
|
22
|
-
multiline: {
|
|
23
|
-
delimiter: "comma",
|
|
24
|
-
requireLast: false
|
|
25
|
-
},
|
|
26
|
-
multilineDetection: "brackets",
|
|
27
|
-
singleline: {
|
|
28
|
-
delimiter: "comma",
|
|
29
|
-
requireLast: false
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"@stylistic/nonblock-statement-body-position": ["error", "beside"],
|
|
34
|
-
"@stylistic/one-var-declaration-per-line": ["error", "always"],
|
|
35
|
-
"@stylistic/padded-blocks": [
|
|
36
|
-
"error",
|
|
37
|
-
{
|
|
38
|
-
blocks: "never",
|
|
39
|
-
classes: "always",
|
|
40
|
-
switches: "never"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export default miscRules;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const operatorsRules = {
|
|
2
|
-
"@stylistic/dot-location": ["error", "property"],
|
|
3
|
-
"@stylistic/multiline-ternary": ["error", "always-multiline"],
|
|
4
|
-
"@stylistic/no-mixed-operators": "error",
|
|
5
|
-
"@stylistic/operator-linebreak": [
|
|
6
|
-
"error",
|
|
7
|
-
"after",
|
|
8
|
-
{
|
|
9
|
-
overrides: {
|
|
10
|
-
":": "before",
|
|
11
|
-
"?": "before"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"@stylistic/space-infix-ops": ["error", { int32Hint: false }],
|
|
16
|
-
"@stylistic/space-unary-ops": [
|
|
17
|
-
"error",
|
|
18
|
-
{
|
|
19
|
-
nonwords: false,
|
|
20
|
-
overrides: {},
|
|
21
|
-
words: true
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default operatorsRules;
|
package/rules/stylistic/semis.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const semisRules = {
|
|
2
|
-
"@stylistic/no-extra-semi": "off",
|
|
3
|
-
"@stylistic/semi": ["error", "always"],
|
|
4
|
-
"@stylistic/semi-spacing": [
|
|
5
|
-
"error",
|
|
6
|
-
{
|
|
7
|
-
before: false,
|
|
8
|
-
after: true
|
|
9
|
-
}
|
|
10
|
-
],
|
|
11
|
-
"@stylistic/semi-style": ["error", "last"]
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default semisRules;
|