@adbayb/stack 2.32.1 → 2.33.0-next-4976f1e
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/configs/eslint/constants.js +2 -0
- package/configs/eslint/index.js +14 -14
- package/configs/eslint/presets/dependencies.js +14 -0
- package/configs/eslint/presets/eslint.js +3 -4
- package/configs/eslint/presets/import.js +9 -21
- package/configs/eslint/presets/jsdoc.js +1 -1
- package/configs/eslint/presets/node.js +6 -4
- package/configs/eslint/presets/react.js +64 -65
- package/configs/eslint/presets/sonar.js +1 -3
- package/configs/eslint/presets/stylistic.js +74 -71
- package/configs/eslint/presets/test.js +30 -5
- package/configs/eslint/presets/typescript.js +1 -2
- package/configs/eslint/presets/unicorn.js +13 -1
- package/dist/index.js +403 -409
- package/package.json +26 -28
- package/templates/multi-projects/.github/renovate.json +0 -3
- package/templates/multi-projects/.github/workflows/continuous_delivery.yml +6 -13
- package/templates/multi-projects/.github/workflows/conventional_commit.yml +2 -3
- package/templates/multi-projects/.github/workflows/dependency_changelog.yml +2 -2
- package/templates/multi-projects/.github/workflows/workflow.yml +3 -13
- package/templates/multi-projects/package.json.tmpl +11 -3
- package/templates/single-project/.github/renovate.json +0 -3
- package/templates/single-project/.github/workflows/continuous_delivery.yml +6 -13
- package/templates/single-project/.github/workflows/conventional_commit.yml +2 -3
- package/templates/single-project/.github/workflows/dependency_changelog.yml +2 -2
- package/templates/single-project/.github/workflows/workflow.yml +3 -13
- package/templates/single-project/package.json.tmpl +11 -3
- package/configs/eslint/presets/uncategorized.js +0 -42
|
@@ -11,6 +11,8 @@ const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING =
|
|
|
11
11
|
|
|
12
12
|
export const JAVASCRIPT_FILES = [`**/*.{${JAVASCRIPT_EXTENSIONS.join(",")}}`];
|
|
13
13
|
|
|
14
|
+
export const TYPESCRIPT_FILES = [`**/*.{${TYPESCRIPT_EXTENSIONS.join(",")}}`];
|
|
15
|
+
|
|
14
16
|
export const JAVASCRIPT_LIKE_FILES = [
|
|
15
17
|
`**/*.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
16
18
|
];
|
package/configs/eslint/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { config as unicornConfig } from "./presets/unicorn.js";
|
|
2
|
-
import { config as uncategorizedConfig } from "./presets/uncategorized.js";
|
|
3
|
-
import { config as typescriptConfig } from "./presets/typescript.js";
|
|
4
|
-
import { config as testConfig } from "./presets/test.js";
|
|
5
|
-
import { config as stylisticConfig } from "./presets/stylistic.js";
|
|
6
|
-
import { config as sonarConfig } from "./presets/sonar.js";
|
|
7
|
-
import { config as reactConfig } from "./presets/react.js";
|
|
8
|
-
import { prettierConfig } from "./presets/prettier.js";
|
|
9
|
-
import { config as nodeConfig } from "./presets/node.js";
|
|
10
|
-
import { config as markdownConfig } from "./presets/markdown.js";
|
|
11
|
-
import { config as jsdocConfig } from "./presets/jsdoc.js";
|
|
12
|
-
import { config as importConfig } from "./presets/import.js";
|
|
13
|
-
import { config as eslintConfig } from "./presets/eslint.js";
|
|
14
1
|
import { createConfig } from "./helpers.js";
|
|
2
|
+
import { config as dependenciesConfig } from "./presets/dependencies.js";
|
|
3
|
+
import { config as eslintConfig } from "./presets/eslint.js";
|
|
4
|
+
import { config as importConfig } from "./presets/import.js";
|
|
5
|
+
import { config as jsdocConfig } from "./presets/jsdoc.js";
|
|
6
|
+
import { config as markdownConfig } from "./presets/markdown.js";
|
|
7
|
+
import { config as nodeConfig } from "./presets/node.js";
|
|
8
|
+
import { prettierConfig } from "./presets/prettier.js";
|
|
9
|
+
import { config as reactConfig } from "./presets/react.js";
|
|
10
|
+
import { config as sonarConfig } from "./presets/sonar.js";
|
|
11
|
+
import { config as stylisticConfig } from "./presets/stylistic.js";
|
|
12
|
+
import { config as testConfig } from "./presets/test.js";
|
|
13
|
+
import { config as typescriptConfig } from "./presets/typescript.js";
|
|
14
|
+
import { config as unicornConfig } from "./presets/unicorn.js";
|
|
15
15
|
|
|
16
16
|
export default createConfig(
|
|
17
17
|
eslintConfig,
|
|
@@ -26,5 +26,5 @@ export default createConfig(
|
|
|
26
26
|
stylisticConfig,
|
|
27
27
|
testConfig,
|
|
28
28
|
unicornConfig,
|
|
29
|
-
|
|
29
|
+
dependenciesConfig,
|
|
30
30
|
);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import dependPlugin from "eslint-plugin-depend";
|
|
2
|
+
|
|
3
|
+
import { JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
5
|
+
|
|
6
|
+
export const config = createConfig({
|
|
7
|
+
files: JAVASCRIPT_LIKE_FILES,
|
|
8
|
+
plugins: {
|
|
9
|
+
depend: dependPlugin,
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
"depend/ban-dependencies": "error",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { resolve } from "node:path";
|
|
2
|
-
|
|
3
|
-
import globals from "globals";
|
|
4
1
|
import { includeIgnoreFile } from "@eslint/compat";
|
|
2
|
+
import globals from "globals";
|
|
3
|
+
import { resolve } from "node:path";
|
|
5
4
|
|
|
6
|
-
import { createConfig } from "../helpers.js";
|
|
7
5
|
import { CWD, JAVASCRIPT_FILES, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
6
|
+
import { createConfig } from "../helpers.js";
|
|
8
7
|
|
|
9
8
|
export const config = createConfig(
|
|
10
9
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import importPlugin from "eslint-plugin-import-x";
|
|
2
2
|
|
|
3
|
-
import { createConfig } from "../helpers.js";
|
|
4
3
|
import { JAVASCRIPT_LIKE_FILES, RELAXED_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
5
5
|
|
|
6
6
|
export const config = createConfig(
|
|
7
7
|
importPlugin.flatConfigs.typescript,
|
|
@@ -30,34 +30,22 @@ export const config = createConfig(
|
|
|
30
30
|
"import-x/no-relative-packages": "error",
|
|
31
31
|
"import-x/no-self-import": "error",
|
|
32
32
|
"import-x/no-unassigned-import": "error",
|
|
33
|
-
"import-x/no-unused-modules":
|
|
34
|
-
"import-x/no-useless-path-segments": [
|
|
33
|
+
"import-x/no-unused-modules": [
|
|
35
34
|
"error",
|
|
36
35
|
{
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
missingExports: true,
|
|
37
|
+
suppressMissingFileEnumeratorAPIWarning: true,
|
|
38
|
+
unusedExports: true,
|
|
39
39
|
},
|
|
40
40
|
],
|
|
41
|
-
"import-x/no-
|
|
42
|
-
"import-x/order": [
|
|
41
|
+
"import-x/no-useless-path-segments": [
|
|
43
42
|
"error",
|
|
44
43
|
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
order: "desc",
|
|
48
|
-
orderImportKind: "desc",
|
|
49
|
-
},
|
|
50
|
-
"groups": [
|
|
51
|
-
"builtin",
|
|
52
|
-
"external",
|
|
53
|
-
"internal",
|
|
54
|
-
["parent", "sibling", "index"],
|
|
55
|
-
"object",
|
|
56
|
-
"unknown",
|
|
57
|
-
],
|
|
58
|
-
"newlines-between": "always",
|
|
44
|
+
commonjs: true,
|
|
45
|
+
noUselessIndex: true,
|
|
59
46
|
},
|
|
60
47
|
],
|
|
48
|
+
"import-x/no-webpack-loader-syntax": "error",
|
|
61
49
|
"import-x/unambiguous": "error",
|
|
62
50
|
},
|
|
63
51
|
settings: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
2
2
|
|
|
3
|
-
import { createConfig } from "../helpers.js";
|
|
4
3
|
import { JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
5
5
|
|
|
6
6
|
export const config = createConfig({
|
|
7
7
|
files: JAVASCRIPT_LIKE_FILES,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { join } from "node:path";
|
|
2
|
-
|
|
3
1
|
import nodePlugin from "eslint-plugin-n";
|
|
2
|
+
import { join } from "node:path";
|
|
4
3
|
|
|
5
|
-
import { createConfig, require } from "../helpers.js";
|
|
6
4
|
import { CWD, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
5
|
+
import { createConfig, require } from "../helpers.js";
|
|
7
6
|
|
|
8
7
|
export const config = createConfig({
|
|
9
8
|
files: JAVASCRIPT_LIKE_FILES,
|
|
@@ -31,9 +30,11 @@ export const config = createConfig({
|
|
|
31
30
|
],
|
|
32
31
|
"n/prefer-global/buffer": ["error", "always"],
|
|
33
32
|
"n/prefer-global/console": ["error", "always"],
|
|
33
|
+
"n/prefer-global/crypto": ["error", "always"],
|
|
34
34
|
"n/prefer-global/process": ["error", "always"],
|
|
35
35
|
"n/prefer-global/text-decoder": ["error", "always"],
|
|
36
36
|
"n/prefer-global/text-encoder": ["error", "always"],
|
|
37
|
+
"n/prefer-global/timers": ["error", "always"],
|
|
37
38
|
"n/prefer-global/url": ["error", "always"],
|
|
38
39
|
"n/prefer-global/url-search-params": ["error", "always"],
|
|
39
40
|
"n/prefer-node-protocol": "error",
|
|
@@ -43,7 +44,8 @@ export const config = createConfig({
|
|
|
43
44
|
},
|
|
44
45
|
settings: {
|
|
45
46
|
node: {
|
|
46
|
-
version: require(join(CWD, "package.json")).
|
|
47
|
+
version: require(join(CWD, "package.json")).devEngines.runtime
|
|
48
|
+
.version,
|
|
47
49
|
},
|
|
48
50
|
},
|
|
49
51
|
});
|
|
@@ -1,100 +1,90 @@
|
|
|
1
|
-
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
2
1
|
import reactPlugin from "@eslint-react/eslint-plugin";
|
|
3
2
|
|
|
3
|
+
import {
|
|
4
|
+
JAVASCRIPT_FILES,
|
|
5
|
+
JAVASCRIPT_LIKE_FILES,
|
|
6
|
+
TYPESCRIPT_FILES,
|
|
7
|
+
} from "../constants.js";
|
|
4
8
|
import { createConfig } from "../helpers.js";
|
|
5
|
-
import { JAVASCRIPT_FILES, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
configs: { all: reactPluginConfig },
|
|
9
|
-
} = reactPlugin;
|
|
10
9
|
|
|
11
10
|
export const config = createConfig(
|
|
12
11
|
{
|
|
13
12
|
files: JAVASCRIPT_LIKE_FILES,
|
|
14
13
|
plugins: {
|
|
15
|
-
|
|
16
|
-
"react-hooks": reactHooksPlugin,
|
|
14
|
+
"@eslint-react": reactPlugin,
|
|
17
15
|
},
|
|
18
16
|
rules: {
|
|
19
|
-
"@eslint-react/dom
|
|
20
|
-
"@eslint-react/dom
|
|
21
|
-
"error",
|
|
22
|
-
"@eslint-react/dom/no-find-dom-node": "error",
|
|
23
|
-
"@eslint-react/dom/no-flush-sync": "error",
|
|
24
|
-
"@eslint-react/dom/no-hydrate": "error",
|
|
25
|
-
"@eslint-react/dom/no-missing-button-type": "error",
|
|
26
|
-
"@eslint-react/dom/no-missing-iframe-sandbox": "error",
|
|
27
|
-
"@eslint-react/dom/no-namespace": "error",
|
|
28
|
-
"@eslint-react/dom/no-render": "error",
|
|
29
|
-
"@eslint-react/dom/no-render-return-value": "error",
|
|
30
|
-
"@eslint-react/dom/no-script-url": "error",
|
|
31
|
-
"@eslint-react/dom/no-string-style-prop": "error",
|
|
32
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
|
|
33
|
-
"@eslint-react/dom/no-unsafe-target-blank": "error",
|
|
34
|
-
"@eslint-react/dom/no-use-form-state": "error",
|
|
35
|
-
"@eslint-react/dom/no-void-elements-with-children": "error",
|
|
36
|
-
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect":
|
|
17
|
+
"@eslint-react/dom-no-dangerously-set-innerhtml": "error",
|
|
18
|
+
"@eslint-react/dom-no-dangerously-set-innerhtml-with-children":
|
|
37
19
|
"error",
|
|
20
|
+
"@eslint-react/dom-no-find-dom-node": "error",
|
|
21
|
+
"@eslint-react/dom-no-flush-sync": "error",
|
|
22
|
+
"@eslint-react/dom-no-hydrate": "error",
|
|
23
|
+
"@eslint-react/dom-no-missing-button-type": "error",
|
|
24
|
+
"@eslint-react/dom-no-missing-iframe-sandbox": "error",
|
|
25
|
+
"@eslint-react/dom-no-render": "error",
|
|
26
|
+
"@eslint-react/dom-no-render-return-value": "error",
|
|
27
|
+
"@eslint-react/dom-no-script-url": "error",
|
|
28
|
+
"@eslint-react/dom-no-string-style-prop": "error",
|
|
29
|
+
"@eslint-react/dom-no-unknown-property": "error",
|
|
30
|
+
"@eslint-react/dom-no-unsafe-iframe-sandbox": "error",
|
|
31
|
+
"@eslint-react/dom-no-unsafe-target-blank": "error",
|
|
32
|
+
"@eslint-react/dom-no-use-form-state": "error",
|
|
33
|
+
"@eslint-react/dom-no-void-elements-with-children": "error",
|
|
34
|
+
"@eslint-react/error-boundaries": "error",
|
|
35
|
+
"@eslint-react/exhaustive-deps": "warn",
|
|
36
|
+
"@eslint-react/globals": "error",
|
|
37
|
+
"@eslint-react/immutability": "error",
|
|
38
|
+
"@eslint-react/jsx-no-children-prop": "error",
|
|
39
|
+
"@eslint-react/jsx-no-children-prop-with-children": "error",
|
|
38
40
|
"@eslint-react/jsx-no-comment-textnodes": "error",
|
|
39
|
-
"@eslint-react/jsx-no-
|
|
40
|
-
"@eslint-react/jsx-
|
|
41
|
-
"@eslint-react/jsx-
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/naming-convention
|
|
41
|
+
"@eslint-react/jsx-no-key-after-spread": "error",
|
|
42
|
+
"@eslint-react/jsx-no-leaked-dollar": "error",
|
|
43
|
+
"@eslint-react/jsx-no-leaked-semicolon": "error",
|
|
44
|
+
"@eslint-react/jsx-no-namespace": "error",
|
|
45
|
+
"@eslint-react/jsx-no-useless-fragment": "error",
|
|
46
|
+
"@eslint-react/naming-convention-context-name": "error",
|
|
47
|
+
"@eslint-react/naming-convention-id-name": "error",
|
|
48
|
+
"@eslint-react/naming-convention-ref-name": "error",
|
|
45
49
|
"@eslint-react/no-access-state-in-setstate": "error",
|
|
46
|
-
"@eslint-react/no-
|
|
50
|
+
"@eslint-react/no-array-index-key": "error",
|
|
47
51
|
"@eslint-react/no-class-component": "error",
|
|
48
52
|
"@eslint-react/no-context-provider": "error",
|
|
49
53
|
"@eslint-react/no-create-ref": "error",
|
|
50
|
-
"@eslint-react/no-default-props": "error",
|
|
51
54
|
"@eslint-react/no-direct-mutation-state": "error",
|
|
52
55
|
"@eslint-react/no-duplicate-key": "error",
|
|
53
|
-
"@eslint-react/no-forbidden-props": "error",
|
|
54
56
|
"@eslint-react/no-forward-ref": "error",
|
|
57
|
+
"@eslint-react/no-implicit-children": "error",
|
|
55
58
|
"@eslint-react/no-implicit-key": "error",
|
|
59
|
+
"@eslint-react/no-implicit-ref": "error",
|
|
56
60
|
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
57
61
|
"@eslint-react/no-missing-component-display-name": "error",
|
|
58
62
|
"@eslint-react/no-missing-key": "error",
|
|
59
63
|
"@eslint-react/no-misused-capture-owner-stack": "error",
|
|
60
64
|
"@eslint-react/no-nested-component-definitions": "error",
|
|
61
65
|
"@eslint-react/no-nested-lazy-component-declarations": "error",
|
|
62
|
-
"@eslint-react/no-prop-types": "error",
|
|
63
|
-
"@eslint-react/no-string-refs": "error",
|
|
64
|
-
"@eslint-react/no-unnecessary-key": "error",
|
|
65
|
-
"@eslint-react/no-unnecessary-use-callback": "error",
|
|
66
|
-
"@eslint-react/no-unnecessary-use-memo": "error",
|
|
67
66
|
"@eslint-react/no-unnecessary-use-prefix": "error",
|
|
68
67
|
"@eslint-react/no-unstable-context-value": "error",
|
|
69
68
|
"@eslint-react/no-unstable-default-props": "error",
|
|
70
69
|
"@eslint-react/no-unused-props": "error",
|
|
70
|
+
"@eslint-react/no-unused-state": "error",
|
|
71
71
|
"@eslint-react/no-use-context": "error",
|
|
72
|
-
"@eslint-react/
|
|
73
|
-
"@eslint-react/
|
|
74
|
-
"@eslint-react/
|
|
75
|
-
"@eslint-react/
|
|
76
|
-
"@eslint-react/
|
|
77
|
-
"@eslint-react/
|
|
78
|
-
"@eslint-react/
|
|
79
|
-
"react
|
|
80
|
-
"react-
|
|
81
|
-
"react
|
|
82
|
-
"react
|
|
83
|
-
"react-
|
|
84
|
-
"react-
|
|
85
|
-
"react-
|
|
86
|
-
"react
|
|
87
|
-
"react-hooks/preserve-manual-memoization": "error",
|
|
88
|
-
"react-hooks/purity": "error",
|
|
89
|
-
"react-hooks/refs": "error",
|
|
90
|
-
"react-hooks/rules-of-hooks": "error",
|
|
91
|
-
"react-hooks/set-state-in-effect": "error",
|
|
92
|
-
"react-hooks/set-state-in-render": "error",
|
|
93
|
-
"react-hooks/static-components": "error",
|
|
94
|
-
"react-hooks/unsupported-syntax": "error",
|
|
95
|
-
"react-hooks/use-memo": "error",
|
|
72
|
+
"@eslint-react/purity": "error",
|
|
73
|
+
"@eslint-react/refs": "error",
|
|
74
|
+
"@eslint-react/rsc-function-definition": "error",
|
|
75
|
+
"@eslint-react/rules-of-hooks": "error",
|
|
76
|
+
"@eslint-react/set-state-in-effect": "error",
|
|
77
|
+
"@eslint-react/set-state-in-render": "error",
|
|
78
|
+
"@eslint-react/static-components": "error",
|
|
79
|
+
"@eslint-react/unsupported-syntax": "error",
|
|
80
|
+
"@eslint-react/use-memo": "error",
|
|
81
|
+
"@eslint-react/use-state": "error",
|
|
82
|
+
"@eslint-react/web-api-no-leaked-event-listener": "error",
|
|
83
|
+
"@eslint-react/web-api-no-leaked-fetch": "error",
|
|
84
|
+
"@eslint-react/web-api-no-leaked-interval": "error",
|
|
85
|
+
"@eslint-react/web-api-no-leaked-resize-observer": "error",
|
|
86
|
+
"@eslint-react/web-api-no-leaked-timeout": "error",
|
|
96
87
|
},
|
|
97
|
-
settings: reactPluginConfig.settings,
|
|
98
88
|
},
|
|
99
89
|
{
|
|
100
90
|
files: JAVASCRIPT_FILES,
|
|
@@ -104,8 +94,17 @@ export const config = createConfig(
|
|
|
104
94
|
* Until the React X plugin provides a `disableTypeChecked`-like preset, we must maintain the rule list manually
|
|
105
95
|
* following the [documentation](https://eslint-react.xyz/docs/configuration/configure-project-config#type-information).
|
|
106
96
|
*/
|
|
97
|
+
"@eslint-react/no-implicit-children": "off",
|
|
98
|
+
"@eslint-react/no-implicit-key": "off",
|
|
99
|
+
"@eslint-react/no-implicit-ref": "off",
|
|
107
100
|
"@eslint-react/no-leaked-conditional-rendering": "off",
|
|
108
101
|
"@eslint-react/no-unused-props": "off",
|
|
109
102
|
},
|
|
110
103
|
},
|
|
104
|
+
{
|
|
105
|
+
files: TYPESCRIPT_FILES,
|
|
106
|
+
rules: {
|
|
107
|
+
"@eslint-react/no-implicit-key": "error",
|
|
108
|
+
},
|
|
109
|
+
},
|
|
111
110
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sonarjsPlugin from "eslint-plugin-sonarjs";
|
|
2
2
|
|
|
3
|
-
import { createConfig } from "../helpers.js";
|
|
4
3
|
import { JAVASCRIPT_LIKE_FILES, RELAXED_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
5
5
|
|
|
6
6
|
export const config = createConfig(
|
|
7
7
|
{
|
|
@@ -100,7 +100,6 @@ export const config = createConfig(
|
|
|
100
100
|
"sonarjs/no-globals-shadowing": "error",
|
|
101
101
|
"sonarjs/no-gratuitous-expressions": "error",
|
|
102
102
|
"sonarjs/no-hardcoded-ip": "error",
|
|
103
|
-
// eslint-disable-next-line sonarjs/no-hardcoded-passwords
|
|
104
103
|
"sonarjs/no-hardcoded-passwords": "error",
|
|
105
104
|
"sonarjs/no-hardcoded-secrets": "error",
|
|
106
105
|
"sonarjs/no-hook-setter-in-body": "error",
|
|
@@ -178,7 +177,6 @@ export const config = createConfig(
|
|
|
178
177
|
"sonarjs/stable-tests": "error",
|
|
179
178
|
"sonarjs/stateful-regex": "error",
|
|
180
179
|
"sonarjs/strict-transport-security": "error",
|
|
181
|
-
"sonarjs/super-invocation": "error",
|
|
182
180
|
"sonarjs/table-header": "error",
|
|
183
181
|
"sonarjs/table-header-reference": "error",
|
|
184
182
|
"sonarjs/test-check-exception": "error",
|
|
@@ -1,76 +1,79 @@
|
|
|
1
1
|
import stylistic from "@stylistic/eslint-plugin";
|
|
2
|
+
import perfectionist from "eslint-plugin-perfectionist";
|
|
2
3
|
|
|
3
|
-
import { createConfig } from "../helpers.js";
|
|
4
4
|
import { JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
5
|
+
import { createConfig } from "../helpers.js";
|
|
5
6
|
|
|
6
|
-
export const config = createConfig(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
7
|
+
export const config = createConfig(
|
|
8
|
+
perfectionist.configs["recommended-alphabetical"],
|
|
9
|
+
{
|
|
10
|
+
files: JAVASCRIPT_LIKE_FILES,
|
|
11
|
+
plugins: {
|
|
12
|
+
"@stylistic": stylistic,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
"@stylistic/jsx-pascal-case": "error",
|
|
16
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
17
|
+
"@stylistic/lines-between-class-members": ["error", "always"],
|
|
18
|
+
"@stylistic/multiline-comment-style": ["error", "starred-block"],
|
|
19
|
+
"@stylistic/padding-line-between-statements": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
blankLine: "always",
|
|
23
|
+
next: "*",
|
|
24
|
+
prev: "*",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
blankLine: "never",
|
|
28
|
+
next: ["const", "let", "var"],
|
|
29
|
+
prev: ["const", "let", "var"],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
blankLine: "never",
|
|
33
|
+
next: ["case", "default"],
|
|
34
|
+
prev: ["case", "default"],
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
blankLine: "always",
|
|
38
|
+
next: ["const", "let", "var"],
|
|
39
|
+
prev: ["multiline-const", "multiline-let", "multiline-var"],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
blankLine: "always",
|
|
43
|
+
next: ["multiline-const", "multiline-let", "multiline-var"],
|
|
44
|
+
prev: ["const", "let", "var"],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
blankLine: "any",
|
|
48
|
+
next: ["expression"],
|
|
49
|
+
prev: ["expression"],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
blankLine: "any",
|
|
53
|
+
next: ["const", "let", "var"],
|
|
54
|
+
prev: ["cjs-import"],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
blankLine: "any",
|
|
58
|
+
next: ["cjs-import", "import"],
|
|
59
|
+
prev: ["cjs-import", "import"],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
blankLine: "any",
|
|
63
|
+
next: ["cjs-export", "export"],
|
|
64
|
+
prev: ["cjs-export", "export"],
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
"@stylistic/quotes": [
|
|
68
|
+
"error",
|
|
69
|
+
"double",
|
|
70
|
+
{ allowTemplateLiterals: "avoidEscape", avoidEscape: true },
|
|
71
|
+
],
|
|
72
|
+
"@stylistic/spaced-comment": [
|
|
73
|
+
"error",
|
|
74
|
+
"always",
|
|
75
|
+
{ block: { balanced: true } },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
75
78
|
},
|
|
76
|
-
|
|
79
|
+
);
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
-
import jestFormattingPlugin from "eslint-plugin-jest-formatting";
|
|
2
1
|
import vitestPlugin from "@vitest/eslint-plugin";
|
|
3
2
|
|
|
4
|
-
import { createConfig } from "../helpers.js";
|
|
5
3
|
import { TEST_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
6
5
|
|
|
7
6
|
export const config = createConfig({
|
|
8
7
|
files: TEST_LIKE_FILES,
|
|
9
8
|
plugins: {
|
|
10
|
-
|
|
11
|
-
"vitest": vitestPlugin,
|
|
9
|
+
vitest: vitestPlugin,
|
|
12
10
|
},
|
|
13
11
|
rules: {
|
|
14
|
-
"
|
|
12
|
+
"vitest/consistent-each-for": [
|
|
13
|
+
"error",
|
|
14
|
+
{
|
|
15
|
+
describe: "for",
|
|
16
|
+
it: "for",
|
|
17
|
+
suite: "for",
|
|
18
|
+
test: "for",
|
|
19
|
+
},
|
|
20
|
+
],
|
|
15
21
|
"vitest/consistent-test-it": [
|
|
16
22
|
"error",
|
|
17
23
|
{ fn: "test", withinDescribe: "test" },
|
|
18
24
|
],
|
|
25
|
+
"vitest/consistent-vitest-vi": ["error", { fn: "vi" }],
|
|
19
26
|
"vitest/expect-expect": "error",
|
|
20
27
|
"vitest/max-nested-describe": ["error", { max: 1 }],
|
|
21
28
|
"vitest/no-alias-methods": "error",
|
|
@@ -29,29 +36,47 @@ export const config = createConfig({
|
|
|
29
36
|
"vitest/no-focused-tests": "error",
|
|
30
37
|
"vitest/no-identical-title": "error",
|
|
31
38
|
"vitest/no-import-node-test": "error",
|
|
39
|
+
"vitest/no-interpolation-in-snapshots": "error",
|
|
32
40
|
"vitest/no-mocks-import": "error",
|
|
33
41
|
"vitest/no-standalone-expect": "error",
|
|
42
|
+
"vitest/no-test-prefixes": "error",
|
|
34
43
|
"vitest/no-test-return-statement": "error",
|
|
44
|
+
"vitest/no-unneeded-async-expect-function": "error",
|
|
45
|
+
"vitest/padding-around-all": "error",
|
|
46
|
+
"vitest/prefer-called-exactly-once-with": "error",
|
|
47
|
+
"vitest/prefer-called-once": "error",
|
|
35
48
|
"vitest/prefer-called-with": "error",
|
|
36
49
|
"vitest/prefer-comparison-matcher": "error",
|
|
50
|
+
"vitest/prefer-describe-function-title": "error",
|
|
37
51
|
"vitest/prefer-each": "error",
|
|
38
52
|
"vitest/prefer-equality-matcher": "error",
|
|
53
|
+
"vitest/prefer-expect-resolves": "error",
|
|
54
|
+
"vitest/prefer-expect-type-of": "error",
|
|
39
55
|
"vitest/prefer-hooks-in-order": "error",
|
|
40
56
|
"vitest/prefer-hooks-on-top": "error",
|
|
57
|
+
"vitest/prefer-import-in-mock": "error",
|
|
58
|
+
"vitest/prefer-importing-vitest-globals": "error",
|
|
41
59
|
"vitest/prefer-lowercase-title": ["error", { ignore: ["describe"] }],
|
|
42
60
|
"vitest/prefer-mock-promise-shorthand": "error",
|
|
61
|
+
"vitest/prefer-mock-return-shorthand": "error",
|
|
62
|
+
"vitest/prefer-spy-on": "error",
|
|
63
|
+
"vitest/prefer-strict-boolean-matchers": "error",
|
|
43
64
|
"vitest/prefer-strict-equal": "error",
|
|
44
65
|
"vitest/prefer-to-be": "error",
|
|
45
66
|
"vitest/prefer-to-be-object": "error",
|
|
46
67
|
"vitest/prefer-to-contain": "error",
|
|
68
|
+
"vitest/prefer-to-have-been-called-times": "error",
|
|
47
69
|
"vitest/prefer-to-have-length": "error",
|
|
48
70
|
"vitest/prefer-todo": "error",
|
|
71
|
+
"vitest/prefer-vi-mocked": "error",
|
|
72
|
+
"vitest/require-awaited-expect-poll": "error",
|
|
49
73
|
"vitest/require-hook": "error",
|
|
50
74
|
"vitest/require-local-test-context-for-concurrent-snapshots": "error",
|
|
51
75
|
"vitest/require-to-throw-message": "error",
|
|
52
76
|
"vitest/require-top-level-describe": "error",
|
|
53
77
|
"vitest/valid-describe-callback": "error",
|
|
54
78
|
"vitest/valid-expect": "error",
|
|
79
|
+
"vitest/valid-expect-in-promise": "error",
|
|
55
80
|
"vitest/valid-title": ["error", { mustMatch: { test: ["^should "] } }],
|
|
56
81
|
},
|
|
57
82
|
settings: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import tseslint from "typescript-eslint";
|
|
2
2
|
|
|
3
|
-
import { createConfig } from "../helpers.js";
|
|
4
3
|
import { JAVASCRIPT_FILES, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
4
|
+
import { createConfig } from "../helpers.js";
|
|
5
5
|
|
|
6
6
|
export const config = createConfig(
|
|
7
7
|
{
|
|
@@ -183,7 +183,6 @@ export const config = createConfig(
|
|
|
183
183
|
],
|
|
184
184
|
"@typescript-eslint/restrict-template-expressions": "error",
|
|
185
185
|
"@typescript-eslint/return-await": "error",
|
|
186
|
-
"@typescript-eslint/sort-type-constituents": "error",
|
|
187
186
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
188
187
|
"@typescript-eslint/triple-slash-reference": "error",
|
|
189
188
|
"@typescript-eslint/unbound-method": "error",
|