@adbayb/stack 2.39.0 → 2.40.0-next-7baa8ed
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/bin/index.js +1 -1
- package/configs/{prettier → oxfmt}/README.md +6 -14
- package/configs/{prettier/index.js → oxfmt/index.ts} +13 -9
- package/configs/{eslint → oxlint}/README.md +4 -4
- package/configs/oxlint/index.ts +28 -0
- package/configs/typescript/index.json +1 -7
- package/dist/index.js +204 -162
- package/package.json +26 -44
- package/templates/multi-projects/.vscode/extensions.json +1 -1
- package/templates/multi-projects/.vscode/settings.json +7 -13
- package/templates/{single-project/package.json.tmpl → multi-projects/package.json} +7 -13
- package/templates/multi-projects/{pnpm-workspace.yaml.tmpl → pnpm-workspace.yaml} +2 -0
- package/templates/single-project/.vscode/extensions.json +1 -1
- package/templates/single-project/.vscode/settings.json +7 -13
- package/templates/{multi-projects/package.json.tmpl → single-project/package.json} +7 -13
- package/templates/single-project/{pnpm-workspace.yaml.tmpl → pnpm-workspace.yaml} +2 -0
- package/configs/eslint/constants.js +0 -37
- package/configs/eslint/helpers.js +0 -5
- package/configs/eslint/index.js +0 -30
- package/configs/eslint/presets/dependencies.js +0 -14
- package/configs/eslint/presets/eslint.js +0 -133
- package/configs/eslint/presets/import.js +0 -65
- package/configs/eslint/presets/jsdoc.js +0 -78
- package/configs/eslint/presets/markdown.js +0 -1
- package/configs/eslint/presets/node.js +0 -51
- package/configs/eslint/presets/prettier.js +0 -1
- package/configs/eslint/presets/react.js +0 -111
- package/configs/eslint/presets/sonar.js +0 -201
- package/configs/eslint/presets/stylistic.js +0 -79
- package/configs/eslint/presets/test.js +0 -87
- package/configs/eslint/presets/typescript.js +0 -198
- package/configs/eslint/presets/unicorn.js +0 -257
- package/templates/multi-projects/.npmrc.tmpl +0 -1
- package/templates/single-project/.npmrc.tmpl +0 -1
- package/templates/multi-projects/.changeset/{config.json.tmpl → config.json} +0 -0
- package/templates/multi-projects/.changeset/{welcome.md.tmpl → welcome.md} +0 -0
- package/templates/multi-projects/.github/{PULL_REQUEST_TEMPLATE.md.tmpl → PULL_REQUEST_TEMPLATE.md} +0 -0
- package/templates/multi-projects/{.nvmrc.tmpl → .nvmrc} +0 -0
- package/templates/multi-projects/{CONTRIBUTING.md.tmpl → CONTRIBUTING.md} +0 -0
- package/templates/multi-projects/{LICENSE.tmpl → LICENSE} +0 -0
- package/templates/multi-projects/examples/default/{package.json.tmpl → package.json} +0 -0
- package/templates/multi-projects/examples/default/src/{index.ts.tmpl → index.ts} +0 -0
- package/templates/multi-projects/libraries/{{projectName}}/{README.md.tmpl → README.md} +0 -0
- package/templates/multi-projects/libraries/{{projectName}}/{package.json.tmpl → package.json} +10 -10
- package/templates/multi-projects/libraries/{{projectName}}/src/{index.test.ts.tmpl → index.test.ts} +0 -0
- package/templates/single-project/.changeset/{config.json.tmpl → config.json} +0 -0
- package/templates/single-project/.changeset/{welcome.md.tmpl → welcome.md} +0 -0
- package/templates/single-project/.github/{PULL_REQUEST_TEMPLATE.md.tmpl → PULL_REQUEST_TEMPLATE.md} +0 -0
- package/templates/single-project/{.nvmrc.tmpl → .nvmrc} +0 -0
- package/templates/single-project/{CONTRIBUTING.md.tmpl → CONTRIBUTING.md} +0 -0
- package/templates/single-project/{LICENSE.tmpl → LICENSE} +0 -0
- package/templates/single-project/examples/default/{package.json.tmpl → package.json} +0 -0
- package/templates/single-project/examples/default/src/{index.ts.tmpl → index.ts} +0 -0
- package/templates/single-project/{{projectName}}/{README.md.tmpl → README.md} +0 -0
- package/templates/single-project/{{projectName}}/{package.json.tmpl → package.json} +10 -10
- /package/templates/single-project/{{projectName}}/src/{index.test.ts.tmpl → index.test.ts} +0 -0
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"javascriptreact",
|
|
5
|
-
"typescript",
|
|
6
|
-
"typescriptreact",
|
|
7
|
-
"markdown",
|
|
8
|
-
"mdx",
|
|
9
|
-
"astro"
|
|
10
|
-
],
|
|
2
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
3
|
+
"editor.formatOnSave": true,
|
|
11
4
|
"editor.codeActionsOnSave": {
|
|
12
|
-
"source.
|
|
13
|
-
"source.fixAll.
|
|
14
|
-
"source.
|
|
5
|
+
"source.format.oxc": "always",
|
|
6
|
+
"source.fixAll.oxc": "always",
|
|
7
|
+
"source.fixAll.ts": "always",
|
|
8
|
+
"source.addMissingImports.ts": "always",
|
|
15
9
|
"source.organizeImports": "never",
|
|
16
|
-
"source.organizeLinkDefinitions": "
|
|
10
|
+
"source.organizeLinkDefinitions": "always",
|
|
17
11
|
"source.removeUnused.ts": "never",
|
|
18
12
|
"source.removeUnusedImports": "never",
|
|
19
13
|
"source.sortImports": "never"
|
|
@@ -16,23 +16,17 @@
|
|
|
16
16
|
"test": "stack test",
|
|
17
17
|
"watch": "stack watch"
|
|
18
18
|
},
|
|
19
|
-
"prettier": "@adbayb/stack/prettier",
|
|
20
|
-
"packageManager": "pnpm@{{npmVersion}}",
|
|
21
19
|
"devEngines": {
|
|
22
|
-
"packageManager":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "npm"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
20
|
+
"packageManager": {
|
|
21
|
+
"name": "pnpm",
|
|
22
|
+
"version": "{{pnpmVersion}}",
|
|
23
|
+
"onFail": "download"
|
|
24
|
+
},
|
|
32
25
|
"runtime": {
|
|
33
26
|
"name": "node",
|
|
34
27
|
"version": ">=24.0.0",
|
|
35
28
|
"onFail": "error"
|
|
36
29
|
}
|
|
37
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"packageManager": "pnpm@{{pnpmVersion}}"
|
|
38
32
|
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"javascriptreact",
|
|
5
|
-
"typescript",
|
|
6
|
-
"typescriptreact",
|
|
7
|
-
"markdown",
|
|
8
|
-
"mdx",
|
|
9
|
-
"astro"
|
|
10
|
-
],
|
|
2
|
+
"editor.defaultFormatter": "oxc.oxc-vscode",
|
|
3
|
+
"editor.formatOnSave": true,
|
|
11
4
|
"editor.codeActionsOnSave": {
|
|
12
|
-
"source.
|
|
13
|
-
"source.fixAll.
|
|
14
|
-
"source.
|
|
5
|
+
"source.format.oxc": "always",
|
|
6
|
+
"source.fixAll.oxc": "always",
|
|
7
|
+
"source.fixAll.ts": "always",
|
|
8
|
+
"source.addMissingImports.ts": "always",
|
|
15
9
|
"source.organizeImports": "never",
|
|
16
|
-
"source.organizeLinkDefinitions": "
|
|
10
|
+
"source.organizeLinkDefinitions": "always",
|
|
17
11
|
"source.removeUnused.ts": "never",
|
|
18
12
|
"source.removeUnusedImports": "never",
|
|
19
13
|
"source.sortImports": "never"
|
|
@@ -16,23 +16,17 @@
|
|
|
16
16
|
"test": "stack test",
|
|
17
17
|
"watch": "stack watch"
|
|
18
18
|
},
|
|
19
|
-
"prettier": "@adbayb/stack/prettier",
|
|
20
|
-
"packageManager": "pnpm@{{npmVersion}}",
|
|
21
19
|
"devEngines": {
|
|
22
|
-
"packageManager":
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "npm"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
20
|
+
"packageManager": {
|
|
21
|
+
"name": "pnpm",
|
|
22
|
+
"version": "{{pnpmVersion}}",
|
|
23
|
+
"onFail": "download"
|
|
24
|
+
},
|
|
32
25
|
"runtime": {
|
|
33
26
|
"name": "node",
|
|
34
27
|
"version": ">=24.0.0",
|
|
35
28
|
"onFail": "error"
|
|
36
29
|
}
|
|
37
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"packageManager": "pnpm@{{pnpmVersion}}"
|
|
38
32
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const JAVASCRIPT_EXTENSIONS = ["js", "jsx", "cjs", "mjs", "mjsx"];
|
|
2
|
-
const TYPESCRIPT_EXTENSIONS = ["ts", "tsx", "cts", "mts", "mtsx"];
|
|
3
|
-
|
|
4
|
-
const JAVASCRIPT_LIKE_EXTENSIONS = [
|
|
5
|
-
...JAVASCRIPT_EXTENSIONS,
|
|
6
|
-
...TYPESCRIPT_EXTENSIONS,
|
|
7
|
-
];
|
|
8
|
-
|
|
9
|
-
const JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING =
|
|
10
|
-
JAVASCRIPT_LIKE_EXTENSIONS.join(",");
|
|
11
|
-
|
|
12
|
-
export const JAVASCRIPT_FILES = [`**/*.{${JAVASCRIPT_EXTENSIONS.join(",")}}`];
|
|
13
|
-
|
|
14
|
-
export const TYPESCRIPT_FILES = [`**/*.{${TYPESCRIPT_EXTENSIONS.join(",")}}`];
|
|
15
|
-
|
|
16
|
-
export const JAVASCRIPT_LIKE_FILES = [
|
|
17
|
-
`**/*.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
export const TEST_LIKE_FILES = [
|
|
21
|
-
`**/{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
22
|
-
`**/*.{test,test-d}.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
export const RELAXED_LIKE_FILES = [
|
|
26
|
-
...TEST_LIKE_FILES,
|
|
27
|
-
"**/?(.)config?(s)/**",
|
|
28
|
-
"**/examples/**",
|
|
29
|
-
"**/scripts/**",
|
|
30
|
-
"**/tools/**",
|
|
31
|
-
`**/config?(s).{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
32
|
-
`**/*.config?(s).{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
33
|
-
`**/stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
34
|
-
`**/*.stories.{${JAVASCRIPT_LIKE_EXTENSIONS_AS_STRING}}`,
|
|
35
|
-
];
|
|
36
|
-
|
|
37
|
-
export const CWD = process.cwd();
|
package/configs/eslint/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
|
|
16
|
-
export default createConfig(
|
|
17
|
-
eslintConfig,
|
|
18
|
-
typescriptConfig,
|
|
19
|
-
prettierConfig,
|
|
20
|
-
importConfig,
|
|
21
|
-
jsdocConfig,
|
|
22
|
-
markdownConfig,
|
|
23
|
-
nodeConfig,
|
|
24
|
-
reactConfig,
|
|
25
|
-
sonarConfig,
|
|
26
|
-
stylisticConfig,
|
|
27
|
-
testConfig,
|
|
28
|
-
unicornConfig,
|
|
29
|
-
dependenciesConfig,
|
|
30
|
-
);
|
|
@@ -1,14 +0,0 @@
|
|
|
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,133 +0,0 @@
|
|
|
1
|
-
import { includeIgnoreFile } from "@eslint/compat";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
import { resolve } from "node:path";
|
|
4
|
-
|
|
5
|
-
import { CWD, JAVASCRIPT_FILES, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
6
|
-
import { createConfig } from "../helpers.js";
|
|
7
|
-
|
|
8
|
-
export const config = createConfig(
|
|
9
|
-
{
|
|
10
|
-
languageOptions: {
|
|
11
|
-
ecmaVersion: "latest",
|
|
12
|
-
globals: {
|
|
13
|
-
...globals.browser,
|
|
14
|
-
...globals.node,
|
|
15
|
-
...globals.worker,
|
|
16
|
-
},
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaFeatures: {
|
|
19
|
-
jsx: true,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
sourceType: "module",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
includeIgnoreFile(resolve(CWD, ".gitignore")),
|
|
26
|
-
{
|
|
27
|
-
/*
|
|
28
|
-
* Specific ESLint rules for javascript-only files (as they're already handled for TypeScript files by the transpiler):
|
|
29
|
-
* This rule list is taken from https://typescript-eslint.io/users/configs/#recommended
|
|
30
|
-
*/
|
|
31
|
-
files: JAVASCRIPT_FILES,
|
|
32
|
-
rules: {
|
|
33
|
-
"constructor-super": "error", // ts(2335) & ts(2377)
|
|
34
|
-
"getter-return": "error", // ts(2378)
|
|
35
|
-
"no-const-assign": "error", // ts(2588)
|
|
36
|
-
"no-dupe-args": "error", // ts(2300)
|
|
37
|
-
"no-dupe-class-members": "error", // ts(2393) & ts(2300)
|
|
38
|
-
"no-dupe-keys": "error", // ts(1117)
|
|
39
|
-
"no-func-assign": "error", // ts(2630)
|
|
40
|
-
"no-import-assign": "error", // ts(2632) & ts(2540)
|
|
41
|
-
"no-new-native-nonconstructor": "error", // ts(7009)
|
|
42
|
-
"no-obj-calls": "error", // ts(2349)
|
|
43
|
-
"no-redeclare": "error", // ts(2451)
|
|
44
|
-
"no-setter-return": "error", // ts(2408)
|
|
45
|
-
"no-this-before-super": "error", // ts(2376) & ts(17009)
|
|
46
|
-
"no-undef": "error", // ts(2304) & ts(2552)
|
|
47
|
-
"no-unreachable": "error", // ts(7027)
|
|
48
|
-
"no-unsafe-negation": "error", // ts(2365) & ts(2322) & ts(2358)
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
// ESLint rules for JavaScript + TypeScript files:
|
|
53
|
-
files: JAVASCRIPT_LIKE_FILES,
|
|
54
|
-
rules: {
|
|
55
|
-
"eqeqeq": "error",
|
|
56
|
-
"for-direction": "error",
|
|
57
|
-
"max-params": ["error", { max: 4 }],
|
|
58
|
-
"no-alert": "error",
|
|
59
|
-
"no-async-promise-executor": "error",
|
|
60
|
-
"no-case-declarations": "error",
|
|
61
|
-
"no-class-assign": "error",
|
|
62
|
-
"no-compare-neg-zero": "error",
|
|
63
|
-
"no-cond-assign": "error",
|
|
64
|
-
"no-constant-binary-expression": "error",
|
|
65
|
-
"no-constant-condition": "error",
|
|
66
|
-
"no-control-regex": "error",
|
|
67
|
-
"no-debugger": "error",
|
|
68
|
-
"no-delete-var": "error",
|
|
69
|
-
"no-dupe-else-if": "error",
|
|
70
|
-
"no-duplicate-case": "error",
|
|
71
|
-
"no-empty": "error",
|
|
72
|
-
"no-empty-character-class": "error",
|
|
73
|
-
"no-empty-pattern": "error",
|
|
74
|
-
"no-empty-static-block": "error",
|
|
75
|
-
"no-ex-assign": "error",
|
|
76
|
-
"no-extend-native": "error",
|
|
77
|
-
"no-extra-boolean-cast": "error",
|
|
78
|
-
"no-fallthrough": "error",
|
|
79
|
-
"no-global-assign": "error",
|
|
80
|
-
"no-implicit-coercion": "error",
|
|
81
|
-
"no-invalid-regexp": "error",
|
|
82
|
-
"no-irregular-whitespace": "error",
|
|
83
|
-
"no-lonely-if": "error",
|
|
84
|
-
"no-loss-of-precision": "error",
|
|
85
|
-
"no-misleading-character-class": "error",
|
|
86
|
-
"no-nonoctal-decimal-escape": "error",
|
|
87
|
-
"no-octal": "error",
|
|
88
|
-
"no-prototype-builtins": "error",
|
|
89
|
-
"no-regex-spaces": "error",
|
|
90
|
-
"no-restricted-syntax": [
|
|
91
|
-
"error",
|
|
92
|
-
/*
|
|
93
|
-
* https://medium.com/@hbarcelos/why-i-banned-null-from-my-js-code-and-why-you-should-too-13df90323cfa
|
|
94
|
-
* https://www.youtube.com/watch?v=PSGEjv3Tqo0&t=561s
|
|
95
|
-
*/
|
|
96
|
-
{
|
|
97
|
-
message: "Use `undefined` instead of `null`.",
|
|
98
|
-
selector: "VariableDeclarator > Literal[raw='null']",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
message: "Use `undefined` instead of `null`.",
|
|
102
|
-
selector: "AssignmentExpression > Literal[raw='null']",
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
"no-self-assign": "error",
|
|
106
|
-
"no-shadow-restricted-names": "error",
|
|
107
|
-
"no-sparse-arrays": "error",
|
|
108
|
-
"no-template-curly-in-string": "error",
|
|
109
|
-
"no-unexpected-multiline": "error",
|
|
110
|
-
"no-unsafe-finally": "error",
|
|
111
|
-
"no-unsafe-optional-chaining": "error",
|
|
112
|
-
"no-unused-labels": "error",
|
|
113
|
-
"no-unused-private-class-members": "error",
|
|
114
|
-
"no-useless-backreference": "error",
|
|
115
|
-
"no-useless-call": "error",
|
|
116
|
-
"no-useless-catch": "error",
|
|
117
|
-
"no-useless-escape": "error",
|
|
118
|
-
"no-var": "error",
|
|
119
|
-
"no-with": "error",
|
|
120
|
-
"object-shorthand": ["error", "always"],
|
|
121
|
-
"prefer-arrow-callback": ["error", { allowNamedFunctions: true }],
|
|
122
|
-
"prefer-const": "error",
|
|
123
|
-
"prefer-object-spread": "error",
|
|
124
|
-
"prefer-rest-params": "error",
|
|
125
|
-
"prefer-spread": "error",
|
|
126
|
-
"prefer-template": "error",
|
|
127
|
-
"require-yield": "error",
|
|
128
|
-
"sort-vars": "error",
|
|
129
|
-
"use-isnan": "error",
|
|
130
|
-
"valid-typeof": "error",
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
);
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import importPlugin from "eslint-plugin-import-x";
|
|
2
|
-
|
|
3
|
-
import { JAVASCRIPT_LIKE_FILES, RELAXED_LIKE_FILES } from "../constants.js";
|
|
4
|
-
import { createConfig } from "../helpers.js";
|
|
5
|
-
|
|
6
|
-
export const config = createConfig(
|
|
7
|
-
importPlugin.flatConfigs.typescript,
|
|
8
|
-
{
|
|
9
|
-
files: JAVASCRIPT_LIKE_FILES,
|
|
10
|
-
rules: {
|
|
11
|
-
"import-x/consistent-type-specifier-style": [
|
|
12
|
-
"error",
|
|
13
|
-
"prefer-top-level",
|
|
14
|
-
],
|
|
15
|
-
"import-x/export": "error",
|
|
16
|
-
"import-x/first": "error",
|
|
17
|
-
"import-x/newline-after-import": "error",
|
|
18
|
-
"import-x/no-absolute-path": "error",
|
|
19
|
-
"import-x/no-amd": "error",
|
|
20
|
-
"import-x/no-anonymous-default-export": "error",
|
|
21
|
-
"import-x/no-cycle": "error",
|
|
22
|
-
"import-x/no-default-export": "error",
|
|
23
|
-
"import-x/no-duplicates": "error",
|
|
24
|
-
"import-x/no-empty-named-blocks": "error",
|
|
25
|
-
"import-x/no-extraneous-dependencies": "error",
|
|
26
|
-
"import-x/no-import-module-exports": "error",
|
|
27
|
-
"import-x/no-mutable-exports": "error",
|
|
28
|
-
"import-x/no-named-default": "error",
|
|
29
|
-
"import-x/no-namespace": "error",
|
|
30
|
-
"import-x/no-relative-packages": "error",
|
|
31
|
-
"import-x/no-self-import": "error",
|
|
32
|
-
"import-x/no-unassigned-import": "error",
|
|
33
|
-
"import-x/no-unused-modules": [
|
|
34
|
-
"error",
|
|
35
|
-
{
|
|
36
|
-
missingExports: true,
|
|
37
|
-
suppressMissingFileEnumeratorAPIWarning: true,
|
|
38
|
-
unusedExports: true,
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
"import-x/no-useless-path-segments": [
|
|
42
|
-
"error",
|
|
43
|
-
{
|
|
44
|
-
commonjs: true,
|
|
45
|
-
noUselessIndex: true,
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
"import-x/no-webpack-loader-syntax": "error",
|
|
49
|
-
"import-x/unambiguous": "error",
|
|
50
|
-
},
|
|
51
|
-
settings: {
|
|
52
|
-
"import-x/resolver": {
|
|
53
|
-
node: true,
|
|
54
|
-
typescript: true,
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
files: RELAXED_LIKE_FILES,
|
|
60
|
-
rules: {
|
|
61
|
-
"import-x/no-anonymous-default-export": "off",
|
|
62
|
-
"import-x/no-default-export": "off",
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
);
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import jsdocPlugin from "eslint-plugin-jsdoc";
|
|
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
|
-
jsdoc: jsdocPlugin,
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
"jsdoc/check-access": "error",
|
|
13
|
-
"jsdoc/check-alignment": "error",
|
|
14
|
-
"jsdoc/check-examples": "off", // To enable once ESLint >= 8.x is supported
|
|
15
|
-
"jsdoc/check-indentation": "error",
|
|
16
|
-
"jsdoc/check-line-alignment": "error",
|
|
17
|
-
"jsdoc/check-param-names": "error",
|
|
18
|
-
"jsdoc/check-property-names": "error",
|
|
19
|
-
"jsdoc/check-syntax": "error",
|
|
20
|
-
"jsdoc/check-tag-names": "error",
|
|
21
|
-
"jsdoc/check-types": "error",
|
|
22
|
-
"jsdoc/check-values": "error",
|
|
23
|
-
"jsdoc/empty-tags": "error",
|
|
24
|
-
"jsdoc/implements-on-classes": "error",
|
|
25
|
-
"jsdoc/multiline-blocks": "error",
|
|
26
|
-
"jsdoc/no-bad-blocks": "error",
|
|
27
|
-
"jsdoc/no-blank-block-descriptions": "error",
|
|
28
|
-
"jsdoc/no-blank-blocks": "error",
|
|
29
|
-
"jsdoc/no-defaults": "error",
|
|
30
|
-
"jsdoc/no-multi-asterisks": "error",
|
|
31
|
-
"jsdoc/no-types": "error",
|
|
32
|
-
"jsdoc/require-asterisk-prefix": "error",
|
|
33
|
-
"jsdoc/require-description": "error",
|
|
34
|
-
"jsdoc/require-description-complete-sentence": "error",
|
|
35
|
-
"jsdoc/require-example": "error",
|
|
36
|
-
"jsdoc/require-hyphen-before-param-description": "error",
|
|
37
|
-
"jsdoc/require-jsdoc": [
|
|
38
|
-
// To enable once the rule can be configured to require JSDoc for exported functions at package level (only at module level right now)
|
|
39
|
-
"off",
|
|
40
|
-
{
|
|
41
|
-
contexts: [
|
|
42
|
-
"TSTypeAliasDeclaration",
|
|
43
|
-
"TSInterfaceDeclaration",
|
|
44
|
-
"TSMethodSignature",
|
|
45
|
-
"TSPropertySignature",
|
|
46
|
-
],
|
|
47
|
-
publicOnly: {
|
|
48
|
-
ancestorsOnly: true,
|
|
49
|
-
cjs: true,
|
|
50
|
-
esm: true,
|
|
51
|
-
},
|
|
52
|
-
require: {
|
|
53
|
-
ArrowFunctionExpression: true,
|
|
54
|
-
ClassDeclaration: true,
|
|
55
|
-
ClassExpression: true,
|
|
56
|
-
FunctionDeclaration: true,
|
|
57
|
-
FunctionExpression: true,
|
|
58
|
-
MethodDefinition: true,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
],
|
|
62
|
-
"jsdoc/require-param": "error",
|
|
63
|
-
"jsdoc/require-param-description": "error",
|
|
64
|
-
"jsdoc/require-param-name": "error",
|
|
65
|
-
"jsdoc/require-property": "error",
|
|
66
|
-
"jsdoc/require-property-description": "error",
|
|
67
|
-
"jsdoc/require-property-name": "error",
|
|
68
|
-
"jsdoc/require-returns": "error",
|
|
69
|
-
"jsdoc/require-returns-check": "error",
|
|
70
|
-
"jsdoc/require-returns-description": "error",
|
|
71
|
-
"jsdoc/require-throws": "error",
|
|
72
|
-
"jsdoc/require-yields": "error",
|
|
73
|
-
"jsdoc/require-yields-check": "error",
|
|
74
|
-
"jsdoc/sort-tags": "error",
|
|
75
|
-
"jsdoc/tag-lines": "error",
|
|
76
|
-
"jsdoc/valid-types": "error",
|
|
77
|
-
},
|
|
78
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { flat as config } from "eslint-plugin-mdx";
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import nodePlugin from "eslint-plugin-n";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
|
|
4
|
-
import { CWD, JAVASCRIPT_LIKE_FILES } from "../constants.js";
|
|
5
|
-
import { createConfig, require } from "../helpers.js";
|
|
6
|
-
|
|
7
|
-
export const config = createConfig({
|
|
8
|
-
files: JAVASCRIPT_LIKE_FILES,
|
|
9
|
-
plugins: {
|
|
10
|
-
n: nodePlugin,
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
"n/callback-return": "error",
|
|
14
|
-
"n/exports-style": ["error", "module.exports"],
|
|
15
|
-
"n/hashbang": "error",
|
|
16
|
-
"n/no-exports-assign": "error",
|
|
17
|
-
"n/no-path-concat": "error",
|
|
18
|
-
"n/no-process-env": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
allowedVariables: ["NODE_ENV", "ENVIRONMENT"],
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
"n/no-unpublished-bin": "error",
|
|
25
|
-
"n/no-unsupported-features/es-builtins": "error",
|
|
26
|
-
"n/no-unsupported-features/es-syntax": "error",
|
|
27
|
-
"n/no-unsupported-features/node-builtins": [
|
|
28
|
-
"error",
|
|
29
|
-
{ allowExperimental: true },
|
|
30
|
-
],
|
|
31
|
-
"n/prefer-global/buffer": ["error", "always"],
|
|
32
|
-
"n/prefer-global/console": ["error", "always"],
|
|
33
|
-
"n/prefer-global/crypto": ["error", "always"],
|
|
34
|
-
"n/prefer-global/process": ["error", "always"],
|
|
35
|
-
"n/prefer-global/text-decoder": ["error", "always"],
|
|
36
|
-
"n/prefer-global/text-encoder": ["error", "always"],
|
|
37
|
-
"n/prefer-global/timers": ["error", "always"],
|
|
38
|
-
"n/prefer-global/url": ["error", "always"],
|
|
39
|
-
"n/prefer-global/url-search-params": ["error", "always"],
|
|
40
|
-
"n/prefer-node-protocol": "error",
|
|
41
|
-
"n/prefer-promises/dns": "error",
|
|
42
|
-
"n/prefer-promises/fs": "error",
|
|
43
|
-
"n/process-exit-as-throw": "error",
|
|
44
|
-
},
|
|
45
|
-
settings: {
|
|
46
|
-
node: {
|
|
47
|
-
version: require(join(CWD, "package.json")).devEngines.runtime
|
|
48
|
-
.version,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as prettierConfig } from "eslint-plugin-prettier/recommended";
|