@adbayb/stack 2.39.0-next-634411b → 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 +62 -92
- package/package.json +26 -43
- package/templates/multi-projects/.vscode/extensions.json +1 -1
- package/templates/multi-projects/.vscode/settings.json +7 -13
- package/templates/multi-projects/libraries/{{projectName}}/package.json +10 -10
- package/templates/multi-projects/package.json +2 -3
- package/templates/multi-projects/pnpm-workspace.yaml +0 -3
- package/templates/single-project/.vscode/extensions.json +1 -1
- package/templates/single-project/.vscode/settings.json +7 -13
- package/templates/single-project/package.json +2 -3
- package/templates/single-project/pnpm-workspace.yaml +0 -3
- package/templates/single-project/{{projectName}}/package.json +10 -10
- 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/bin/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<br>
|
|
2
2
|
<div align="center">
|
|
3
|
-
<h1>@adbayb/stack/
|
|
3
|
+
<h1>@adbayb/stack/oxfmt</h1>
|
|
4
4
|
<strong>My opinionated formatting standards</strong>
|
|
5
5
|
</div>
|
|
6
6
|
<br>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## ✨ Features
|
|
10
10
|
|
|
11
|
-
This package offers opinionated but extensible **[
|
|
11
|
+
This package offers opinionated but extensible **[Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html)** configurations to align code formatting conventions across projects.
|
|
12
12
|
|
|
13
13
|
It allows to:
|
|
14
14
|
|
|
@@ -30,18 +30,10 @@ pnpm add @adbayb/stack --save-dev --workspace-root
|
|
|
30
30
|
|
|
31
31
|
### 2️⃣ Usage
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
{
|
|
37
|
-
"scripts": {
|
|
38
|
-
"check:format": "prettier \"**/!(pnpm-lock.yaml)\" --check --ignore-unknown --ignore-path .gitignore --log-level warn",
|
|
39
|
-
"fix:format": "pnpm check:format --write",
|
|
40
|
-
// ...
|
|
41
|
-
},
|
|
42
|
-
"prettier": "@adbayb/stack/prettier",
|
|
43
|
-
// ...
|
|
44
|
-
}
|
|
33
|
+
Create a `oxfmt.config.ts` file and include the following:
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
export { default } from "@adbayb/stack/oxfmt";
|
|
45
37
|
```
|
|
46
38
|
|
|
47
39
|
<br />
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default {
|
|
1
|
+
import { defineConfig } from "oxfmt";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
5
4
|
arrowParens: "always",
|
|
6
5
|
bracketSameLine: false,
|
|
7
6
|
bracketSpacing: true,
|
|
8
7
|
embeddedLanguageFormatting: "auto",
|
|
9
8
|
endOfLine: "lf",
|
|
10
9
|
htmlWhitespaceSensitivity: "css",
|
|
11
|
-
|
|
10
|
+
ignorePatterns: [],
|
|
11
|
+
insertFinalNewline: true,
|
|
12
|
+
jsdoc: true,
|
|
12
13
|
jsxSingleQuote: false,
|
|
13
|
-
|
|
14
|
-
printWidth:
|
|
14
|
+
objectWrap: "preserve",
|
|
15
|
+
printWidth: 100,
|
|
15
16
|
proseWrap: "preserve",
|
|
16
17
|
quoteProps: "consistent",
|
|
17
|
-
requirePragma: false,
|
|
18
18
|
semi: true,
|
|
19
19
|
singleAttributePerLine: true,
|
|
20
20
|
singleQuote: false,
|
|
21
|
+
sortImports: {
|
|
22
|
+
newlinesBetween: false,
|
|
23
|
+
},
|
|
24
|
+
sortPackageJson: true,
|
|
21
25
|
tabWidth: 4,
|
|
22
26
|
trailingComma: "all",
|
|
23
27
|
useTabs: true,
|
|
24
28
|
vueIndentScriptAndStyle: false,
|
|
25
|
-
};
|
|
29
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<br>
|
|
2
2
|
<div align="center">
|
|
3
|
-
<h1>@adbayb/stack/
|
|
3
|
+
<h1>@adbayb/stack/oxlint</h1>
|
|
4
4
|
<strong>My opinionated linter standards</strong>
|
|
5
5
|
</div>
|
|
6
6
|
<br>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## ✨ Features
|
|
10
10
|
|
|
11
|
-
This package offers opinionated but extensible **[
|
|
11
|
+
This package offers opinionated but extensible **[Oxlint](https://oxc.rs/docs/guide/usage/linter.html)** configurations to align logical and stylistic rules across projects.
|
|
12
12
|
|
|
13
13
|
It allows to:
|
|
14
14
|
|
|
@@ -30,10 +30,10 @@ pnpm add @adbayb/stack --save-dev --workspace-root
|
|
|
30
30
|
|
|
31
31
|
### 2️⃣ Usage
|
|
32
32
|
|
|
33
|
-
Create a `
|
|
33
|
+
Create a `oxlint.config.ts` file and include the following:
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
|
-
export { default } from "@adbayb/stack/
|
|
36
|
+
export { default } from "@adbayb/stack/oxlint";
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
<br />
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineConfig } from "oxlint";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
plugins: [
|
|
5
|
+
"eslint",
|
|
6
|
+
"import",
|
|
7
|
+
"jsdoc",
|
|
8
|
+
"jsx-a11y",
|
|
9
|
+
"node",
|
|
10
|
+
"oxc",
|
|
11
|
+
"promise",
|
|
12
|
+
"react",
|
|
13
|
+
"react-perf",
|
|
14
|
+
"typescript",
|
|
15
|
+
"unicorn",
|
|
16
|
+
"vitest",
|
|
17
|
+
],
|
|
18
|
+
categories: {
|
|
19
|
+
correctness: "error",
|
|
20
|
+
},
|
|
21
|
+
options: {
|
|
22
|
+
denyWarnings: true,
|
|
23
|
+
reportUnusedDisableDirectives: "error",
|
|
24
|
+
respectEslintDisableDirectives: false,
|
|
25
|
+
typeAware: true,
|
|
26
|
+
typeCheck: true,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
"exactOptionalPropertyTypes": true,
|
|
11
11
|
"incremental": true,
|
|
12
12
|
"jsx": "react-jsx",
|
|
13
|
-
"lib": [
|
|
14
|
-
"ESNext",
|
|
15
|
-
"DOM",
|
|
16
|
-
"DOM.AsyncIterable",
|
|
17
|
-
"DOM.Iterable",
|
|
18
|
-
"WebWorker.ImportScripts"
|
|
19
|
-
],
|
|
13
|
+
"lib": ["ESNext", "DOM", "DOM.AsyncIterable", "DOM.Iterable", "WebWorker.ImportScripts"],
|
|
20
14
|
"module": "Preserve",
|
|
21
15
|
"noEmit": true,
|
|
22
16
|
"noErrorTruncation": true,
|
package/dist/index.js
CHANGED
|
@@ -11,21 +11,20 @@ function assert(expectedCondition, createError) {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Helper to format log messages with a welcoming bot.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* botMessage({
|
|
17
|
+
* title: "Oops, an error occurred",
|
|
18
|
+
* description: "Keep calm and carry on with some coffee ☕️",
|
|
19
|
+
* body: String(previousTaskError),
|
|
20
|
+
* type: "error",
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
14
23
|
* @param input - Message factory.
|
|
15
24
|
* @param input.title - Title input.
|
|
16
25
|
* @param input.description - Description input.
|
|
17
26
|
* @param input.body - Body input.
|
|
18
27
|
* @param input.type - Message type.
|
|
19
|
-
* @example
|
|
20
|
-
* botMessage(
|
|
21
|
-
* {
|
|
22
|
-
* title: "Oops, an error occurred",
|
|
23
|
-
* description:
|
|
24
|
-
* "Keep calm and carry on with some coffee ☕️",
|
|
25
|
-
* body: String(previousTaskError),
|
|
26
|
-
* type: "error",
|
|
27
|
-
* },
|
|
28
|
-
* );
|
|
29
28
|
*/
|
|
30
29
|
const botMessage = (input) => {
|
|
31
30
|
const { type } = input;
|
|
@@ -45,20 +44,24 @@ ${input.body}
|
|
|
45
44
|
};
|
|
46
45
|
/**
|
|
47
46
|
* Resolve a relative path to an absolute one resolved from the generated project root directory.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* resolveFromWorkingDirectory(".gitignore");
|
|
50
|
+
*
|
|
48
51
|
* @param path - The relative path.
|
|
49
52
|
* @returns The resolved absolute path.
|
|
50
|
-
* @example
|
|
51
|
-
* resolveFromWorkingDirectory(".gitignore");
|
|
52
53
|
*/
|
|
53
54
|
const resolveFromWorkingDirectory = (...path) => {
|
|
54
55
|
return resolve(process.cwd(), ...path);
|
|
55
56
|
};
|
|
56
57
|
/**
|
|
57
58
|
* Resolve a relative path to an absolute one resolved from the `stack` node module directory.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* resolveFromPackageDirectory("./templates");
|
|
62
|
+
*
|
|
58
63
|
* @param path - The relative path.
|
|
59
64
|
* @returns The resolved absolute path.
|
|
60
|
-
* @example
|
|
61
|
-
* resolveFromPackageDirectory("./templates");
|
|
62
65
|
*/
|
|
63
66
|
const resolveFromPackageDirectory = (...path) => {
|
|
64
67
|
return resolve(import.meta.dirname, "../", ...path);
|
|
@@ -81,12 +84,11 @@ const getPnpmVersion = async () => {
|
|
|
81
84
|
const getStackCommand = (command) => {
|
|
82
85
|
return `pnpm stack ${command}`;
|
|
83
86
|
};
|
|
84
|
-
const hasDependency = (packageName) => {
|
|
85
|
-
return Boolean(require.resolve(packageName));
|
|
86
|
-
};
|
|
87
87
|
const setPackageManager = async () => {
|
|
88
88
|
/**
|
|
89
|
-
* Corepack is downloaded remotely to get always up-to-date npm registry fingerprints since
|
|
89
|
+
* Corepack is downloaded remotely to get always up-to-date npm registry fingerprints since
|
|
90
|
+
* they're hardcoded.
|
|
91
|
+
*
|
|
90
92
|
* @see {@link https://github.com/nodejs/corepack/issues/613}
|
|
91
93
|
*/
|
|
92
94
|
return helpers.exec("pnx corepack enable");
|
|
@@ -99,26 +101,30 @@ const request = { async get(url, responseType) {
|
|
|
99
101
|
})})`);
|
|
100
102
|
return response[responseType === "text" ? "text" : "json"]();
|
|
101
103
|
} };
|
|
102
|
-
const
|
|
103
|
-
let eslintFiles = [];
|
|
104
|
-
if (files.length === 0) eslintFiles.push(".");
|
|
105
|
-
else {
|
|
106
|
-
eslintFiles = files.filter((file) => {
|
|
107
|
-
return ESLINT_EXTENSIONS.some((extension) => file.endsWith(extension));
|
|
108
|
-
});
|
|
109
|
-
if (eslintFiles.length === 0) return;
|
|
110
|
-
}
|
|
104
|
+
const oxlint = (options) => async (files = []) => {
|
|
111
105
|
const arguments_ = [
|
|
112
|
-
...
|
|
113
|
-
"--
|
|
114
|
-
`--cache-location ${resolveFromWorkingDirectory("node_modules/.cache/.eslintcache")}`,
|
|
106
|
+
...files,
|
|
107
|
+
"--disable-nested-config",
|
|
115
108
|
"--no-error-on-unmatched-pattern"
|
|
116
109
|
];
|
|
117
110
|
if (options.isFixMode) arguments_.push("--fix");
|
|
118
111
|
try {
|
|
119
|
-
return await helpers.exec(`
|
|
112
|
+
return await helpers.exec(`oxlint ${arguments_.join(" ")}`);
|
|
120
113
|
} catch (error) {
|
|
121
|
-
throw createError("
|
|
114
|
+
throw createError("oxlint", error);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const oxfmt = (options) => async (files = []) => {
|
|
118
|
+
const arguments_ = [
|
|
119
|
+
...files,
|
|
120
|
+
"--disable-nested-config",
|
|
121
|
+
"--no-error-on-unmatched-pattern",
|
|
122
|
+
options.isFixMode ? "--write" : "--check"
|
|
123
|
+
];
|
|
124
|
+
try {
|
|
125
|
+
return await helpers.exec(`oxfmt ${arguments_.join(" ")}`);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
throw createError("oxfmt", error);
|
|
122
128
|
}
|
|
123
129
|
};
|
|
124
130
|
const turbo = async (command, options = {}) => {
|
|
@@ -158,18 +164,6 @@ const changeset = async (command) => {
|
|
|
158
164
|
throw createError("changeset", error);
|
|
159
165
|
}
|
|
160
166
|
};
|
|
161
|
-
const ESLINT_EXTENSIONS = [
|
|
162
|
-
"js",
|
|
163
|
-
"jsx",
|
|
164
|
-
"cjs",
|
|
165
|
-
"mjs",
|
|
166
|
-
"ts",
|
|
167
|
-
"tsx",
|
|
168
|
-
"cts",
|
|
169
|
-
"mts",
|
|
170
|
-
"md",
|
|
171
|
-
"mdx"
|
|
172
|
-
];
|
|
173
167
|
|
|
174
168
|
//#endregion
|
|
175
169
|
//#region src/commands/build.ts
|
|
@@ -184,7 +178,7 @@ const createBuildCommand = (program) => {
|
|
|
184
178
|
|
|
185
179
|
//#endregion
|
|
186
180
|
//#region src/commands/check/checkCode.ts
|
|
187
|
-
const checkCode =
|
|
181
|
+
const checkCode = oxlint({ isFixMode: false });
|
|
188
182
|
|
|
189
183
|
//#endregion
|
|
190
184
|
//#region src/commands/check/checkCommit.ts
|
|
@@ -293,14 +287,8 @@ const isExcluded = (version) => {
|
|
|
293
287
|
const hasCaret = (version) => version.startsWith("^");
|
|
294
288
|
|
|
295
289
|
//#endregion
|
|
296
|
-
//#region src/commands/check/
|
|
297
|
-
const
|
|
298
|
-
try {
|
|
299
|
-
return await helpers.exec("pnpm --parallel exec tsc --noEmit");
|
|
300
|
-
} catch (error) {
|
|
301
|
-
throw createError("tsc", error);
|
|
302
|
-
}
|
|
303
|
-
};
|
|
290
|
+
//#region src/commands/check/checkFormatting.ts
|
|
291
|
+
const checkFormatting = oxfmt({ isFixMode: false });
|
|
304
292
|
|
|
305
293
|
//#endregion
|
|
306
294
|
//#region src/commands/check/check.ts
|
|
@@ -308,7 +296,7 @@ const ONLY_VALUES = [
|
|
|
308
296
|
"commit",
|
|
309
297
|
"code",
|
|
310
298
|
"dependency",
|
|
311
|
-
"
|
|
299
|
+
"formatting"
|
|
312
300
|
];
|
|
313
301
|
const createCheckCommand = (program) => {
|
|
314
302
|
program.command({
|
|
@@ -341,6 +329,13 @@ const createCheckCommand = (program) => {
|
|
|
341
329
|
},
|
|
342
330
|
label: label$4("Check dependency compliance"),
|
|
343
331
|
skip: ifFilterDefinedAndNotEqualTo("dependency")
|
|
332
|
+
}).task({
|
|
333
|
+
async handler(_, argv) {
|
|
334
|
+
const filenames = argv.operands;
|
|
335
|
+
await checkFormatting(filenames);
|
|
336
|
+
},
|
|
337
|
+
label: label$4("Check formatting compliance"),
|
|
338
|
+
skip: ifFilterDefinedAndNotEqualTo("formatting")
|
|
344
339
|
}).task({
|
|
345
340
|
async handler(_, argv) {
|
|
346
341
|
const filenames = argv.operands;
|
|
@@ -348,14 +343,6 @@ const createCheckCommand = (program) => {
|
|
|
348
343
|
},
|
|
349
344
|
label: label$4("Check code compliance"),
|
|
350
345
|
skip: ifFilterDefinedAndNotEqualTo("code")
|
|
351
|
-
}).task({
|
|
352
|
-
async handler() {
|
|
353
|
-
await checkType();
|
|
354
|
-
},
|
|
355
|
-
label: label$4("Check type compliance"),
|
|
356
|
-
skip(context, argv) {
|
|
357
|
-
return ifFilterDefinedAndNotEqualTo("type")(context) || !hasDependency("typescript") || argv.operands.length > 0;
|
|
358
|
-
}
|
|
359
346
|
}).task({
|
|
360
347
|
async handler() {
|
|
361
348
|
await checkCommit();
|
|
@@ -427,7 +414,7 @@ const PRESERVE_FILES = ["node_modules"];
|
|
|
427
414
|
|
|
428
415
|
//#endregion
|
|
429
416
|
//#region package.json
|
|
430
|
-
var version = "2.
|
|
417
|
+
var version = "2.40.0-next-7baa8ed";
|
|
431
418
|
|
|
432
419
|
//#endregion
|
|
433
420
|
//#region src/commands/create.ts
|
|
@@ -651,39 +638,22 @@ const setTemplateVariables = (entry, model) => {
|
|
|
651
638
|
const TEMPLATE_VARIABLE_MATCHER = /* @__PURE__ */ new RegExp(/{{(.*?)}}/g, "gi");
|
|
652
639
|
const hasTemplateVariable = (input) => {
|
|
653
640
|
/**
|
|
654
|
-
* TemplateVariableMatcher.test() is not used since the `RegExp` is stateful when the global is
|
|
655
|
-
* (relying on latest `lastIndex` set (lastIndex specifies
|
|
656
|
-
* String.search is stateless.
|
|
641
|
+
* TemplateVariableMatcher.test() is not used since the `RegExp` is stateful when the global is
|
|
642
|
+
* used leading to some unstable results (relying on latest `lastIndex` set (lastIndex specifies
|
|
643
|
+
* the index at which to start the next match)). String.search is stateless.
|
|
644
|
+
*
|
|
657
645
|
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test MDN documentation}.
|
|
658
646
|
*/
|
|
659
647
|
return input.search(TEMPLATE_VARIABLE_MATCHER) >= 0;
|
|
660
648
|
};
|
|
661
649
|
|
|
662
650
|
//#endregion
|
|
663
|
-
//#region src/commands/fix/
|
|
664
|
-
const
|
|
665
|
-
const fixFormatting = async (files) => {
|
|
666
|
-
let prettierFiles = [];
|
|
667
|
-
if (files.length === 0) prettierFiles.push(`"**/!(${PRETTIER_IGNORE_FILES.join("|")})"`);
|
|
668
|
-
else {
|
|
669
|
-
prettierFiles = files.filter((file) => {
|
|
670
|
-
return PRETTIER_IGNORE_FILES.every((filename) => !file.endsWith(filename));
|
|
671
|
-
});
|
|
672
|
-
if (prettierFiles.length === 0) return;
|
|
673
|
-
}
|
|
674
|
-
const arguments_ = [...prettierFiles];
|
|
675
|
-
if (existsSync(resolveFromWorkingDirectory(".gitignore"))) arguments_.push("--ignore-path .gitignore");
|
|
676
|
-
arguments_.push("--write", "--ignore-unknown", "--no-error-on-unmatched-pattern");
|
|
677
|
-
try {
|
|
678
|
-
return await helpers.exec(`prettier ${arguments_.join(" ")}`);
|
|
679
|
-
} catch (error) {
|
|
680
|
-
throw createError("prettier", error);
|
|
681
|
-
}
|
|
682
|
-
};
|
|
651
|
+
//#region src/commands/fix/fixCode.ts
|
|
652
|
+
const fixCode = oxlint({ isFixMode: true });
|
|
683
653
|
|
|
684
654
|
//#endregion
|
|
685
|
-
//#region src/commands/fix/
|
|
686
|
-
const
|
|
655
|
+
//#region src/commands/fix/fixFormatting.ts
|
|
656
|
+
const fixFormatting = oxfmt({ isFixMode: true });
|
|
687
657
|
|
|
688
658
|
//#endregion
|
|
689
659
|
//#region src/commands/fix/fix.ts
|
|
@@ -703,14 +673,14 @@ const createFixCommand = (program) => {
|
|
|
703
673
|
label: label$1("Prepare the project")
|
|
704
674
|
}).task({
|
|
705
675
|
async handler(_, argv) {
|
|
706
|
-
await
|
|
676
|
+
await fixFormatting(argv.operands);
|
|
707
677
|
},
|
|
708
|
-
label: label$1("Fix
|
|
678
|
+
label: label$1("Fix formatting issues")
|
|
709
679
|
}).task({
|
|
710
680
|
async handler(_, argv) {
|
|
711
|
-
await
|
|
681
|
+
await fixCode(argv.operands);
|
|
712
682
|
},
|
|
713
|
-
label: label$1("Fix
|
|
683
|
+
label: label$1("Fix code issues")
|
|
714
684
|
});
|
|
715
685
|
};
|
|
716
686
|
const label$1 = (message) => `${message} 🚑`;
|
package/package.json
CHANGED
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0-next-7baa8ed",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
6
|
+
"development",
|
|
7
7
|
"scripts",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"stack",
|
|
9
|
+
"toolchain"
|
|
10
10
|
],
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/adbayb/stack.git",
|
|
14
|
-
"directory": "applications/stack"
|
|
15
|
-
},
|
|
16
11
|
"license": "MIT",
|
|
17
12
|
"author": {
|
|
18
13
|
"name": "Ayoub Adib",
|
|
19
14
|
"email": "adbayb@gmail.com",
|
|
20
15
|
"url": "https://twitter.com/adbayb"
|
|
21
16
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"default": "./dist/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./eslint": "./configs/eslint/index.js",
|
|
29
|
-
"./prettier": "./configs/prettier/index.js",
|
|
30
|
-
"./typescript": "./configs/typescript/index.json"
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/adbayb/stack.git",
|
|
20
|
+
"directory": "applications/stack"
|
|
31
21
|
},
|
|
32
22
|
"bin": {
|
|
33
23
|
"stack": "./bin/index.js"
|
|
@@ -38,43 +28,36 @@
|
|
|
38
28
|
"dist",
|
|
39
29
|
"templates"
|
|
40
30
|
],
|
|
31
|
+
"type": "module",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"source": "./src/index.ts",
|
|
35
|
+
"default": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./oxfmt": "./configs/oxfmt/index.ts",
|
|
38
|
+
"./oxlint": "./configs/oxlint/index.ts",
|
|
39
|
+
"./typescript": "./configs/typescript/index.json"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"registry": "https://registry.npmjs.org"
|
|
44
|
+
},
|
|
41
45
|
"dependencies": {
|
|
42
46
|
"@changesets/changelog-github": "^0.7.0",
|
|
43
47
|
"@changesets/cli": "^2.31.0",
|
|
44
48
|
"@commitlint/cli": "^21.0.2",
|
|
45
49
|
"@commitlint/config-conventional": "^21.0.2",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"@vitest/eslint-plugin": "^1.6.20",
|
|
50
|
-
"eslint": "^10.5.0",
|
|
51
|
-
"eslint-config-prettier": "^10.1.8",
|
|
52
|
-
"eslint-import-resolver-typescript": "^4.4.5",
|
|
53
|
-
"eslint-plugin-depend": "^1.5.0",
|
|
54
|
-
"eslint-plugin-import-x": "^4.16.2",
|
|
55
|
-
"eslint-plugin-jsdoc": "^63.0.6",
|
|
56
|
-
"eslint-plugin-mdx": "^3.8.1",
|
|
57
|
-
"eslint-plugin-n": "^18.1.0",
|
|
58
|
-
"eslint-plugin-perfectionist": "^5.9.1",
|
|
59
|
-
"eslint-plugin-prettier": "^5.5.6",
|
|
60
|
-
"eslint-plugin-sonarjs": "^4.1.0",
|
|
61
|
-
"eslint-plugin-unicorn": "^68.0.0",
|
|
62
|
-
"globals": "^17.6.0",
|
|
63
|
-
"prettier": "^3.8.4",
|
|
64
|
-
"prettier-plugin-packagejson": "^3.0.2",
|
|
50
|
+
"oxfmt": "^0.57.0",
|
|
51
|
+
"oxlint": "^1.72.0",
|
|
52
|
+
"oxlint-tsgolint": "^0.24.0",
|
|
65
53
|
"termost": "^1.9.1",
|
|
66
54
|
"turbo": "^2.9.18",
|
|
67
|
-
"typescript": "^6.0.3"
|
|
68
|
-
"typescript-eslint": "^8.61.1"
|
|
55
|
+
"typescript": "^6.0.3"
|
|
69
56
|
},
|
|
70
57
|
"devDependencies": {
|
|
71
58
|
"@types/node": "24.13.2",
|
|
72
59
|
"quickbundle": "3.0.0"
|
|
73
60
|
},
|
|
74
|
-
"publishConfig": {
|
|
75
|
-
"access": "public",
|
|
76
|
-
"registry": "https://registry.npmjs.org"
|
|
77
|
-
},
|
|
78
61
|
"scripts": {
|
|
79
62
|
"build": "quickbundle build",
|
|
80
63
|
"prestart": "pnpm build",
|
|
@@ -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"
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
"description": "{{projectDescription}}",
|
|
5
5
|
"homepage": "https://github.com/{{repoId}}/tree/main/{{projectName}}#readme",
|
|
6
6
|
"bugs": "https://github.com/{{repoId}}/issues",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "Ayoub Adib <adbayb@gmail.com> (https://twitter.com/adbayb)",
|
|
7
9
|
"repository": {
|
|
8
10
|
"type": "git",
|
|
9
11
|
"url": "{{projectUrl}}",
|
|
10
12
|
"directory": "libraries/{{projectName}}"
|
|
11
13
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
15
17
|
"type": "module",
|
|
18
|
+
"sideEffects": false,
|
|
16
19
|
"exports": {
|
|
17
20
|
"source": "./src/index.ts",
|
|
18
21
|
"types": "./dist/index.d.ts",
|
|
@@ -20,9 +23,10 @@
|
|
|
20
23
|
"import": "./dist/index.mjs",
|
|
21
24
|
"default": "./dist/index.mjs"
|
|
22
25
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org"
|
|
29
|
+
},
|
|
26
30
|
"scripts": {
|
|
27
31
|
"build": "pnpm clean && quickbundle build",
|
|
28
32
|
"clean": "rm -rf dist",
|
|
@@ -30,9 +34,5 @@
|
|
|
30
34
|
"start": "pnpm watch",
|
|
31
35
|
"test": "vitest --passWithNoTests --typecheck --reporter=verbose",
|
|
32
36
|
"watch": "quickbundle watch"
|
|
33
|
-
},
|
|
34
|
-
"publishConfig": {
|
|
35
|
-
"access": "public",
|
|
36
|
-
"registry": "https://registry.npmjs.org"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -16,8 +16,6 @@
|
|
|
16
16
|
"test": "stack test",
|
|
17
17
|
"watch": "stack watch"
|
|
18
18
|
},
|
|
19
|
-
"prettier": "@adbayb/stack/prettier",
|
|
20
|
-
"packageManager": "pnpm@{{pnpmVersion}}",
|
|
21
19
|
"devEngines": {
|
|
22
20
|
"packageManager": {
|
|
23
21
|
"name": "pnpm",
|
|
@@ -29,5 +27,6 @@
|
|
|
29
27
|
"version": ">=24.0.0",
|
|
30
28
|
"onFail": "error"
|
|
31
29
|
}
|
|
32
|
-
}
|
|
30
|
+
},
|
|
31
|
+
"packageManager": "pnpm@{{pnpmVersion}}"
|
|
33
32
|
}
|