@solvro/config 1.13.5 → 1.13.7-beta.1
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 +0 -0
- package/dist/cli/index.js +62 -48
- package/dist/cli/index.js.map +1 -1
- package/dist/commitlint/index.d.ts +2 -2
- package/dist/commitlint/index.js +2 -2
- package/dist/commitlint/index.js.map +1 -1
- package/dist/eslint/index.js +91 -64
- package/dist/eslint/index.js.map +1 -1
- package/dist/prettier/index.d.ts +1 -1
- package/dist/prettier/index.js +1 -0
- package/dist/prettier/index.js.map +1 -1
- package/package.json +3 -3
package/bin/index.js
CHANGED
File without changes
|
package/dist/cli/index.js
CHANGED
@@ -3,7 +3,7 @@ import * as p6 from "@clack/prompts";
|
|
3
3
|
import c from "picocolors";
|
4
4
|
|
5
5
|
// src/utils/is-git-clean.ts
|
6
|
-
import { execSync } from "
|
6
|
+
import { execSync } from "child_process";
|
7
7
|
function isGitClean() {
|
8
8
|
try {
|
9
9
|
execSync("git diff-index --quiet HEAD --");
|
@@ -16,16 +16,16 @@ function isGitClean() {
|
|
16
16
|
// src/utils/package-json.ts
|
17
17
|
import * as p2 from "@clack/prompts";
|
18
18
|
import { getPackageInfo, isPackageListed, loadPackageJSON } from "local-pkg";
|
19
|
-
import assert from "
|
20
|
-
import { writeFile } from "
|
21
|
-
import path from "
|
19
|
+
import assert from "assert";
|
20
|
+
import { writeFile } from "fs/promises";
|
21
|
+
import path from "path";
|
22
22
|
import semver from "semver";
|
23
23
|
|
24
24
|
// src/utils/$$.ts
|
25
25
|
import { $ } from "execa";
|
26
26
|
|
27
27
|
// src/utils/git-root.ts
|
28
|
-
import { execSync as execSync2 } from "
|
28
|
+
import { execSync as execSync2 } from "child_process";
|
29
29
|
var gitRoot = () => {
|
30
30
|
const root2 = execSync2("git rev-parse --show-toplevel").toString().trim();
|
31
31
|
return root2;
|
@@ -59,13 +59,13 @@ var PackageJson = class {
|
|
59
59
|
}
|
60
60
|
this.json = json;
|
61
61
|
}
|
62
|
-
hasPackage(
|
63
|
-
return isPackageListed(
|
62
|
+
hasPackage(package_) {
|
63
|
+
return isPackageListed(package_);
|
64
64
|
}
|
65
|
-
async doesSatisfies(
|
65
|
+
async doesSatisfies(package_, version) {
|
66
66
|
await this.load();
|
67
67
|
assert(this.json !== null);
|
68
|
-
const packageInfo = await getPackageInfo(
|
68
|
+
const packageInfo = await getPackageInfo(package_);
|
69
69
|
if (packageInfo?.version === void 0) {
|
70
70
|
return false;
|
71
71
|
}
|
@@ -89,17 +89,21 @@ var PackageJson = class {
|
|
89
89
|
}
|
90
90
|
async getProjectType() {
|
91
91
|
const isAdonis = await isPackageListed("@adonisjs/core");
|
92
|
-
const
|
93
|
-
|
92
|
+
const isReact = await isPackageListed("react");
|
93
|
+
const isNestJs = await isPackageListed("@nestjs/core");
|
94
|
+
if (isReact && isAdonis) {
|
94
95
|
throw new Error(
|
95
|
-
"You can't use both Adonis and
|
96
|
+
"You can't use both Adonis and React in the same project"
|
96
97
|
);
|
97
98
|
}
|
99
|
+
if (isNestJs) {
|
100
|
+
return "nestjs";
|
101
|
+
}
|
98
102
|
if (isAdonis) {
|
99
103
|
return "adonis";
|
100
104
|
}
|
101
|
-
if (
|
102
|
-
return "
|
105
|
+
if (isReact) {
|
106
|
+
return "react";
|
103
107
|
}
|
104
108
|
return "node";
|
105
109
|
}
|
@@ -119,22 +123,22 @@ var PackageJson = class {
|
|
119
123
|
this.json.scripts[name] = script;
|
120
124
|
await this.save();
|
121
125
|
}
|
122
|
-
async install(
|
123
|
-
const isInstalled = await this.hasPackage(
|
126
|
+
async install(package_, options) {
|
127
|
+
const isInstalled = await this.hasPackage(package_);
|
124
128
|
if (!isInstalled) {
|
125
129
|
const spinner2 = p2.spinner();
|
126
|
-
spinner2.start(`Instalowanie ${
|
127
|
-
await $$`npm i ${options?.dev === true ? "-D" : ""} ${
|
128
|
-
spinner2.stop(`${
|
130
|
+
spinner2.start(`Instalowanie ${package_}`);
|
131
|
+
await $$`npm i ${options?.dev === true ? "-D" : ""} ${package_}@latest`;
|
132
|
+
spinner2.stop(`${package_} zainstalowany \u{1F60D}`);
|
129
133
|
await this.load();
|
130
134
|
return;
|
131
135
|
}
|
132
|
-
const info = await getPackageInfo(
|
136
|
+
const info = await getPackageInfo(package_);
|
133
137
|
if (info?.version !== void 0 && options?.minVersion !== void 0 && !semver.satisfies(info.version, options.minVersion) || options?.alwaysUpdate === true) {
|
134
138
|
const spinner2 = p2.spinner();
|
135
|
-
spinner2.start(`Aktualizowanie ${
|
136
|
-
await $$`npm i ${options.dev === true ? "-D" : ""} ${
|
137
|
-
spinner2.stop(`${
|
139
|
+
spinner2.start(`Aktualizowanie ${package_}`);
|
140
|
+
await $$`npm i ${options.dev === true ? "-D" : ""} ${package_}@latest`;
|
141
|
+
spinner2.stop(`${package_} zaktualizowany \u{1F60D}`);
|
138
142
|
await this.load();
|
139
143
|
}
|
140
144
|
}
|
@@ -180,9 +184,9 @@ var installCommitLint = async () => {
|
|
180
184
|
|
181
185
|
// src/cli/install-eslint.ts
|
182
186
|
import * as p3 from "@clack/prompts";
|
183
|
-
import { existsSync } from "
|
184
|
-
import * as fs from "
|
185
|
-
import path3 from "
|
187
|
+
import { existsSync } from "fs";
|
188
|
+
import * as fs from "fs/promises";
|
189
|
+
import path3 from "path";
|
186
190
|
var eslintConfigNames = [
|
187
191
|
".eslintrc.js",
|
188
192
|
".eslintrc.cjs",
|
@@ -203,7 +207,7 @@ var installEslint = async () => {
|
|
203
207
|
await packageJson3.load();
|
204
208
|
await packageJson3.install("eslint", { dev: true, minVersion: ">=9" });
|
205
209
|
const type = await packageJson3.getProjectType();
|
206
|
-
if (type === "next") {
|
210
|
+
if (type === "react" && await packageJson3.hasPackage("next")) {
|
207
211
|
const is15 = await packageJson3.doesSatisfies("next", ">=15");
|
208
212
|
if (!is15) {
|
209
213
|
p3.cancel(
|
@@ -219,7 +223,7 @@ var installEslint = async () => {
|
|
219
223
|
if (eslintConfig !== void 0) {
|
220
224
|
const eslintContent = await fs.readFile(
|
221
225
|
path3.join(root2, eslintConfig),
|
222
|
-
"
|
226
|
+
"utf8"
|
223
227
|
);
|
224
228
|
if (eslintContent.includes("export default solvro(")) {
|
225
229
|
p3.note("Eslint jest ju\u017C skonfigurowany. Pomijam.");
|
@@ -247,9 +251,9 @@ export default solvro();
|
|
247
251
|
|
248
252
|
// src/cli/install-ga.ts
|
249
253
|
import * as p4 from "@clack/prompts";
|
250
|
-
import { existsSync as existsSync2 } from "
|
251
|
-
import * as fs2 from "
|
252
|
-
import path4 from "
|
254
|
+
import { existsSync as existsSync2 } from "fs";
|
255
|
+
import * as fs2 from "fs/promises";
|
256
|
+
import path4 from "path";
|
253
257
|
|
254
258
|
// src/cli/templates/commit-lint-ci.ts
|
255
259
|
var commitLintCi = () => `
|
@@ -374,8 +378,8 @@ updates:
|
|
374
378
|
- dependency-name: "@solvro/config"
|
375
379
|
`;
|
376
380
|
|
377
|
-
// src/cli/templates/
|
378
|
-
var
|
381
|
+
// src/cli/templates/react-ci.ts
|
382
|
+
var reactCi = ({
|
379
383
|
nodeVersion,
|
380
384
|
withCommitlint
|
381
385
|
}) => `name: CI
|
@@ -416,8 +420,8 @@ var packageJson4 = new PackageJson();
|
|
416
420
|
var installGithubActions = async () => {
|
417
421
|
const root2 = gitRoot();
|
418
422
|
await packageJson4.load();
|
419
|
-
const
|
420
|
-
await fs2.mkdir(
|
423
|
+
const ghWorkflowsDirectory = path4.join(root2, ".github/workflows");
|
424
|
+
await fs2.mkdir(ghWorkflowsDirectory, { recursive: true });
|
421
425
|
const type = await packageJson4.getProjectType();
|
422
426
|
const withCommitlint = await packageJson4.hasPackage("@commitlint/cli");
|
423
427
|
if (type === "adonis") {
|
@@ -428,21 +432,21 @@ var installGithubActions = async () => {
|
|
428
432
|
process.exit(1);
|
429
433
|
}
|
430
434
|
await fs2.writeFile(
|
431
|
-
path4.join(
|
435
|
+
path4.join(ghWorkflowsDirectory, "ci.yml"),
|
432
436
|
adonisCi({
|
433
437
|
nodeVersion: "22",
|
434
438
|
withCommitlint
|
435
439
|
})
|
436
440
|
);
|
437
441
|
await fs2.writeFile(
|
438
|
-
path4.join(
|
442
|
+
path4.join(ghWorkflowsDirectory, "db.yml"),
|
439
443
|
adonisMigrationsCi()
|
440
444
|
);
|
441
445
|
}
|
442
|
-
if (type === "
|
446
|
+
if (type === "react") {
|
443
447
|
await fs2.writeFile(
|
444
|
-
path4.join(
|
445
|
-
|
448
|
+
path4.join(ghWorkflowsDirectory, "ci.yml"),
|
449
|
+
reactCi({
|
446
450
|
nodeVersion: "22",
|
447
451
|
withCommitlint
|
448
452
|
})
|
@@ -476,10 +480,10 @@ var installLintStaged = async () => {
|
|
476
480
|
|
477
481
|
// src/cli/install-prettier.ts
|
478
482
|
import * as p5 from "@clack/prompts";
|
479
|
-
import assert4 from "
|
480
|
-
import { existsSync as existsSync3 } from "
|
481
|
-
import * as fs3 from "
|
482
|
-
import path5 from "
|
483
|
+
import assert4 from "assert";
|
484
|
+
import { existsSync as existsSync3 } from "fs";
|
485
|
+
import * as fs3 from "fs/promises";
|
486
|
+
import path5 from "path";
|
483
487
|
var prettierConfigNames = [
|
484
488
|
".prettierrc.js",
|
485
489
|
".prettierrc.cjs",
|
@@ -537,7 +541,6 @@ if (!isGitClean()) {
|
|
537
541
|
}
|
538
542
|
}
|
539
543
|
var packageJson7 = new PackageJson();
|
540
|
-
await packageJson7.ensureESM();
|
541
544
|
var projectType = await packageJson7.getProjectType();
|
542
545
|
if (projectType === "adonis") {
|
543
546
|
const isConfirmed = await polishConfirm({
|
@@ -547,10 +550,11 @@ if (projectType === "adonis") {
|
|
547
550
|
p6.cancel("Zg\u0142o\u015B b\u0142\u0105d na GitHubie :(, a my spr\xF3bujemy pom\xF3c.");
|
548
551
|
process.exit(1);
|
549
552
|
}
|
553
|
+
await packageJson7.ensureESM();
|
550
554
|
}
|
551
|
-
if (projectType === "
|
555
|
+
if (projectType === "react") {
|
552
556
|
const isConfirmed = await polishConfirm({
|
553
|
-
message: `Wygl\u0105da jakby\u015B u\u017Cywa\u0142
|
557
|
+
message: `Wygl\u0105da jakby\u015B u\u017Cywa\u0142 Reacta. Czy to si\u0119 zgadza?`
|
554
558
|
});
|
555
559
|
if (p6.isCancel(isConfirmed)) {
|
556
560
|
p6.cancel("\u{1F621}");
|
@@ -560,10 +564,20 @@ if (projectType === "next") {
|
|
560
564
|
p6.cancel("Zg\u0142o\u015B b\u0142\u0105d na GitHubie :(, a my spr\xF3bujemy pom\xF3c.");
|
561
565
|
process.exit(1);
|
562
566
|
}
|
567
|
+
await packageJson7.ensureESM();
|
568
|
+
}
|
569
|
+
if (projectType === "nestjs") {
|
570
|
+
const isConfirmed = await polishConfirm({
|
571
|
+
message: `Wygl\u0105da jakby\u015B u\u017Cywa\u0142 NestJsa. Czy to si\u0119 zgadza?`
|
572
|
+
});
|
573
|
+
if (p6.isCancel(isConfirmed)) {
|
574
|
+
p6.cancel("\u{1F621}");
|
575
|
+
process.exit(1);
|
576
|
+
}
|
563
577
|
}
|
564
578
|
if (projectType === "node") {
|
565
579
|
p6.cancel(
|
566
|
-
"Nie znaleziono ani Adonisa, ani
|
580
|
+
"Nie znaleziono ani Adonisa, Reacta, ani NestJsa. Musisz r\u0119cznie konfigurowa\u0107 projekt."
|
567
581
|
);
|
568
582
|
process.exit(1);
|
569
583
|
}
|
package/dist/cli/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/cli/index.ts","../../src/utils/is-git-clean.ts","../../src/utils/package-json.ts","../../src/utils/$$.ts","../../src/utils/git-root.ts","../../src/utils/polish-confirm.ts","../../src/cli/install-commitlint.ts","../../src/cli/install-husky.ts","../../src/cli/templates/commitlint.ts","../../src/cli/install-eslint.ts","../../src/cli/install-ga.ts","../../src/cli/templates/commit-lint-ci.ts","../../src/cli/templates/adonis-ci.ts","../../src/cli/templates/adonis-ci-migrations.ts","../../src/cli/templates/dependabot.ts","../../src/cli/templates/next-ci.ts","../../src/cli/install-lint-staged.ts","../../src/cli/install-prettier.ts"],"sourcesContent":["import * as p from \"@clack/prompts\";\nimport c from \"picocolors\";\n\nimport { isGitClean } from \"../utils/is-git-clean\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\nimport { installCommitLint } from \"./install-commitlint\";\nimport { installEslint } from \"./install-eslint\";\nimport { installGithubActions } from \"./install-ga\";\nimport { installLintStaged } from \"./install-lint-staged\";\nimport { installPrettier } from \"./install-prettier\";\n\np.intro(c.bold(c.bgBlue(\" @solvro/config \")));\n\nif (!isGitClean()) {\n const isConfirmed = await polishConfirm({\n message: `Masz niezapisane zmiany w Git. Czy chcesz kontynuować?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zapisz zmiany w Git i spróbuj ponownie.\");\n process.exit(1);\n }\n}\n\nconst packageJson = new PackageJson();\n\nawait packageJson.ensureESM();\n\nconst projectType = await packageJson.getProjectType();\n\nif (projectType === \"adonis\") {\n const isConfirmed = await polishConfirm({\n message: `Wygląda jakbyś używał Adonisa. Czy to się zgadza?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zgłoś błąd na GitHubie :(, a my spróbujemy pomóc.\");\n process.exit(1);\n }\n}\n\nif (projectType === \"next\") {\n const isConfirmed = await polishConfirm({\n message: `Wygląda jakbyś używał Next.js. Czy to się zgadza?`,\n });\n\n if (p.isCancel(isConfirmed)) {\n p.cancel(\"😡\");\n process.exit(1);\n }\n\n if (!isConfirmed) {\n p.cancel(\"Zgłoś błąd na GitHubie :(, a my spróbujemy pomóc.\");\n process.exit(1);\n }\n}\n\nif (projectType === \"node\") {\n p.cancel(\n \"Nie znaleziono ani Adonisa, ani Next.js. Musisz ręcznie konfigurować projekt.\",\n );\n process.exit(1);\n}\n\nconst additionalTools = await p.multiselect({\n message: `Które rzeczy Cię interesują? ${c.gray(\"zaznacz spacją, potwierdź enterem\")}`,\n initialValues: [\"eslint\", \"prettier\", \"gh-action\", \"commitlint\"],\n options: [\n {\n value: \"eslint\",\n label: c.bold(c.blueBright(\"ESLint\")),\n hint: \"sprawdzanie jakości kodu\",\n },\n {\n value: \"prettier\",\n label: c.bold(c.yellowBright(\"Prettier\")),\n hint: \"formatowanie\",\n },\n {\n value: \"gh-action\",\n label: c.bold(\"GitHub Actions\"),\n hint: \"automatyczne testy na Githubie\",\n },\n {\n value: \"commitlint\",\n label: c.bold(\"Commitlint\"),\n hint: \"walidacja treści commitów\",\n },\n ],\n required: false,\n});\n\nif (p.isCancel(additionalTools) || additionalTools.length === 0) {\n p.cancel(\"Nie wybrano żadnych narzędzi.\");\n process.exit(1);\n}\n\nawait packageJson.install(\"@solvro/config\", { dev: true, alwaysUpdate: true });\n\nif (additionalTools.includes(\"eslint\")) {\n await installEslint();\n}\n\nif (additionalTools.includes(\"prettier\")) {\n await installPrettier();\n\n await installLintStaged();\n}\n\nif (additionalTools.includes(\"commitlint\")) {\n await installCommitLint();\n}\n\nif (additionalTools.includes(\"gh-action\")) {\n await installGithubActions();\n}\n","import { execSync } from \"node:child_process\";\n\nexport function isGitClean(): boolean {\n try {\n execSync(\"git diff-index --quiet HEAD --\");\n return true;\n } catch {\n return false;\n }\n}\n","import * as p from \"@clack/prompts\";\nimport { getPackageInfo, isPackageListed, loadPackageJSON } from \"local-pkg\";\nimport assert from \"node:assert\";\nimport { writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport semver from \"semver\";\n\nimport { $$ } from \"./$$\";\nimport { gitRoot } from \"./git-root\";\nimport { polishConfirm } from \"./polish-confirm\";\n\nexport class PackageJson {\n public json: Awaited<ReturnType<typeof loadPackageJSON>> = null;\n\n async load() {\n const json = await loadPackageJSON(gitRoot());\n\n if (json === null) {\n p.cancel(\n \"Nie znaleziono package.json. Upewnij się, że jesteś w katalogu projektu.\",\n );\n process.exit(1);\n }\n\n this.json = json;\n }\n\n hasPackage(pkg: string) {\n return isPackageListed(pkg);\n }\n\n async doesSatisfies(pkg: string, version: string) {\n await this.load();\n\n assert(this.json !== null);\n\n const packageInfo = await getPackageInfo(pkg);\n\n if (packageInfo?.version === undefined) {\n return false;\n }\n\n return semver.satisfies(packageInfo.version, version);\n }\n\n async ensureESM() {\n await this.load();\n\n assert(this.json !== null);\n\n if (this.json.type === \"module\") {\n return;\n }\n\n const isConfirmed = await polishConfirm({\n message: `Twój projekt nie używa ESM (brak type: \"module\" w package.json). Czy chcesz to dodać? (Wymagane by kontynuować)`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zmień projekt na ESM i spróbuj ponownie.\");\n process.exit(1);\n }\n\n this.json.type = \"module\";\n\n await this.save();\n }\n\n async getProjectType() {\n const isAdonis = await isPackageListed(\"@adonisjs/core\");\n const isNext = await isPackageListed(\"next\");\n\n if (isNext && isAdonis) {\n throw new Error(\n \"You can't use both Adonis and Next.js in the same project\",\n );\n }\n\n if (isAdonis) {\n return \"adonis\";\n }\n\n if (isNext) {\n return \"next\";\n }\n\n return \"node\";\n }\n\n async save() {\n await writeFile(\n path.join(gitRoot(), \"package.json\"),\n JSON.stringify(this.json, null, 2),\n );\n }\n\n async addScriptIfNotExists(name: string, script: string) {\n await this.load();\n\n assert(this.json !== null);\n\n if (this.json.scripts?.[name] !== undefined) {\n return;\n }\n\n this.json.scripts = this.json.scripts ?? {};\n this.json.scripts[name] = script;\n\n await this.save();\n }\n\n async install(\n pkg: string,\n options?: { minVersion?: string; dev?: boolean; alwaysUpdate?: boolean },\n ) {\n const isInstalled = await this.hasPackage(pkg);\n\n if (!isInstalled) {\n const spinner = p.spinner();\n spinner.start(`Instalowanie ${pkg}`);\n await $$`npm i ${options?.dev === true ? \"-D\" : \"\"} ${pkg}@latest`;\n spinner.stop(`${pkg} zainstalowany 😍`);\n\n await this.load();\n\n return;\n }\n\n const info = await getPackageInfo(pkg);\n\n if (\n (info?.version !== undefined &&\n options?.minVersion !== undefined &&\n !semver.satisfies(info.version, options.minVersion)) ||\n options?.alwaysUpdate === true\n ) {\n const spinner = p.spinner();\n spinner.start(`Aktualizowanie ${pkg}`);\n await $$`npm i ${options.dev === true ? \"-D\" : \"\"} ${pkg}@latest`;\n spinner.stop(`${pkg} zaktualizowany 😍`);\n\n await this.load();\n }\n }\n}\n","import { $ } from \"execa\";\n\nimport { gitRoot } from \"./git-root\";\n\nexport const $$ = $({\n cwd: gitRoot(),\n});\n","import { execSync } from \"node:child_process\";\n\nexport const gitRoot = () => {\n const root = execSync(\"git rev-parse --show-toplevel\").toString().trim();\n return root;\n};\n","import * as p from \"@clack/prompts\";\n\nexport const polishConfirm = async (props: p.ConfirmOptions) => {\n return p.confirm({\n active: \"Tak\",\n inactive: \"Nie\",\n ...props,\n });\n};\n","import { writeFile } from \"fs/promises\";\nimport path from \"path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { installHusky } from \"./install-husky\";\nimport { commitlint } from \"./templates/commitlint\";\n\nconst root = gitRoot();\n\nconst packageJson = new PackageJson();\n\nexport const installCommitLint = async () => {\n await installHusky();\n\n await packageJson.install(\"@commitlint/cli\", { dev: true });\n\n await writeFile(\n path.join(root, \".husky/commit-msg\"),\n 'npx commitlint --edit \"$1\"\\n',\n );\n\n await writeFile(path.join(root, \".commitlintrc.js\"), commitlint());\n};\n","import assert from \"assert\";\n\nimport { $$ } from \"../utils/$$\";\nimport { PackageJson } from \"../utils/package-json\";\n\nconst packageJson = new PackageJson();\n\nexport const installHusky = async () => {\n if (!(await packageJson.hasPackage(\"husky\"))) {\n await packageJson.install(\"husky\", { dev: true });\n await $$`npx husky init`;\n }\n\n await packageJson.load();\n\n assert(packageJson.json !== null);\n\n packageJson.json.scripts = packageJson.json.scripts ?? {};\n packageJson.json.scripts.prepare = `husky || true`;\n\n await packageJson.save();\n};\n","export const commitlint = () => `export default {\n extends: [\"@solvro/config/commitlint\"],\n};\n`;\n","import * as p from \"@clack/prompts\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\n\nconst eslintConfigNames = [\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.yaml\",\n \".eslintrc.yml\",\n \".eslintrc.json\",\n \".eslintrc\",\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \"eslint.config.mts\",\n \"eslint.config.cts\",\n];\n\nconst packageJson = new PackageJson();\n\nexport const installEslint = async () => {\n const root = gitRoot();\n\n await packageJson.load();\n\n await packageJson.install(\"eslint\", { dev: true, minVersion: \">=9\" });\n\n const type = await packageJson.getProjectType();\n\n if (type === \"next\") {\n const is15 = await packageJson.doesSatisfies(\"next\", \">=15\");\n\n if (!is15) {\n p.cancel(\n \"Next.js musi być w conajmniej wersji 15. Zaktualizuj Next.js i spróbuj ponownie.\\nWięcej informacji tutaj: https://nextjs.org/docs/app/building-your-application/upgrading/version-15\",\n );\n process.exit(1);\n }\n\n await packageJson.install(\"@next/eslint-plugin-next\", { dev: true });\n }\n\n const eslintConfig = eslintConfigNames.find((configName) =>\n existsSync(path.join(root, configName)),\n );\n\n if (eslintConfig !== undefined) {\n const eslintContent = await fs.readFile(\n path.join(root, eslintConfig),\n \"utf-8\",\n );\n\n if (eslintContent.includes(\"export default solvro(\")) {\n p.note(\"Eslint jest już skonfigurowany. Pomijam.\");\n\n return;\n } else {\n const isConfirmed = await polishConfirm({\n message: `Znaleziono plik konfiguracyjny Eslint. Czy chcesz go nadpisać?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Nadpisz plik konfiguracyjny Eslint i spróbuj ponownie.\");\n process.exit(1);\n }\n\n await fs.rm(path.join(root, eslintConfig));\n }\n }\n\n await fs.writeFile(\n path.join(gitRoot(), \"eslint.config.js\"),\n `import { solvro } from \"@solvro/config/eslint\";\n\nexport default solvro();\n`,\n );\n\n p.note(\"Plik konfiguracyjny Eslint został utworzony.\");\n};\n","import * as p from \"@clack/prompts\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { adonisCi } from \"./templates/adonis-ci\";\nimport { adonisMigrationsCi } from \"./templates/adonis-ci-migrations\";\nimport { dependabot } from \"./templates/dependabot\";\nimport { nextCi } from \"./templates/next-ci\";\n\nconst packageJson = new PackageJson();\n\nexport const installGithubActions = async () => {\n const root = gitRoot();\n await packageJson.load();\n\n const ghWorkflowsDir = path.join(root, \".github/workflows\");\n await fs.mkdir(ghWorkflowsDir, { recursive: true });\n\n const type = await packageJson.getProjectType();\n\n const withCommitlint = await packageJson.hasPackage(\"@commitlint/cli\");\n\n if (type === \"adonis\") {\n if (!existsSync(path.join(root, \".env.example\"))) {\n p.cancel(\n \"Nie znaleziono pliku .env.example. Upewnij się, że jesteś w katalogu projektu Adonisa.\",\n );\n process.exit(1);\n }\n\n await fs.writeFile(\n path.join(ghWorkflowsDir, \"ci.yml\"),\n adonisCi({\n nodeVersion: \"22\",\n withCommitlint,\n }),\n );\n\n await fs.writeFile(\n path.join(ghWorkflowsDir, \"db.yml\"),\n adonisMigrationsCi(),\n );\n }\n\n if (type === \"next\") {\n await fs.writeFile(\n path.join(ghWorkflowsDir, \"ci.yml\"),\n nextCi({\n nodeVersion: \"22\",\n withCommitlint,\n }),\n );\n }\n\n if (!existsSync(path.join(root, \".github/dependabot.yml\"))) {\n await fs.writeFile(path.join(root, \".github/dependabot.yml\"), dependabot());\n }\n\n await packageJson.addScriptIfNotExists(\"format:check\", \"prettier --check .\");\n await packageJson.addScriptIfNotExists(\"lint\", \"eslint . --max-warnings=0\");\n await packageJson.addScriptIfNotExists(\"format\", \"prettier --write .\");\n await packageJson.addScriptIfNotExists(\"typecheck\", \"tsc --noEmit\");\n\n p.note(\"Dodano konfigurację CI i skrypty.\");\n};\n","export const commitLintCi = () => `\n - name: Check commit name\n if: github.event_name == 'pull_request'\n run: npx commitlint --from \\${{ github.event.pull_request.base.sha }} --to \\${{ github.event.pull_request.head.sha }} --verbose\n`;\n","import { commitLintCi } from \"./commit-lint-ci\";\n\nexport const adonisCi = ({\n nodeVersion,\n withCommitlint,\n}: {\n nodeVersion: string;\n withCommitlint: boolean;\n}) => `name: CI\n\non:\n push:\n branches: [\"main\"]\n pull_request:\n\njobs:\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Setup node\n uses: actions/setup-node@v4\n with:\n node-version: ${nodeVersion}\n cache: \"npm\"\n\n - name: Install dependencies\n run: npm ci\n\n - name: Set up AdonisJS environment\n run: |\n cp .env.example .env\n node ace generate:key\n${withCommitlint ? commitLintCi() : \"\"}\n - name: Run prettier\n run: npm run format:check\n if: always()\n\n - name: Run Lint\n run: npm run lint\n if: always()\n\n - name: Check types\n run: npm run typecheck\n if: always()\n\n - name: Run tests\n run: npm test\n if: always()\n\n - name: Build\n run: npm run build\n if: always()`;\n","export const adonisMigrationsCi = () => `name: Migration check\n\non:\n pull_request:\n branches: [\"*\"]\n push:\n branches: [\"main\"]\n\njobs:\n migration-check:\n runs-on: ubuntu-latest\n env:\n DB_HOST: 127.0.0.1\n DB_PORT: 5432\n DB_USER: postgres\n DB_PASSWORD: postgres\n DB_DATABASE: postgres\n\n services:\n postgres:\n image: postgres\n env:\n POSTGRES_PASSWORD: postgres\n options: >-\n --health-cmd pg_isready\n --health-interval 10s\n --health-timeout 5s\n --health-retries 5\n ports:\n - 5432:5432\n\n steps:\n - name: Check out repository code\n uses: actions/checkout@v4\n\n - name: Install dependencies\n run: npm ci\n\n - name: Set up AdonisJS environment\n run: |\n cp .env.example .env\n node ace generate:key\n\n - name: Run AdonisJS migrations\n run: node ace migration:run\n\n - name: Rollback and rerun AdonisJS migrations\n run: node ace migration:refresh\n`;\n","export const dependabot = () => `version: 2\nupdates:\n - package-ecosystem: \"npm\"\n directory: \"/\"\n schedule:\n interval: \"daily\"\n allow:\n - dependency-name: \"@solvro/config\"\n`;\n","import { commitLintCi } from \"./commit-lint-ci\";\n\nexport const nextCi = ({\n nodeVersion,\n withCommitlint,\n}: {\n nodeVersion: string;\n withCommitlint: boolean;\n}) => `name: CI\n\non:\n push:\n branches: [\"main\"]\n pull_request:\n\njobs:\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Setup node\n uses: actions/setup-node@v4\n with:\n node-version: ${nodeVersion}\n cache: 'npm'\n\n - name: Install dependencies\n run: npm ci\n${withCommitlint ? commitLintCi() : \"\"}\n - name: Format check\n run: npm run format:check\n if: always()\n\n - name: Build\n run: npm run build\n if: always()`;\n","import assert from \"assert\";\nimport { writeFile } from \"fs/promises\";\n\nimport { PackageJson } from \"../utils/package-json\";\nimport { installHusky } from \"./install-husky\";\n\nconst packageJson = new PackageJson();\n\nexport const installLintStaged = async () => {\n await packageJson.load();\n\n assert(packageJson.json !== null);\n\n await installHusky();\n\n await packageJson.install(\"lint-staged\", { dev: true });\n\n await writeFile(\".husky/pre-commit\", \"npx lint-staged\\n\");\n\n packageJson.json[\"lint-staged\"] = {\n \"*\": \"prettier -w --ignore-unknown\",\n };\n\n await packageJson.save();\n};\n","import * as p from \"@clack/prompts\";\nimport assert from \"node:assert\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\n\nconst prettierConfigNames = [\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.yaml\",\n \".prettierrc.yml\",\n \".prettierrc.json\",\n \".prettierrc\",\n \"prettier.config.js\",\n \"prettier.config.mjs\",\n \"prettier.config.cjs\",\n \"prettier.config.ts\",\n \"prettier.config.mts\",\n \"prettier.config.cts\",\n];\n\nconst packageJson = new PackageJson();\n\nexport const installPrettier = async () => {\n const root = gitRoot();\n\n await packageJson.load();\n assert(packageJson.json !== null);\n\n await packageJson.install(\"prettier\", { dev: true, minVersion: \">=3\" });\n\n const prettierConfig = prettierConfigNames.find((configName) =>\n existsSync(path.join(root, configName)),\n );\n\n const solvroPrettierPath = \"@solvro/config/prettier\";\n\n if (prettierConfig !== undefined || packageJson.json.prettier !== undefined) {\n if (packageJson.json.prettier === solvroPrettierPath) {\n p.note(\"Konfiguracja Prettiera jest już ustawiona. Pomijam.\");\n return;\n }\n\n const isConfirmed = await polishConfirm({\n message: `Znaleziono konfigurację Prettiera. Czy chcesz ją nadpisać?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Usuń konfiguracje Prettiera i spróbuj ponownie.\");\n process.exit(1);\n }\n\n for (const configName of prettierConfigNames) {\n await fs.rm(path.join(root, configName)).catch(() => null);\n }\n }\n\n packageJson.json.prettier = solvroPrettierPath;\n\n await packageJson.save();\n\n p.note(\"Konfiguracja Prettiera została dodana.\");\n};\n"],"mappings":";AAAA,YAAYA,QAAO;AACnB,OAAO,OAAO;;;ACDd,SAAS,gBAAgB;AAElB,SAAS,aAAsB;AACpC,MAAI;AACF,aAAS,gCAAgC;AACzC,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;;;ACTA,YAAYC,QAAO;AACnB,SAAS,gBAAgB,iBAAiB,uBAAuB;AACjE,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,OAAO,YAAY;;;ACLnB,SAAS,SAAS;;;ACAlB,SAAS,YAAAC,iBAAgB;AAElB,IAAM,UAAU,MAAM;AAC3B,QAAMC,QAAOD,UAAS,+BAA+B,EAAE,SAAS,EAAE,KAAK;AACvE,SAAOC;AACT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,WAAW,QAAQ,CAAC;AAAA,MACpC,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO,EAAE,KAAK,EAAE,aAAa,UAAU,CAAC;AAAA,MACxC,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO,EAAE,KAAK,gBAAgB;AAAA,MAC9B,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,OAAO,EAAE,KAAK,YAAY;AAAA,MAC1B,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,UAAU;AACZ,CAAC;AAED,IAAM,YAAS,eAAe,KAAK,gBAAgB,WAAW,GAAG;AAC/D,EAAE,UAAO,yCAA+B;AACxC,UAAQ,KAAK,CAAC;AAChB;AAEA,MAAMA,aAAY,QAAQ,kBAAkB,EAAE,KAAK,MAAM,cAAc,KAAK,CAAC;AAE7E,IAAI,gBAAgB,SAAS,QAAQ,GAAG;AACtC,QAAM,cAAc;AACtB;AAEA,IAAI,gBAAgB,SAAS,UAAU,GAAG;AACxC,QAAM,gBAAgB;AAEtB,QAAM,kBAAkB;AAC1B;AAEA,IAAI,gBAAgB,SAAS,YAAY,GAAG;AAC1C,QAAM,kBAAkB;AAC1B;AAEA,IAAI,gBAAgB,SAAS,WAAW,GAAG;AACzC,QAAM,qBAAqB;AAC7B;","names":["p","p","execSync","root","spinner","writeFile","path","assert","assert","packageJson","writeFile","path","p","path","packageJson","root","path","p","existsSync","fs","path","packageJson","root","path","existsSync","assert","writeFile","packageJson","assert","writeFile","p","assert","existsSync","fs","path","packageJson","root","assert","existsSync","path","packageJson"]}
|
1
|
+
{"version":3,"sources":["../../src/cli/index.ts","../../src/utils/is-git-clean.ts","../../src/utils/package-json.ts","../../src/utils/$$.ts","../../src/utils/git-root.ts","../../src/utils/polish-confirm.ts","../../src/cli/install-commitlint.ts","../../src/cli/install-husky.ts","../../src/cli/templates/commitlint.ts","../../src/cli/install-eslint.ts","../../src/cli/install-ga.ts","../../src/cli/templates/commit-lint-ci.ts","../../src/cli/templates/adonis-ci.ts","../../src/cli/templates/adonis-ci-migrations.ts","../../src/cli/templates/dependabot.ts","../../src/cli/templates/react-ci.ts","../../src/cli/install-lint-staged.ts","../../src/cli/install-prettier.ts"],"sourcesContent":["import * as p from \"@clack/prompts\";\nimport c from \"picocolors\";\n\nimport { isGitClean } from \"../utils/is-git-clean\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\nimport { installCommitLint } from \"./install-commitlint\";\nimport { installEslint } from \"./install-eslint\";\nimport { installGithubActions } from \"./install-ga\";\nimport { installLintStaged } from \"./install-lint-staged\";\nimport { installPrettier } from \"./install-prettier\";\n\np.intro(c.bold(c.bgBlue(\" @solvro/config \")));\n\nif (!isGitClean()) {\n const isConfirmed = await polishConfirm({\n message: `Masz niezapisane zmiany w Git. Czy chcesz kontynuować?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zapisz zmiany w Git i spróbuj ponownie.\");\n process.exit(1);\n }\n}\n\nconst packageJson = new PackageJson();\n\nconst projectType = await packageJson.getProjectType();\n\nif (projectType === \"adonis\") {\n const isConfirmed = await polishConfirm({\n message: `Wygląda jakbyś używał Adonisa. Czy to się zgadza?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zgłoś błąd na GitHubie :(, a my spróbujemy pomóc.\");\n process.exit(1);\n }\n\n await packageJson.ensureESM();\n}\n\nif (projectType === \"react\") {\n const isConfirmed = await polishConfirm({\n message: `Wygląda jakbyś używał Reacta. Czy to się zgadza?`,\n });\n\n if (p.isCancel(isConfirmed)) {\n p.cancel(\"😡\");\n process.exit(1);\n }\n\n if (!isConfirmed) {\n p.cancel(\"Zgłoś błąd na GitHubie :(, a my spróbujemy pomóc.\");\n process.exit(1);\n }\n\n await packageJson.ensureESM();\n}\n\nif (projectType === \"nestjs\") {\n const isConfirmed = await polishConfirm({\n message: `Wygląda jakbyś używał NestJsa. Czy to się zgadza?`,\n });\n\n if (p.isCancel(isConfirmed)) {\n p.cancel(\"😡\");\n process.exit(1);\n }\n}\n\nif (projectType === \"node\") {\n p.cancel(\n \"Nie znaleziono ani Adonisa, Reacta, ani NestJsa. Musisz ręcznie konfigurować projekt.\",\n );\n process.exit(1);\n}\n\nconst additionalTools = await p.multiselect({\n message: `Które rzeczy Cię interesują? ${c.gray(\"zaznacz spacją, potwierdź enterem\")}`,\n initialValues: [\"eslint\", \"prettier\", \"gh-action\", \"commitlint\"],\n options: [\n {\n value: \"eslint\",\n label: c.bold(c.blueBright(\"ESLint\")),\n hint: \"sprawdzanie jakości kodu\",\n },\n {\n value: \"prettier\",\n label: c.bold(c.yellowBright(\"Prettier\")),\n hint: \"formatowanie\",\n },\n {\n value: \"gh-action\",\n label: c.bold(\"GitHub Actions\"),\n hint: \"automatyczne testy na Githubie\",\n },\n {\n value: \"commitlint\",\n label: c.bold(\"Commitlint\"),\n hint: \"walidacja treści commitów\",\n },\n ],\n required: false,\n});\n\nif (p.isCancel(additionalTools) || additionalTools.length === 0) {\n p.cancel(\"Nie wybrano żadnych narzędzi.\");\n process.exit(1);\n}\n\nawait packageJson.install(\"@solvro/config\", { dev: true, alwaysUpdate: true });\n\nif (additionalTools.includes(\"eslint\")) {\n await installEslint();\n}\n\nif (additionalTools.includes(\"prettier\")) {\n await installPrettier();\n\n await installLintStaged();\n}\n\nif (additionalTools.includes(\"commitlint\")) {\n await installCommitLint();\n}\n\nif (additionalTools.includes(\"gh-action\")) {\n await installGithubActions();\n}\n","import { execSync } from \"node:child_process\";\n\nexport function isGitClean(): boolean {\n try {\n execSync(\"git diff-index --quiet HEAD --\");\n return true;\n } catch {\n return false;\n }\n}\n","import * as p from \"@clack/prompts\";\nimport { getPackageInfo, isPackageListed, loadPackageJSON } from \"local-pkg\";\nimport assert from \"node:assert\";\nimport { writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport semver from \"semver\";\n\nimport { $$ } from \"./$$\";\nimport { gitRoot } from \"./git-root\";\nimport { polishConfirm } from \"./polish-confirm\";\n\nexport class PackageJson {\n public json: Awaited<ReturnType<typeof loadPackageJSON>> = null;\n\n async load() {\n const json = await loadPackageJSON(gitRoot());\n\n if (json === null) {\n p.cancel(\n \"Nie znaleziono package.json. Upewnij się, że jesteś w katalogu projektu.\",\n );\n process.exit(1);\n }\n\n this.json = json;\n }\n\n hasPackage(package_: string) {\n return isPackageListed(package_);\n }\n\n async doesSatisfies(package_: string, version: string) {\n await this.load();\n\n assert(this.json !== null);\n\n const packageInfo = await getPackageInfo(package_);\n\n if (packageInfo?.version === undefined) {\n return false;\n }\n\n return semver.satisfies(packageInfo.version, version);\n }\n\n async ensureESM() {\n await this.load();\n\n assert(this.json !== null);\n\n if (this.json.type === \"module\") {\n return;\n }\n\n const isConfirmed = await polishConfirm({\n message: `Twój projekt nie używa ESM (brak type: \"module\" w package.json). Czy chcesz to dodać? (Wymagane by kontynuować)`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Zmień projekt na ESM i spróbuj ponownie.\");\n process.exit(1);\n }\n\n this.json.type = \"module\";\n\n await this.save();\n }\n\n async getProjectType() {\n const isAdonis = await isPackageListed(\"@adonisjs/core\");\n const isReact = await isPackageListed(\"react\");\n const isNestJs = await isPackageListed(\"@nestjs/core\");\n if (isReact && isAdonis) {\n throw new Error(\n \"You can't use both Adonis and React in the same project\",\n );\n }\n\n if (isNestJs) {\n return \"nestjs\";\n }\n\n if (isAdonis) {\n return \"adonis\";\n }\n\n if (isReact) {\n return \"react\";\n }\n\n return \"node\";\n }\n\n async save() {\n await writeFile(\n path.join(gitRoot(), \"package.json\"),\n JSON.stringify(this.json, null, 2),\n );\n }\n\n async addScriptIfNotExists(name: string, script: string) {\n await this.load();\n\n assert(this.json !== null);\n\n if (this.json.scripts?.[name] !== undefined) {\n return;\n }\n\n this.json.scripts = this.json.scripts ?? {};\n this.json.scripts[name] = script;\n\n await this.save();\n }\n\n async install(\n package_: string,\n options?: { minVersion?: string; dev?: boolean; alwaysUpdate?: boolean },\n ) {\n const isInstalled = await this.hasPackage(package_);\n\n if (!isInstalled) {\n const spinner = p.spinner();\n spinner.start(`Instalowanie ${package_}`);\n await $$`npm i ${options?.dev === true ? \"-D\" : \"\"} ${package_}@latest`;\n spinner.stop(`${package_} zainstalowany 😍`);\n\n await this.load();\n\n return;\n }\n\n const info = await getPackageInfo(package_);\n\n if (\n (info?.version !== undefined &&\n options?.minVersion !== undefined &&\n !semver.satisfies(info.version, options.minVersion)) ||\n options?.alwaysUpdate === true\n ) {\n const spinner = p.spinner();\n spinner.start(`Aktualizowanie ${package_}`);\n await $$`npm i ${options.dev === true ? \"-D\" : \"\"} ${package_}@latest`;\n spinner.stop(`${package_} zaktualizowany 😍`);\n\n await this.load();\n }\n }\n}\n","import { $ } from \"execa\";\n\nimport { gitRoot } from \"./git-root\";\n\nexport const $$ = $({\n cwd: gitRoot(),\n});\n","import { execSync } from \"node:child_process\";\n\nexport const gitRoot = () => {\n const root = execSync(\"git rev-parse --show-toplevel\").toString().trim();\n return root;\n};\n","import * as p from \"@clack/prompts\";\n\nexport const polishConfirm = async (props: p.ConfirmOptions) => {\n return p.confirm({\n active: \"Tak\",\n inactive: \"Nie\",\n ...props,\n });\n};\n","import { writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { installHusky } from \"./install-husky\";\nimport { commitlint } from \"./templates/commitlint\";\n\nconst root = gitRoot();\n\nconst packageJson = new PackageJson();\n\nexport const installCommitLint = async () => {\n await installHusky();\n\n await packageJson.install(\"@commitlint/cli\", { dev: true });\n\n await writeFile(\n path.join(root, \".husky/commit-msg\"),\n 'npx commitlint --edit \"$1\"\\n',\n );\n\n await writeFile(path.join(root, \".commitlintrc.js\"), commitlint());\n};\n","import assert from \"assert\";\n\nimport { $$ } from \"../utils/$$\";\nimport { PackageJson } from \"../utils/package-json\";\n\nconst packageJson = new PackageJson();\n\nexport const installHusky = async () => {\n if (!(await packageJson.hasPackage(\"husky\"))) {\n await packageJson.install(\"husky\", { dev: true });\n await $$`npx husky init`;\n }\n\n await packageJson.load();\n\n assert(packageJson.json !== null);\n\n packageJson.json.scripts = packageJson.json.scripts ?? {};\n packageJson.json.scripts.prepare = `husky || true`;\n\n await packageJson.save();\n};\n","export const commitlint = () => `export default {\n extends: [\"@solvro/config/commitlint\"],\n};\n`;\n","import * as p from \"@clack/prompts\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\n\nconst eslintConfigNames = [\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.yaml\",\n \".eslintrc.yml\",\n \".eslintrc.json\",\n \".eslintrc\",\n \"eslint.config.js\",\n \"eslint.config.mjs\",\n \"eslint.config.cjs\",\n \"eslint.config.ts\",\n \"eslint.config.mts\",\n \"eslint.config.cts\",\n];\n\nconst packageJson = new PackageJson();\n\nexport const installEslint = async () => {\n const root = gitRoot();\n\n await packageJson.load();\n\n await packageJson.install(\"eslint\", { dev: true, minVersion: \">=9\" });\n\n const type = await packageJson.getProjectType();\n\n if (type === \"react\" && (await packageJson.hasPackage(\"next\"))) {\n const is15 = await packageJson.doesSatisfies(\"next\", \">=15\");\n\n if (!is15) {\n p.cancel(\n \"Next.js musi być w conajmniej wersji 15. Zaktualizuj Next.js i spróbuj ponownie.\\nWięcej informacji tutaj: https://nextjs.org/docs/app/building-your-application/upgrading/version-15\",\n );\n process.exit(1);\n }\n\n await packageJson.install(\"@next/eslint-plugin-next\", { dev: true });\n }\n\n const eslintConfig = eslintConfigNames.find((configName) =>\n existsSync(path.join(root, configName)),\n );\n\n if (eslintConfig !== undefined) {\n const eslintContent = await fs.readFile(\n path.join(root, eslintConfig),\n \"utf8\",\n );\n\n if (eslintContent.includes(\"export default solvro(\")) {\n p.note(\"Eslint jest już skonfigurowany. Pomijam.\");\n\n return;\n } else {\n const isConfirmed = await polishConfirm({\n message: `Znaleziono plik konfiguracyjny Eslint. Czy chcesz go nadpisać?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Nadpisz plik konfiguracyjny Eslint i spróbuj ponownie.\");\n process.exit(1);\n }\n\n await fs.rm(path.join(root, eslintConfig));\n }\n }\n\n await fs.writeFile(\n path.join(gitRoot(), \"eslint.config.js\"),\n `import { solvro } from \"@solvro/config/eslint\";\n\nexport default solvro();\n`,\n );\n\n p.note(\"Plik konfiguracyjny Eslint został utworzony.\");\n};\n","import * as p from \"@clack/prompts\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { adonisCi } from \"./templates/adonis-ci\";\nimport { adonisMigrationsCi } from \"./templates/adonis-ci-migrations\";\nimport { dependabot } from \"./templates/dependabot\";\nimport { reactCi } from \"./templates/react-ci\";\n\nconst packageJson = new PackageJson();\n\nexport const installGithubActions = async () => {\n const root = gitRoot();\n await packageJson.load();\n\n const ghWorkflowsDirectory = path.join(root, \".github/workflows\");\n await fs.mkdir(ghWorkflowsDirectory, { recursive: true });\n\n const type = await packageJson.getProjectType();\n\n const withCommitlint = await packageJson.hasPackage(\"@commitlint/cli\");\n\n if (type === \"adonis\") {\n if (!existsSync(path.join(root, \".env.example\"))) {\n p.cancel(\n \"Nie znaleziono pliku .env.example. Upewnij się, że jesteś w katalogu projektu Adonisa.\",\n );\n process.exit(1);\n }\n\n await fs.writeFile(\n path.join(ghWorkflowsDirectory, \"ci.yml\"),\n adonisCi({\n nodeVersion: \"22\",\n withCommitlint,\n }),\n );\n\n await fs.writeFile(\n path.join(ghWorkflowsDirectory, \"db.yml\"),\n adonisMigrationsCi(),\n );\n }\n\n if (type === \"react\") {\n await fs.writeFile(\n path.join(ghWorkflowsDirectory, \"ci.yml\"),\n reactCi({\n nodeVersion: \"22\",\n withCommitlint,\n }),\n );\n }\n\n if (!existsSync(path.join(root, \".github/dependabot.yml\"))) {\n await fs.writeFile(path.join(root, \".github/dependabot.yml\"), dependabot());\n }\n\n await packageJson.addScriptIfNotExists(\"format:check\", \"prettier --check .\");\n await packageJson.addScriptIfNotExists(\"lint\", \"eslint . --max-warnings=0\");\n await packageJson.addScriptIfNotExists(\"format\", \"prettier --write .\");\n await packageJson.addScriptIfNotExists(\"typecheck\", \"tsc --noEmit\");\n\n p.note(\"Dodano konfigurację CI i skrypty.\");\n};\n","export const commitLintCi = () => `\n - name: Check commit name\n if: github.event_name == 'pull_request'\n run: npx commitlint --from \\${{ github.event.pull_request.base.sha }} --to \\${{ github.event.pull_request.head.sha }} --verbose\n`;\n","import { commitLintCi } from \"./commit-lint-ci\";\n\nexport const adonisCi = ({\n nodeVersion,\n withCommitlint,\n}: {\n nodeVersion: string;\n withCommitlint: boolean;\n}) => `name: CI\n\non:\n push:\n branches: [\"main\"]\n pull_request:\n\njobs:\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Setup node\n uses: actions/setup-node@v4\n with:\n node-version: ${nodeVersion}\n cache: \"npm\"\n\n - name: Install dependencies\n run: npm ci\n\n - name: Set up AdonisJS environment\n run: |\n cp .env.example .env\n node ace generate:key\n${withCommitlint ? commitLintCi() : \"\"}\n - name: Run prettier\n run: npm run format:check\n if: always()\n\n - name: Run Lint\n run: npm run lint\n if: always()\n\n - name: Check types\n run: npm run typecheck\n if: always()\n\n - name: Run tests\n run: npm test\n if: always()\n\n - name: Build\n run: npm run build\n if: always()`;\n","export const adonisMigrationsCi = () => `name: Migration check\n\non:\n pull_request:\n branches: [\"*\"]\n push:\n branches: [\"main\"]\n\njobs:\n migration-check:\n runs-on: ubuntu-latest\n env:\n DB_HOST: 127.0.0.1\n DB_PORT: 5432\n DB_USER: postgres\n DB_PASSWORD: postgres\n DB_DATABASE: postgres\n\n services:\n postgres:\n image: postgres\n env:\n POSTGRES_PASSWORD: postgres\n options: >-\n --health-cmd pg_isready\n --health-interval 10s\n --health-timeout 5s\n --health-retries 5\n ports:\n - 5432:5432\n\n steps:\n - name: Check out repository code\n uses: actions/checkout@v4\n\n - name: Install dependencies\n run: npm ci\n\n - name: Set up AdonisJS environment\n run: |\n cp .env.example .env\n node ace generate:key\n\n - name: Run AdonisJS migrations\n run: node ace migration:run\n\n - name: Rollback and rerun AdonisJS migrations\n run: node ace migration:refresh\n`;\n","export const dependabot = () => `version: 2\nupdates:\n - package-ecosystem: \"npm\"\n directory: \"/\"\n schedule:\n interval: \"daily\"\n allow:\n - dependency-name: \"@solvro/config\"\n`;\n","import { commitLintCi } from \"./commit-lint-ci\";\n\nexport const reactCi = ({\n nodeVersion,\n withCommitlint,\n}: {\n nodeVersion: string;\n withCommitlint: boolean;\n}) => `name: CI\n\non:\n push:\n branches: [\"main\"]\n pull_request:\n\njobs:\n lint:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n with:\n fetch-depth: 0\n\n - name: Setup node\n uses: actions/setup-node@v4\n with:\n node-version: ${nodeVersion}\n cache: 'npm'\n\n - name: Install dependencies\n run: npm ci\n${withCommitlint ? commitLintCi() : \"\"}\n - name: Format check\n run: npm run format:check\n if: always()\n\n - name: Build\n run: npm run build\n if: always()`;\n","import assert from \"node:assert\";\nimport { writeFile } from \"node:fs/promises\";\n\nimport { PackageJson } from \"../utils/package-json\";\nimport { installHusky } from \"./install-husky\";\n\nconst packageJson = new PackageJson();\n\nexport const installLintStaged = async () => {\n await packageJson.load();\n\n assert(packageJson.json !== null);\n\n await installHusky();\n\n await packageJson.install(\"lint-staged\", { dev: true });\n\n await writeFile(\".husky/pre-commit\", \"npx lint-staged\\n\");\n\n packageJson.json[\"lint-staged\"] = {\n \"*\": \"prettier -w --ignore-unknown\",\n };\n\n await packageJson.save();\n};\n","import * as p from \"@clack/prompts\";\nimport assert from \"node:assert\";\nimport { existsSync } from \"node:fs\";\nimport * as fs from \"node:fs/promises\";\nimport path from \"node:path\";\n\nimport { gitRoot } from \"../utils/git-root\";\nimport { PackageJson } from \"../utils/package-json\";\nimport { polishConfirm } from \"../utils/polish-confirm\";\n\nconst prettierConfigNames = [\n \".prettierrc.js\",\n \".prettierrc.cjs\",\n \".prettierrc.yaml\",\n \".prettierrc.yml\",\n \".prettierrc.json\",\n \".prettierrc\",\n \"prettier.config.js\",\n \"prettier.config.mjs\",\n \"prettier.config.cjs\",\n \"prettier.config.ts\",\n \"prettier.config.mts\",\n \"prettier.config.cts\",\n];\n\nconst packageJson = new PackageJson();\n\nexport const installPrettier = async () => {\n const root = gitRoot();\n\n await packageJson.load();\n assert(packageJson.json !== null);\n\n await packageJson.install(\"prettier\", { dev: true, minVersion: \">=3\" });\n\n const prettierConfig = prettierConfigNames.find((configName) =>\n existsSync(path.join(root, configName)),\n );\n\n const solvroPrettierPath = \"@solvro/config/prettier\";\n\n if (prettierConfig !== undefined || packageJson.json.prettier !== undefined) {\n if (packageJson.json.prettier === solvroPrettierPath) {\n p.note(\"Konfiguracja Prettiera jest już ustawiona. Pomijam.\");\n return;\n }\n\n const isConfirmed = await polishConfirm({\n message: `Znaleziono konfigurację Prettiera. Czy chcesz ją nadpisać?`,\n });\n\n if (p.isCancel(isConfirmed) || !isConfirmed) {\n p.cancel(\"Usuń konfiguracje Prettiera i spróbuj ponownie.\");\n process.exit(1);\n }\n\n for (const configName of prettierConfigNames) {\n await fs.rm(path.join(root, configName)).catch(() => null);\n }\n }\n\n packageJson.json.prettier = solvroPrettierPath;\n\n await packageJson.save();\n\n p.note(\"Konfiguracja Prettiera została dodana.\");\n};\n"],"mappings":";AAAA,YAAYA,QAAO;AACnB,OAAO,OAAO;;;ACDd,SAAS,gBAAgB;AAEl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A,MAAMA,aAAY,QAAQ,kBAAkB,EAAE,KAAK,MAAM,cAAc,KAAK,CAAC;AAE7E,IAAI,gBAAgB,SAAS,QAAQ,GAAG;AACtC,QAAM,cAAc;AACtB;AAEA,IAAI,gBAAgB,SAAS,UAAU,GAAG;AACxC,QAAM,gBAAgB;AAEtB,QAAM,kBAAkB;AAC1B;AAEA,IAAI,gBAAgB,SAAS,YAAY,GAAG;AAC1C,QAAM,kBAAkB;AAC1B;AAEA,IAAI,gBAAgB,SAAS,WAAW,GAAG;AACzC,QAAM,qBAAqB;AAC7B;","names":["p","p","execSync","root","spinner","writeFile","path","assert","assert","packageJson","writeFile","path","p","path","packageJson","root","path","p","existsSync","fs","path","packageJson","root","path","existsSync","assert","writeFile","packageJson","assert","writeFile","p","assert","existsSync","fs","path","packageJson","root","assert","existsSync","path","packageJson"]}
|
package/dist/commitlint/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
// src/commitlint/index.ts
|
2
|
-
var
|
2
|
+
var config = {
|
3
3
|
extends: ["@commitlint/config-conventional"],
|
4
4
|
helpUrl: "https://docs.solvro.pl/github#nazewnictwo-commit%C3%B3w",
|
5
5
|
rules: {
|
@@ -35,7 +35,7 @@ var Configuration = {
|
|
35
35
|
"footer-max-line-length": [0, "always"]
|
36
36
|
}
|
37
37
|
};
|
38
|
-
var commitlint_default =
|
38
|
+
var commitlint_default = config;
|
39
39
|
export {
|
40
40
|
commitlint_default as default
|
41
41
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/commitlint/index.ts"],"sourcesContent":["import {
|
1
|
+
{"version":3,"sources":["../../src/commitlint/index.ts"],"sourcesContent":["import type { UserConfig } from \"@commitlint/types\";\n\nconst config: UserConfig = {\n extends: [\"@commitlint/config-conventional\"],\n helpUrl: \"https://docs.solvro.pl/github#nazewnictwo-commit%C3%B3w\",\n rules: {\n \"type-enum\": [\n 2,\n \"always\",\n [\n // A new feature\n \"feat\",\n //A bug fix\n \"fix\",\n // A code change that neither fixes a bug nor adds a feature\n \"refactor\",\n // Boring changes\n \"chore\",\n // Documentation-only changes\n \"docs\",\n // Changes to CI workflows\n \"ci\",\n // Adding missing tests or correcting existing tests\n \"test\",\n \"build\",\n \"release\",\n ],\n ],\n\n // @ts-expect-error ???\n \"body-max-length\": [0, \"always\"],\n // @ts-expect-error ???\n \"body-max-line-length\": [0, \"always\"],\n // @ts-expect-error ???\n \"footer-max-length\": [0, \"always\"],\n // @ts-expect-error ???\n \"footer-max-line-length\": [0, \"always\"],\n },\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default config;\n"],"mappings":";AAEA,IAAM,SAAqB;AAAA,EACzB,SAAS,CAAC,iCAAiC;AAAA,EAC3C,SAAS;AAAA,EACT,OAAO;AAAA,IACL,aAAa;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA;AAAA,QAEE;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA;AAAA,IAGA,mBAAmB,CAAC,GAAG,QAAQ;AAAA;AAAA,IAE/B,wBAAwB,CAAC,GAAG,QAAQ;AAAA;AAAA,IAEpC,qBAAqB,CAAC,GAAG,QAAQ;AAAA;AAAA,IAEjC,0BAA0B,CAAC,GAAG,QAAQ;AAAA,EACxC;AACF;AAGA,IAAO,qBAAQ;","names":[]}
|
package/dist/eslint/index.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
// node_modules/eslint-config-flat-gitignore/dist/index.mjs
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import process2 from "
|
2
|
+
import fs2 from "fs";
|
3
|
+
import path2, { join, resolve, relative, dirname } from "path";
|
4
|
+
import process2 from "process";
|
5
5
|
|
6
6
|
// node_modules/@eslint/compat/dist/esm/index.js
|
7
|
+
import fs from "fs";
|
8
|
+
import path from "path";
|
7
9
|
function convertIgnorePatternToMinimatch(pattern) {
|
8
10
|
const isNegated = pattern.startsWith("!");
|
9
11
|
const negatedPrefix = isNegated ? "!" : "";
|
@@ -23,7 +25,8 @@ function convertIgnorePatternToMinimatch(pattern) {
|
|
23
25
|
}
|
24
26
|
|
25
27
|
// node_modules/eslint-config-flat-gitignore/dist/index.mjs
|
26
|
-
import
|
28
|
+
import "fs/promises";
|
29
|
+
import { fileURLToPath } from "url";
|
27
30
|
function toArray(array) {
|
28
31
|
array = array ?? [];
|
29
32
|
return Array.isArray(array) ? array : [array];
|
@@ -34,19 +37,19 @@ function findUpSync(name, {
|
|
34
37
|
type = "file",
|
35
38
|
stopAt
|
36
39
|
} = {}) {
|
37
|
-
let directory =
|
38
|
-
const { root } =
|
39
|
-
stopAt =
|
40
|
+
let directory = path2.resolve(toPath(cwd) ?? "");
|
41
|
+
const { root } = path2.parse(directory);
|
42
|
+
stopAt = path2.resolve(directory, toPath(stopAt) ?? root);
|
40
43
|
while (directory && directory !== stopAt && directory !== root) {
|
41
|
-
const filePath =
|
44
|
+
const filePath = path2.isAbsolute(name) ? name : path2.join(directory, name);
|
42
45
|
try {
|
43
|
-
const stats =
|
46
|
+
const stats = fs2.statSync(filePath, { throwIfNoEntry: false });
|
44
47
|
if (type === "file" && stats?.isFile() || type === "directory" && stats?.isDirectory()) {
|
45
48
|
return filePath;
|
46
49
|
}
|
47
50
|
} catch {
|
48
51
|
}
|
49
|
-
directory =
|
52
|
+
directory = path2.dirname(directory);
|
50
53
|
}
|
51
54
|
}
|
52
55
|
var GITIGNORE = ".gitignore";
|
@@ -57,7 +60,7 @@ function ignore(options = {}) {
|
|
57
60
|
cwd = process2.cwd(),
|
58
61
|
root = false,
|
59
62
|
files: _files = root ? GITIGNORE : findUpSync(GITIGNORE, { cwd }) || [],
|
60
|
-
filesGitModules: _filesGitModules = root ?
|
63
|
+
filesGitModules: _filesGitModules = root ? fs2.existsSync(join(cwd, GITMODULES)) ? GITMODULES : [] : findUpSync(GITMODULES, { cwd }) || [],
|
61
64
|
strict = true
|
62
65
|
} = options;
|
63
66
|
const files = toArray(_files).map((file) => resolve(cwd, file));
|
@@ -65,7 +68,7 @@ function ignore(options = {}) {
|
|
65
68
|
for (const file of files) {
|
66
69
|
let content = "";
|
67
70
|
try {
|
68
|
-
content =
|
71
|
+
content = fs2.readFileSync(file, "utf8");
|
69
72
|
} catch (error) {
|
70
73
|
if (strict)
|
71
74
|
throw error;
|
@@ -78,7 +81,7 @@ function ignore(options = {}) {
|
|
78
81
|
for (const file of filesGitModules) {
|
79
82
|
let content = "";
|
80
83
|
try {
|
81
|
-
content =
|
84
|
+
content = fs2.readFileSync(file, "utf8");
|
82
85
|
} catch (error) {
|
83
86
|
if (strict)
|
84
87
|
throw error;
|
@@ -126,7 +129,7 @@ function parseGitSubmodules(content) {
|
|
126
129
|
// src/eslint/index.ts
|
127
130
|
import { findUpSync as findUpSync2 } from "find-up-simple";
|
128
131
|
import { isPackageListed } from "local-pkg";
|
129
|
-
import
|
132
|
+
import path3 from "path";
|
130
133
|
import tseslint4 from "typescript-eslint";
|
131
134
|
import { configApp } from "@adonisjs/eslint-config";
|
132
135
|
|
@@ -137,11 +140,8 @@ function a11y() {
|
|
137
140
|
return [
|
138
141
|
{
|
139
142
|
files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
|
140
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
141
143
|
...jsxA11y.flatConfigs.recommended,
|
142
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
143
144
|
languageOptions: {
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
145
145
|
...jsxA11y.flatConfigs.recommended.languageOptions,
|
146
146
|
globals: {
|
147
147
|
...globals.serviceworker,
|
@@ -326,23 +326,29 @@ function ignores() {
|
|
326
326
|
}
|
327
327
|
|
328
328
|
// src/eslint/configs/imports.ts
|
329
|
-
|
329
|
+
var forbiddenUiLibraries = [
|
330
|
+
"@headlessui/react",
|
331
|
+
"@mui/material",
|
332
|
+
"@chakra-ui/react",
|
333
|
+
"@chakra-ui/core",
|
334
|
+
"@nextui-org/react",
|
335
|
+
"react-bootstrap",
|
336
|
+
"antd"
|
337
|
+
];
|
338
|
+
function imports({
|
339
|
+
forbidDefaultExport = true
|
340
|
+
} = {}) {
|
330
341
|
const config = [
|
331
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
332
342
|
default4.flatConfigs.typescript,
|
333
343
|
{
|
334
344
|
name: "solvro/imports/rules",
|
335
345
|
plugins: {
|
336
|
-
antfu: default3
|
337
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
338
|
-
import: default4
|
346
|
+
antfu: default3
|
339
347
|
},
|
340
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
341
348
|
rules: {
|
342
349
|
"antfu/import-dedupe": "error",
|
343
350
|
"antfu/no-import-dist": "error",
|
344
351
|
"antfu/no-import-node-modules-by-path": "error",
|
345
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
346
352
|
...default4.flatConfigs.recommended.rules,
|
347
353
|
"import/no-dynamic-require": "warn",
|
348
354
|
"import/no-unresolved": "off",
|
@@ -354,14 +360,18 @@ function imports(options = { forbidDefaultExport: false }) {
|
|
354
360
|
{
|
355
361
|
name: "axios",
|
356
362
|
message: "Please use fetch instead"
|
357
|
-
}
|
363
|
+
},
|
364
|
+
...forbiddenUiLibraries.map((library) => ({
|
365
|
+
name: library,
|
366
|
+
message: `Please use ui.shadcn.com components instead.`
|
367
|
+
}))
|
358
368
|
]
|
359
369
|
}
|
360
370
|
]
|
361
371
|
}
|
362
372
|
}
|
363
373
|
];
|
364
|
-
if (
|
374
|
+
if (forbidDefaultExport) {
|
365
375
|
config.push(
|
366
376
|
{
|
367
377
|
rules: { "import/no-default-export": "error" }
|
@@ -374,7 +384,9 @@ function imports(options = { forbidDefaultExport: false }) {
|
|
374
384
|
"knip.*",
|
375
385
|
"next.config.*",
|
376
386
|
"commitlint.config.*",
|
377
|
-
".releaserc.*"
|
387
|
+
".releaserc.*",
|
388
|
+
"vitest.config.*",
|
389
|
+
"playwright.config.*"
|
378
390
|
],
|
379
391
|
rules: {
|
380
392
|
"import/no-default-export": "off"
|
@@ -467,6 +479,7 @@ function javascript() {
|
|
467
479
|
"no-func-assign": "error",
|
468
480
|
"no-global-assign": "error",
|
469
481
|
"no-implied-eval": "error",
|
482
|
+
"no-implicit-coercion": "error",
|
470
483
|
"no-import-assign": "error",
|
471
484
|
"no-invalid-regexp": "error",
|
472
485
|
"no-irregular-whitespace": "error",
|
@@ -665,36 +678,24 @@ import pluginReact from "eslint-plugin-react";
|
|
665
678
|
import pluginReactHooks from "eslint-plugin-react-hooks";
|
666
679
|
import { isPackageExists } from "local-pkg";
|
667
680
|
var nextJsPackages = ["next"];
|
668
|
-
var forbiddenLibraries = [
|
669
|
-
"@headlessui/react",
|
670
|
-
"@mui/material",
|
671
|
-
"@chakra-ui/react",
|
672
|
-
"@chakra-ui/core",
|
673
|
-
"@nextui-org/react",
|
674
|
-
"react-bootstrap",
|
675
|
-
"antd"
|
676
|
-
];
|
677
681
|
async function react() {
|
678
682
|
const isUsingNext = nextJsPackages.some((index) => isPackageExists(index));
|
679
|
-
const
|
683
|
+
const nextjsConfig = [];
|
680
684
|
if (isUsingNext) {
|
681
685
|
const nextPlugin = await import("@next/eslint-plugin-next").then(
|
682
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
683
686
|
(d) => d.default
|
684
687
|
);
|
685
|
-
|
688
|
+
nextjsConfig.push(
|
686
689
|
{
|
687
690
|
name: "solvro/next/setup",
|
688
691
|
plugins: {
|
689
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
690
692
|
"@next/next": nextPlugin
|
691
693
|
},
|
692
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
693
694
|
rules: nextPlugin.configs.recommended.rules
|
694
695
|
},
|
695
696
|
{
|
696
697
|
files: [
|
697
|
-
"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default}.{js,jsx,ts,tsx}",
|
698
|
+
"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default,robots,sitemap}.{js,jsx,ts,tsx}",
|
698
699
|
"**/pages/**/*.{js,jsx,ts,tsx}"
|
699
700
|
],
|
700
701
|
name: "solvro/next/pages",
|
@@ -709,11 +710,10 @@ async function react() {
|
|
709
710
|
name: "solvro/react/setup",
|
710
711
|
plugins: {
|
711
712
|
react: pluginReact,
|
712
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
713
713
|
"react-hooks": pluginReactHooks
|
714
714
|
}
|
715
715
|
},
|
716
|
-
...
|
716
|
+
...nextjsConfig,
|
717
717
|
{
|
718
718
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
719
719
|
languageOptions: {
|
@@ -752,16 +752,7 @@ async function react() {
|
|
752
752
|
allowDestructuredState: true
|
753
753
|
}
|
754
754
|
],
|
755
|
-
"react/no-array-index-key": "warn"
|
756
|
-
"@typescript-eslint/no-restricted-imports": [
|
757
|
-
"error",
|
758
|
-
{
|
759
|
-
paths: forbiddenLibraries.map((library) => ({
|
760
|
-
name: library,
|
761
|
-
message: `Please use ui.shadcn.com components instead.`
|
762
|
-
}))
|
763
|
-
}
|
764
|
-
]
|
755
|
+
"react/no-array-index-key": "warn"
|
765
756
|
}
|
766
757
|
},
|
767
758
|
...pluginQuery.configs["flat/recommended"],
|
@@ -798,6 +789,8 @@ function typescriptRelaxed() {
|
|
798
789
|
checksVoidReturn: false
|
799
790
|
}
|
800
791
|
],
|
792
|
+
"no-useless-constructor": "off",
|
793
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
801
794
|
"unused-imports/no-unused-vars": "off",
|
802
795
|
"@typescript-eslint/no-unused-vars": [
|
803
796
|
"error",
|
@@ -986,7 +979,11 @@ function unicorn() {
|
|
986
979
|
props: false,
|
987
980
|
prop: false,
|
988
981
|
ref: false
|
989
|
-
}
|
982
|
+
},
|
983
|
+
allowList: {
|
984
|
+
e2e: true
|
985
|
+
},
|
986
|
+
ignore: [String.raw`e2e`]
|
990
987
|
}
|
991
988
|
]
|
992
989
|
}
|
@@ -1026,7 +1023,35 @@ var adonisConfig = [
|
|
1026
1023
|
}
|
1027
1024
|
}
|
1028
1025
|
];
|
1029
|
-
var
|
1026
|
+
var nestjsConfig = [
|
1027
|
+
...node(),
|
1028
|
+
...unicorn(),
|
1029
|
+
...typescriptStrict(),
|
1030
|
+
...imports({ forbidDefaultExport: true }),
|
1031
|
+
{
|
1032
|
+
rules: {
|
1033
|
+
"no-implicit-coercion": [
|
1034
|
+
"error",
|
1035
|
+
{
|
1036
|
+
allow: ["+"]
|
1037
|
+
}
|
1038
|
+
],
|
1039
|
+
"unicorn/prefer-top-level-await": "off"
|
1040
|
+
}
|
1041
|
+
},
|
1042
|
+
{
|
1043
|
+
rules: {
|
1044
|
+
"@typescript-eslint/no-extraneous-class": [
|
1045
|
+
"error",
|
1046
|
+
{
|
1047
|
+
allowEmpty: true
|
1048
|
+
}
|
1049
|
+
]
|
1050
|
+
},
|
1051
|
+
files: ["**/*.module.ts"]
|
1052
|
+
}
|
1053
|
+
];
|
1054
|
+
var reactConfig = async () => [
|
1030
1055
|
...a11y(),
|
1031
1056
|
...unicorn(),
|
1032
1057
|
...typescriptStrict(),
|
@@ -1043,18 +1068,20 @@ var configs = [
|
|
1043
1068
|
var defaultOverrides = [...ignores(), ...formatters(), ...disables()];
|
1044
1069
|
var solvro = async (...overrides) => {
|
1045
1070
|
const isAdonis = await isPackageListed("@adonisjs/core");
|
1046
|
-
const
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
);
|
1071
|
+
const isReact = await isPackageListed("react");
|
1072
|
+
const isNestJs = await isPackageListed("@nestjs/core");
|
1073
|
+
if (isReact && isAdonis) {
|
1074
|
+
throw new Error("You can't use both Adonis and React in the same project");
|
1051
1075
|
}
|
1052
1076
|
const newConfig = [];
|
1053
1077
|
if (isAdonis) {
|
1054
1078
|
newConfig.push(...adonisConfig);
|
1055
1079
|
}
|
1056
|
-
if (
|
1057
|
-
newConfig.push(...
|
1080
|
+
if (isNestJs) {
|
1081
|
+
newConfig.push(...nestjsConfig);
|
1082
|
+
}
|
1083
|
+
if (isReact) {
|
1084
|
+
newConfig.push(...await reactConfig());
|
1058
1085
|
}
|
1059
1086
|
const tsConfigPath = findUpSync2("tsconfig.json", {
|
1060
1087
|
cwd: process.cwd()
|
@@ -1062,7 +1089,7 @@ var solvro = async (...overrides) => {
|
|
1062
1089
|
if (tsConfigPath == null) {
|
1063
1090
|
throw new Error("No tsconfig.json found");
|
1064
1091
|
}
|
1065
|
-
const rootDirectory =
|
1092
|
+
const rootDirectory = path3.dirname(tsConfigPath);
|
1066
1093
|
configs.push({
|
1067
1094
|
languageOptions: {
|
1068
1095
|
parserOptions: {
|
package/dist/eslint/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../node_modules/eslint-config-flat-gitignore/dist/index.mjs","../../node_modules/@eslint/compat/dist/esm/index.js","../../src/eslint/index.ts","../../src/eslint/configs/a11y.ts","../../src/eslint/plugins.ts","../../src/eslint/configs/comments.ts","../../src/eslint/configs/disables.ts","../../src/eslint/globs.ts","../../src/eslint/configs/formatters.ts","../../src/eslint/configs/ignores.ts","../../src/eslint/configs/imports.ts","../../src/eslint/configs/javascript.ts","../../src/eslint/configs/jsdoc.ts","../../src/eslint/configs/node.ts","../../src/eslint/configs/react.ts","../../src/eslint/configs/typescript-relaxed.ts","../../src/eslint/configs/typescript-strict.ts","../../src/eslint/configs/unicorn.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path, { join, resolve, relative, dirname } from 'node:path';\nimport process from 'node:process';\nimport { convertIgnorePatternToMinimatch } from '@eslint/compat';\nimport 'node:fs/promises';\nimport { fileURLToPath } from 'node:url';\n\nfunction toArray(array) {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nfunction findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\n\twhile (directory && directory !== stopAt && directory !== root) {\n\t\tconst filePath = path.isAbsolute(name) ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nconst GITIGNORE = \".gitignore\";\nconst GITMODULES = \".gitmodules\";\nfunction ignore(options = {}) {\n const ignores = [];\n const {\n cwd = process.cwd(),\n root = false,\n files: _files = root ? GITIGNORE : findUpSync(GITIGNORE, { cwd }) || [],\n filesGitModules: _filesGitModules = root ? fs.existsSync(join(cwd, GITMODULES)) ? GITMODULES : [] : findUpSync(GITMODULES, { cwd }) || [],\n strict = true\n } = options;\n const files = toArray(_files).map((file) => resolve(cwd, file));\n const filesGitModules = toArray(_filesGitModules).map((file) => resolve(cwd, file));\n for (const file of files) {\n let content = \"\";\n try {\n content = fs.readFileSync(file, \"utf8\");\n } catch (error) {\n if (strict)\n throw error;\n continue;\n }\n const relativePath = relative(cwd, dirname(file)).replaceAll(\"\\\\\", \"/\");\n const globs = content.split(/\\r?\\n/u).filter((line) => line && !line.startsWith(\"#\")).map((line) => convertIgnorePatternToMinimatch(line)).map((glob) => relativeMinimatch(glob, relativePath, cwd)).filter((glob) => glob !== null);\n ignores.push(...globs);\n }\n for (const file of filesGitModules) {\n let content = \"\";\n try {\n content = fs.readFileSync(file, \"utf8\");\n } catch (error) {\n if (strict)\n throw error;\n continue;\n }\n const dirs = parseGitSubmodules(content);\n ignores.push(...dirs.map((dir) => `${dir}/**`));\n }\n if (strict && files.length === 0)\n throw new Error(\"No .gitignore file found\");\n return {\n name: options.name || \"gitignore\",\n ignores\n };\n}\nfunction relativeMinimatch(pattern, relativePath, cwd) {\n if ([\"\", \".\", \"/\"].includes(relativePath))\n return pattern;\n const negated = pattern.startsWith(\"!\") ? \"!\" : \"\";\n let cleanPattern = negated ? pattern.slice(1) : pattern;\n if (!relativePath.endsWith(\"/\"))\n relativePath = `${relativePath}/`;\n const isParent = relativePath.startsWith(\"..\");\n if (!isParent)\n return `${negated}${relativePath}${cleanPattern}`;\n if (!relativePath.match(/^(\\.\\.\\/)+$/))\n throw new Error(\"The ignore file location should be either a parent or child directory\");\n if (cleanPattern.startsWith(\"**\"))\n return pattern;\n const parents = relative(resolve(cwd, relativePath), cwd).split(/[/\\\\]/);\n while (parents.length && cleanPattern.startsWith(`${parents[0]}/`)) {\n cleanPattern = cleanPattern.slice(parents[0].length + 1);\n parents.shift();\n }\n if (cleanPattern.startsWith(\"**\"))\n return `${negated}${cleanPattern}`;\n if (parents.length === 0)\n return `${negated}${cleanPattern}`;\n return null;\n}\nfunction parseGitSubmodules(content) {\n return content.split(/\\r?\\n/u).map((line) => line.match(/path\\s*=\\s*(.+)/u)).filter((match) => match !== null).map((match) => match[1].trim());\n}\n\nexport { ignore as default };\n","// @ts-self-types=\"./index.d.ts\"\nimport fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * @filedescription Functions to fix up rules to provide missing methods on the `context` object.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"eslint\").ESLint.Plugin} FixupPluginDefinition */\n/** @typedef {import(\"eslint\").Rule.RuleModule} FixupRuleDefinition */\n/** @typedef {FixupRuleDefinition[\"create\"]} FixupLegacyRuleDefinition */\n/** @typedef {import(\"eslint\").Linter.Config} FixupConfig */\n/** @typedef {Array<FixupConfig>} FixupConfigArray */\n\n//-----------------------------------------------------------------------------\n// Data\n//-----------------------------------------------------------------------------\n\n/**\n * The removed methods from the `context` object that need to be added back.\n * The keys are the name of the method on the `context` object and the values\n * are the name of the method on the `sourceCode` object.\n * @type {Map<string, string>}\n */\nconst removedMethodNames = new Map([\n\t[\"getSource\", \"getText\"],\n\t[\"getSourceLines\", \"getLines\"],\n\t[\"getAllComments\", \"getAllComments\"],\n\t[\"getDeclaredVariables\", \"getDeclaredVariables\"],\n\t[\"getNodeByRangeIndex\", \"getNodeByRangeIndex\"],\n\t[\"getCommentsBefore\", \"getCommentsBefore\"],\n\t[\"getCommentsAfter\", \"getCommentsAfter\"],\n\t[\"getCommentsInside\", \"getCommentsInside\"],\n\t[\"getJSDocComment\", \"getJSDocComment\"],\n\t[\"getFirstToken\", \"getFirstToken\"],\n\t[\"getFirstTokens\", \"getFirstTokens\"],\n\t[\"getLastToken\", \"getLastToken\"],\n\t[\"getLastTokens\", \"getLastTokens\"],\n\t[\"getTokenAfter\", \"getTokenAfter\"],\n\t[\"getTokenBefore\", \"getTokenBefore\"],\n\t[\"getTokenByRangeStart\", \"getTokenByRangeStart\"],\n\t[\"getTokens\", \"getTokens\"],\n\t[\"getTokensAfter\", \"getTokensAfter\"],\n\t[\"getTokensBefore\", \"getTokensBefore\"],\n\t[\"getTokensBetween\", \"getTokensBetween\"],\n]);\n\n/**\n * Tracks the original rule definition and the fixed-up rule definition.\n * @type {WeakMap<FixupRuleDefinition|FixupLegacyRuleDefinition,FixupRuleDefinition>}\n */\nconst fixedUpRuleReplacements = new WeakMap();\n\n/**\n * Tracks all of the fixed up rule definitions so we don't duplicate effort.\n * @type {WeakSet<FixupRuleDefinition>}\n */\nconst fixedUpRules = new WeakSet();\n\n/**\n * Tracks the original plugin definition and the fixed-up plugin definition.\n * @type {WeakMap<FixupPluginDefinition,FixupPluginDefinition>}\n */\nconst fixedUpPluginReplacements = new WeakMap();\n\n/**\n * Tracks all of the fixed up plugin definitions so we don't duplicate effort.\n * @type {WeakSet<FixupPluginDefinition>}\n */\nconst fixedUpPlugins = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Takes the given rule and creates a new rule with the `create()` method wrapped\n * to provide the missing methods on the `context` object.\n * @param {FixupRuleDefinition|FixupLegacyRuleDefinition} ruleDefinition The rule to fix up.\n * @returns {FixupRuleDefinition} The fixed-up rule.\n */\nfunction fixupRule(ruleDefinition) {\n\t// first check if we've already fixed up this rule\n\tif (fixedUpRuleReplacements.has(ruleDefinition)) {\n\t\treturn fixedUpRuleReplacements.get(ruleDefinition);\n\t}\n\n\tconst isLegacyRule = typeof ruleDefinition === \"function\";\n\n\t// check to see if this rule definition has already been fixed up\n\tif (!isLegacyRule && fixedUpRules.has(ruleDefinition)) {\n\t\treturn ruleDefinition;\n\t}\n\n\tconst originalCreate = isLegacyRule\n\t\t? ruleDefinition\n\t\t: ruleDefinition.create.bind(ruleDefinition);\n\n\tfunction ruleCreate(context) {\n\t\t// if getScope is already there then no need to create old methods\n\t\tif (\"getScope\" in context) {\n\t\t\treturn originalCreate(context);\n\t\t}\n\n\t\tconst sourceCode = context.sourceCode;\n\t\tlet currentNode = sourceCode.ast;\n\n\t\tconst newContext = Object.assign(Object.create(context), {\n\t\t\tparserServices: sourceCode.parserServices,\n\n\t\t\t/*\n\t\t\t * The following methods rely on the current node in the traversal,\n\t\t\t * so we need to add them manually.\n\t\t\t */\n\t\t\tgetScope() {\n\t\t\t\treturn sourceCode.getScope(currentNode);\n\t\t\t},\n\n\t\t\tgetAncestors() {\n\t\t\t\treturn sourceCode.getAncestors(currentNode);\n\t\t\t},\n\n\t\t\tmarkVariableAsUsed(variable) {\n\t\t\t\tsourceCode.markVariableAsUsed(variable, currentNode);\n\t\t\t},\n\t\t});\n\n\t\t// add passthrough methods\n\t\tfor (const [\n\t\t\tcontextMethodName,\n\t\t\tsourceCodeMethodName,\n\t\t] of removedMethodNames) {\n\t\t\tnewContext[contextMethodName] =\n\t\t\t\tsourceCode[sourceCodeMethodName].bind(sourceCode);\n\t\t}\n\n\t\t// freeze just like the original context\n\t\tObject.freeze(newContext);\n\n\t\t/*\n\t\t * Create the visitor object using the original create() method.\n\t\t * This is necessary to ensure that the visitor object is created\n\t\t * with the correct context.\n\t\t */\n\t\tconst visitor = originalCreate(newContext);\n\n\t\t/*\n\t\t * Wrap each method in the visitor object to update the currentNode\n\t\t * before calling the original method. This is necessary because the\n\t\t * methods like `getScope()` need to know the current node.\n\t\t */\n\t\tfor (const [methodName, method] of Object.entries(visitor)) {\n\t\t\t/*\n\t\t\t * Node is the second argument to most code path methods,\n\t\t\t * and the third argument for onCodePathSegmentLoop.\n\t\t\t */\n\t\t\tif (methodName.startsWith(\"on\")) {\n\t\t\t\t// eslint-disable-next-line no-loop-func -- intentionally updating shared `currentNode` variable\n\t\t\t\tvisitor[methodName] = (...args) => {\n\t\t\t\t\tcurrentNode =\n\t\t\t\t\t\targs[methodName === \"onCodePathSegmentLoop\" ? 2 : 1];\n\n\t\t\t\t\treturn method.call(visitor, ...args);\n\t\t\t\t};\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line no-loop-func -- intentionally updating shared `currentNode` variable\n\t\t\tvisitor[methodName] = (...args) => {\n\t\t\t\tcurrentNode = args[0];\n\n\t\t\t\treturn method.call(visitor, ...args);\n\t\t\t};\n\t\t}\n\n\t\treturn visitor;\n\t}\n\n\tconst newRuleDefinition = {\n\t\t...(isLegacyRule ? undefined : ruleDefinition),\n\t\tcreate: ruleCreate,\n\t};\n\n\t// copy `schema` property of function-style rule or top-level `schema` property of object-style rule into `meta` object\n\t// @ts-ignore -- top-level `schema` property was not offically supported for object-style rules so it doesn't exist in types\n\tconst { schema } = ruleDefinition;\n\tif (schema) {\n\t\tif (!newRuleDefinition.meta) {\n\t\t\tnewRuleDefinition.meta = { schema };\n\t\t} else {\n\t\t\tnewRuleDefinition.meta = {\n\t\t\t\t...newRuleDefinition.meta,\n\t\t\t\t// top-level `schema` had precedence over `meta.schema` so it's okay to overwrite `meta.schema` if it exists\n\t\t\t\tschema,\n\t\t\t};\n\t\t}\n\t}\n\n\t// cache the fixed up rule\n\tfixedUpRuleReplacements.set(ruleDefinition, newRuleDefinition);\n\tfixedUpRules.add(newRuleDefinition);\n\n\treturn newRuleDefinition;\n}\n\n/**\n * Takes the given plugin and creates a new plugin with all of the rules wrapped\n * to provide the missing methods on the `context` object.\n * @param {FixupPluginDefinition} plugin The plugin to fix up.\n * @returns {FixupPluginDefinition} The fixed-up plugin.\n */\nfunction fixupPluginRules(plugin) {\n\t// first check if we've already fixed up this plugin\n\tif (fixedUpPluginReplacements.has(plugin)) {\n\t\treturn fixedUpPluginReplacements.get(plugin);\n\t}\n\n\t/*\n\t * If the plugin has already been fixed up, or if the plugin\n\t * doesn't have any rules, we can just return it.\n\t */\n\tif (fixedUpPlugins.has(plugin) || !plugin.rules) {\n\t\treturn plugin;\n\t}\n\n\tconst newPlugin = {\n\t\t...plugin,\n\t\trules: Object.fromEntries(\n\t\t\tObject.entries(plugin.rules).map(([ruleId, ruleDefinition]) => [\n\t\t\t\truleId,\n\t\t\t\tfixupRule(ruleDefinition),\n\t\t\t]),\n\t\t),\n\t};\n\n\t// cache the fixed up plugin\n\tfixedUpPluginReplacements.set(plugin, newPlugin);\n\tfixedUpPlugins.add(newPlugin);\n\n\treturn newPlugin;\n}\n\n/**\n * Takes the given configuration and creates a new configuration with all of the\n * rules wrapped to provide the missing methods on the `context` object.\n * @param {FixupConfigArray|FixupConfig} config The configuration to fix up.\n * @returns {FixupConfigArray} The fixed-up configuration.\n */\nfunction fixupConfigRules(config) {\n\tconst configs = Array.isArray(config) ? config : [config];\n\n\treturn configs.map(configItem => {\n\t\tif (!configItem.plugins) {\n\t\t\treturn configItem;\n\t\t}\n\n\t\tconst newPlugins = Object.fromEntries(\n\t\t\tObject.entries(configItem.plugins).map(([pluginName, plugin]) => [\n\t\t\t\tpluginName,\n\t\t\t\tfixupPluginRules(plugin),\n\t\t\t]),\n\t\t);\n\n\t\treturn {\n\t\t\t...configItem,\n\t\t\tplugins: newPlugins,\n\t\t};\n\t});\n}\n\n/**\n * @fileoverview Ignore file utilities for the compat package.\n * @author Nicholas C. Zakas\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"eslint\").Linter.Config} FlatConfig */\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Converts an ESLint ignore pattern to a minimatch pattern.\n * @param {string} pattern The .eslintignore or .gitignore pattern to convert.\n * @returns {string} The converted pattern.\n */\nfunction convertIgnorePatternToMinimatch(pattern) {\n\tconst isNegated = pattern.startsWith(\"!\");\n\tconst negatedPrefix = isNegated ? \"!\" : \"\";\n\tconst patternToTest = (isNegated ? pattern.slice(1) : pattern).trimEnd();\n\n\t// special cases\n\tif ([\"\", \"**\", \"/**\", \"**/\"].includes(patternToTest)) {\n\t\treturn `${negatedPrefix}${patternToTest}`;\n\t}\n\n\tconst firstIndexOfSlash = patternToTest.indexOf(\"/\");\n\n\tconst matchEverywherePrefix =\n\t\tfirstIndexOfSlash < 0 || firstIndexOfSlash === patternToTest.length - 1\n\t\t\t? \"**/\"\n\t\t\t: \"\";\n\n\tconst patternWithoutLeadingSlash =\n\t\tfirstIndexOfSlash === 0 ? patternToTest.slice(1) : patternToTest;\n\n\t/*\n\t * Escape `{` and `(` because in gitignore patterns they are just\n\t * literal characters without any specific syntactic meaning,\n\t * while in minimatch patterns they can form brace expansion or extglob syntax.\n\t *\n\t * For example, gitignore pattern `src/{a,b}.js` ignores file `src/{a,b}.js`.\n\t * But, the same minimatch pattern `src/{a,b}.js` ignores files `src/a.js` and `src/b.js`.\n\t * Minimatch pattern `src/\\{a,b}.js` is equivalent to gitignore pattern `src/{a,b}.js`.\n\t */\n\tconst escapedPatternWithoutLeadingSlash =\n\t\tpatternWithoutLeadingSlash.replaceAll(\n\t\t\t/(?=((?:\\\\.|[^{(])*))\\1([{(])/guy,\n\t\t\t\"$1\\\\$2\",\n\t\t);\n\n\tconst matchInsideSuffix = patternToTest.endsWith(\"/**\") ? \"/*\" : \"\";\n\n\treturn `${negatedPrefix}${matchEverywherePrefix}${escapedPatternWithoutLeadingSlash}${matchInsideSuffix}`;\n}\n\n/**\n * Reads an ignore file and returns an object with the ignore patterns.\n * @param {string} ignoreFilePath The absolute path to the ignore file.\n * @returns {FlatConfig} An object with an `ignores` property that is an array of ignore patterns.\n * @throws {Error} If the ignore file path is not an absolute path.\n */\nfunction includeIgnoreFile(ignoreFilePath) {\n\tif (!path.isAbsolute(ignoreFilePath)) {\n\t\tthrow new Error(\"The ignore file location must be an absolute path.\");\n\t}\n\n\tconst ignoreFile = fs.readFileSync(ignoreFilePath, \"utf8\");\n\tconst lines = ignoreFile.split(/\\r?\\n/u);\n\n\treturn {\n\t\tname: \"Imported .gitignore patterns\",\n\t\tignores: lines\n\t\t\t.map(line => line.trim())\n\t\t\t.filter(line => line && !line.startsWith(\"#\"))\n\t\t\t.map(convertIgnorePatternToMinimatch),\n\t};\n}\n\nexport { convertIgnorePatternToMinimatch, fixupConfigRules, fixupPluginRules, fixupRule, includeIgnoreFile };\n","import gitignore from \"eslint-config-flat-gitignore\";\nimport { findUpSync } from \"find-up-simple\";\nimport { isPackageListed } from \"local-pkg\";\nimport path from \"node:path\";\nimport tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { configApp } from \"@adonisjs/eslint-config\";\n\nimport { a11y } from \"./configs/a11y\";\nimport { comments } from \"./configs/comments\";\nimport { disables } from \"./configs/disables\";\nimport { formatters } from \"./configs/formatters\";\nimport { ignores } from \"./configs/ignores\";\nimport { imports } from \"./configs/imports\";\nimport { javascript } from \"./configs/javascript\";\nimport { jsdoc } from \"./configs/jsdoc\";\nimport { node } from \"./configs/node\";\nimport { react } from \"./configs/react\";\nimport { typescriptRelaxed } from \"./configs/typescript-relaxed\";\nimport { typescriptStrict } from \"./configs/typescript-strict\";\nimport { unicorn } from \"./configs/unicorn\";\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call\nconst builtinAdonisConfig: ConfigWithExtends[] = configApp();\n\nconst adonisConfig: ConfigWithExtends[] = [\n ...builtinAdonisConfig,\n ...node(),\n ...imports(),\n {\n rules: {\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\"enum\", \"enumMember\", \"class\", \"interface\", \"typeLike\"],\n format: [\"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: [\"classProperty\", \"classMethod\", \"method\", \"variableLike\"],\n format: [\"camelCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: \"variable\",\n format: [\"camelCase\", \"UPPER_CASE\", \"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n ],\n },\n },\n];\n\nconst nextjsConfig = async (): Promise<ConfigWithExtends[]> => [\n ...a11y(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n ...(await react()),\n];\n\nconst configs: ConfigWithExtends[] = [\n gitignore(),\n ...javascript(),\n ...jsdoc(),\n ...comments(),\n ...typescriptRelaxed(),\n];\n\nconst defaultOverrides = [...ignores(), ...formatters(), ...disables()];\n\nexport const solvro = async (...overrides: ConfigWithExtends[]) => {\n const isAdonis = await isPackageListed(\"@adonisjs/core\");\n const isNext = await isPackageListed(\"next\");\n\n if (isNext && isAdonis) {\n throw new Error(\n \"You can't use both Adonis and Next.js in the same project\",\n );\n }\n\n const newConfig: ConfigWithExtends[] = [];\n\n if (isAdonis) {\n newConfig.push(...adonisConfig);\n }\n\n if (isNext) {\n newConfig.push(...(await nextjsConfig()));\n }\n\n const tsConfigPath = findUpSync(\"tsconfig.json\", {\n cwd: process.cwd(),\n });\n\n if (tsConfigPath == null) {\n throw new Error(\"No tsconfig.json found\");\n }\n\n const rootDirectory = path.dirname(tsConfigPath);\n\n configs.push({\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: rootDirectory,\n },\n },\n });\n\n return tseslint.config(\n ...configs,\n ...newConfig,\n ...defaultOverrides,\n ...overrides,\n );\n};\n","import jsxA11y from \"eslint-plugin-jsx-a11y\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function a11y(): ConfigWithExtends[] {\n return [\n {\n files: [\"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}\"],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ...jsxA11y.flatConfigs.recommended,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n languageOptions: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ...jsxA11y.flatConfigs.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n settings: {\n \"jsx-a11y\": {\n components: {\n Input: \"input\",\n Button: \"button\",\n Link: \"a\",\n Label: \"label\",\n Select: \"select\",\n Textarea: \"textarea\",\n },\n attributes: {\n for: [\"htmlFor\", \"for\"],\n },\n },\n },\n },\n ];\n}\n","//@ts-expect-error not working\nexport { default as pluginComments } from \"@eslint-community/eslint-plugin-eslint-comments\";\nexport { default as pluginAntfu } from \"eslint-plugin-antfu\";\n//@ts-expect-error not working too\nexport { default as pluginImport } from \"eslint-plugin-import\";\nexport { default as pluginNode } from \"eslint-plugin-n\";\nexport { default as pluginUnicorn } from \"eslint-plugin-unicorn\";\nexport { default as pluginUnusedImports } from \"eslint-plugin-unused-imports\";\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginComments } from \"../plugins\";\n\nexport function comments(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/eslint-comments/rules\",\n plugins: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \"eslint-comments\": pluginComments,\n },\n rules: {\n \"eslint-comments/no-aggregating-enable\": \"error\",\n \"eslint-comments/no-duplicate-disable\": \"error\",\n \"eslint-comments/no-unlimited-disable\": \"error\",\n \"eslint-comments/no-unused-enable\": \"error\",\n },\n },\n ];\n}\n","import tseslint, { type ConfigWithExtends } from \"typescript-eslint\";\n\nimport { GLOB_SRC, GLOB_SRC_EXT } from \"../globs\";\n\nexport function disables(): ConfigWithExtends[] {\n return [\n {\n files: [`**/scripts/${GLOB_SRC}`],\n name: \"solvro/disables/scripts\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n },\n {\n rules: {\n \"prettier/prettier\": \"off\",\n },\n },\n {\n files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/cli\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n },\n },\n {\n files: [\"**/bin/**/*\", `**/bin.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/bin\",\n rules: {\n \"antfu/no-import-dist\": \"off\",\n \"antfu/no-import-node-modules-by-path\": \"off\",\n },\n },\n {\n files: [\"**/*.d.?([cm])ts\"],\n name: \"solvro/disables/dts\",\n rules: {\n \"eslint-comments/no-unlimited-disable\": \"off\",\n \"import-x/no-duplicates\": \"off\",\n \"no-restricted-syntax\": \"off\",\n \"unused-imports/no-unused-vars\": \"off\",\n },\n },\n {\n files: [\"**/*.js\", \"**/*.cjs\"],\n name: \"solvro/disables/cjs\",\n rules: {\n \"@typescript-eslint/no-require-imports\": \"off\",\n },\n },\n {\n files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/config-files\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n },\n {\n files: [\"**/*.js\"],\n extends: [tseslint.configs.disableTypeChecked],\n },\n ];\n}\n","export const GLOB_SRC_EXT = \"?([cm])[jt]s?(x)\";\nexport const GLOB_SRC = \"**/*.?([cm])[jt]s?(x)\";\n\nexport const GLOB_JS = \"**/*.?([cm])js\";\nexport const GLOB_JSX = \"**/*.?([cm])jsx\";\n\nexport const GLOB_TS = \"**/*.?([cm])ts\";\nexport const GLOB_TSX = \"**/*.?([cm])tsx\";\n\nexport const GLOB_EXCLUDE = [\n \"**/node_modules\",\n \"**/dist\",\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lockb\",\n \"**/build\",\n \"**/output\",\n \"**/coverage\",\n \"**/temp\",\n \"**/.temp\",\n \"**/tmp\",\n \"**/.tmp\",\n \"**/.history\",\n \"**/.vitepress/cache\",\n \"**/.nuxt\",\n \"**/.next\",\n \"**/.svelte-kit\",\n \"**/.vercel\",\n \"**/.changeset\",\n \"**/.idea\",\n \"**/.cache\",\n \"**/.output\",\n \"**/.vite-inspect\",\n \"**/.yarn\",\n \"**/vite.config.*.timestamp-*\",\n\n \"**/CHANGELOG*.md\",\n \"**/*.min.*\",\n \"**/LICENSE*\",\n \"**/__snapshots__\",\n \"**/auto-import?(s).d.ts\",\n \"**/components.d.ts\",\n];\n","import prettierConfig from \"eslint-config-prettier\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function formatters(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/prettier\",\n rules: {\n ...prettierConfig.rules,\n curly: \"error\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { GLOB_EXCLUDE } from \"../globs\";\n\nexport function ignores(): ConfigWithExtends[] {\n return [\n {\n ignores: [...GLOB_EXCLUDE],\n name: \"solvro/ignores\",\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu, pluginImport } from \"../plugins\";\n\nexport function imports(\n options: { forbidDefaultExport: boolean } = { forbidDefaultExport: false },\n): ConfigWithExtends[] {\n const config = [\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n pluginImport.flatConfigs.typescript,\n {\n name: \"solvro/imports/rules\",\n plugins: {\n antfu: pluginAntfu,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n import: pluginImport,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n rules: {\n \"antfu/import-dedupe\": \"error\",\n \"antfu/no-import-dist\": \"error\",\n \"antfu/no-import-node-modules-by-path\": \"error\",\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n ...pluginImport.flatConfigs.recommended.rules,\n \"import/no-dynamic-require\": \"warn\",\n \"import/no-unresolved\": \"off\",\n \"import/consistent-type-specifier-style\": \"warn\",\n \"@typescript-eslint/no-restricted-imports\": [\n \"error\",\n {\n paths: [\n {\n name: \"axios\",\n message: \"Please use fetch instead\",\n },\n ],\n },\n ],\n },\n },\n ];\n\n if (options.forbidDefaultExport) {\n config.push(\n {\n rules: { \"import/no-default-export\": \"error\" },\n },\n {\n files: [\n \"tsup.config.*\",\n \"eslint.config.*\",\n \".commitlintrc.*\",\n \"knip.*\",\n \"next.config.*\",\n \"commitlint.config.*\",\n \".releaserc.*\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return config;\n}\n","import eslint from \"@eslint/js\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu, pluginUnusedImports } from \"../plugins\";\n\nexport function javascript(): ConfigWithExtends[] {\n return [\n {\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: \"readonly\",\n navigator: \"readonly\",\n window: \"readonly\",\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: \"module\",\n },\n sourceType: \"module\",\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n name: \"solvro/javascript/setup\",\n },\n {\n name: \"solvro/javascript/rules\",\n plugins: {\n antfu: pluginAntfu,\n \"unused-imports\": pluginUnusedImports,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n \"accessor-pairs\": [\n \"error\",\n { enforceForClassMembers: true, setWithoutGet: true },\n ],\n curly: \"error\",\n \"array-callback-return\": \"error\",\n \"block-scoped-var\": \"error\",\n \"constructor-super\": \"error\",\n \"default-case-last\": \"error\",\n \"dot-notation\": [\"error\", { allowKeywords: true }],\n eqeqeq: [\"error\", \"smart\"],\n \"new-cap\": [\n \"error\",\n { capIsNew: false, newIsCap: true, properties: true },\n ],\n \"no-alert\": \"error\",\n \"no-array-constructor\": \"error\",\n \"no-async-promise-executor\": \"error\",\n \"no-caller\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-class-assign\": \"error\",\n \"no-compare-neg-zero\": \"error\",\n \"no-cond-assign\": [\"error\", \"always\"],\n \"no-console\": [\"error\", { allow: [\"warn\", \"error\"] }],\n \"no-const-assign\": \"error\",\n \"no-control-regex\": \"error\",\n \"no-debugger\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-dupe-args\": \"error\",\n \"no-dupe-class-members\": \"error\",\n \"no-dupe-keys\": \"error\",\n \"no-duplicate-case\": \"error\",\n \"no-empty\": [\"error\", { allowEmptyCatch: true }],\n \"no-empty-character-class\": \"error\",\n \"no-empty-pattern\": \"error\",\n \"no-eval\": \"error\",\n \"no-ex-assign\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-extra-boolean-cast\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-func-assign\": \"error\",\n \"no-global-assign\": \"error\",\n \"no-implied-eval\": \"error\",\n \"no-import-assign\": \"error\",\n \"no-invalid-regexp\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-iterator\": \"error\",\n \"no-labels\": [\"error\", { allowLoop: false, allowSwitch: false }],\n \"no-lone-blocks\": \"error\",\n \"no-loss-of-precision\": \"error\",\n \"no-misleading-character-class\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-new\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-native-nonconstructor\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-obj-calls\": \"error\",\n \"no-octal\": \"error\",\n \"no-octal-escape\": \"error\",\n \"no-proto\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"no-regex-spaces\": \"error\",\n \"no-restricted-globals\": [\n \"error\",\n { message: \"Use `globalThis` instead.\", name: \"global\" },\n { message: \"Use `globalThis` instead.\", name: \"self\" },\n ],\n \"no-restricted-properties\": [\n \"error\",\n {\n message:\n \"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.\",\n property: \"__proto__\",\n },\n {\n message: \"Use `Object.defineProperty` instead.\",\n property: \"__defineGetter__\",\n },\n {\n message: \"Use `Object.defineProperty` instead.\",\n property: \"__defineSetter__\",\n },\n {\n message: \"Use `Object.getOwnPropertyDescriptor` instead.\",\n property: \"__lookupGetter__\",\n },\n {\n message: \"Use `Object.getOwnPropertyDescriptor` instead.\",\n property: \"__lookupSetter__\",\n },\n ],\n \"no-restricted-syntax\": [\n \"error\",\n \"TSEnumDeclaration[const=true]\",\n \"TSExportAssignment\",\n ],\n \"no-self-assign\": [\"error\", { props: true }],\n \"no-self-compare\": \"error\",\n \"no-sequences\": \"error\",\n \"no-shadow-restricted-names\": \"error\",\n \"no-sparse-arrays\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-this-before-super\": \"error\",\n \"no-throw-literal\": \"error\",\n \"no-undef-init\": \"error\",\n \"no-unexpected-multiline\": \"error\",\n \"no-unmodified-loop-condition\": \"error\",\n \"no-unneeded-ternary\": [\"error\", { defaultAssignment: false }],\n \"no-unreachable\": \"error\",\n \"no-unreachable-loop\": \"error\",\n \"no-unsafe-finally\": \"error\",\n \"no-unsafe-negation\": \"error\",\n \"no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n\n \"no-useless-backreference\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-catch\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-constructor\": \"error\",\n \"no-useless-rename\": \"error\",\n \"no-useless-return\": \"error\",\n \"no-var\": \"error\",\n \"no-with\": \"error\",\n \"object-shorthand\": [\n \"error\",\n \"always\",\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n \"one-var\": [\"error\", { initialized: \"never\" }],\n \"prefer-arrow-callback\": [\n \"error\",\n {\n allowNamedFunctions: false,\n allowUnboundThis: true,\n },\n ],\n \"prefer-const\": [\n \"error\",\n {\n destructuring: \"all\",\n ignoreReadBeforeAssign: true,\n },\n ],\n \"prefer-exponentiation-operator\": \"error\",\n \"prefer-promise-reject-errors\": \"error\",\n \"prefer-regex-literals\": [\"error\", { disallowRedundantWrapping: true }],\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n \"prefer-template\": \"error\",\n \"symbol-description\": \"error\",\n \"unicode-bom\": [\"error\", \"never\"],\n \"unused-imports/no-unused-imports\": \"error\",\n \"unused-imports/no-unused-vars\": [\n \"error\",\n {\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"use-isnan\": [\n \"error\",\n { enforceForIndexOf: true, enforceForSwitchCase: true },\n ],\n \"valid-typeof\": [\"error\", { requireStringLiterals: true }],\n \"vars-on-top\": \"error\",\n yoda: [\"error\", \"never\"],\n },\n },\n ];\n}\n","import jsdocPlugin from \"eslint-plugin-jsdoc\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function jsdoc(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/jsdoc/rules\",\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-param-names\": \"warn\",\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": \"warn\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginNode } from \"../plugins\";\n\nexport function node(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/node/rules\",\n plugins: {\n node: pluginNode,\n },\n rules: {\n \"node/handle-callback-err\": [\"error\", \"^(err|error)$\"],\n \"node/no-deprecated-api\": \"error\",\n \"node/no-exports-assign\": \"error\",\n \"node/no-new-require\": \"error\",\n \"node/no-path-concat\": \"error\",\n \"node/prefer-global/buffer\": [\"error\"],\n \"node/prefer-global/process\": [\"error\"],\n \"node/process-exit-as-throw\": \"error\",\n },\n },\n ];\n}\n","import pluginQuery from \"@tanstack/eslint-plugin-query\";\nimport pluginReact from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport { isPackageExists } from \"local-pkg\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nconst nextJsPackages = [\"next\"];\n\nconst forbiddenLibraries = [\n \"@headlessui/react\",\n \"@mui/material\",\n \"@chakra-ui/react\",\n \"@chakra-ui/core\",\n \"@nextui-org/react\",\n \"react-bootstrap\",\n \"antd\",\n];\n\nexport async function react(): Promise<ConfigWithExtends[]> {\n const isUsingNext = nextJsPackages.some((index) => isPackageExists(index));\n\n const nextjsConfig: ConfigWithExtends[] = [];\n\n if (isUsingNext) {\n // @ts-expect-error ???\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const nextPlugin = await import(\"@next/eslint-plugin-next\").then(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n (d) => d.default,\n );\n\n nextjsConfig.push(\n {\n name: \"solvro/next/setup\",\n plugins: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \"@next/next\": nextPlugin,\n },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n rules: nextPlugin.configs.recommended.rules,\n },\n {\n files: [\n \"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default}.{js,jsx,ts,tsx}\",\n \"**/pages/**/*.{js,jsx,ts,tsx}\",\n ],\n name: \"solvro/next/pages\",\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return [\n {\n name: \"solvro/react/setup\",\n plugins: {\n react: pluginReact,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \"react-hooks\": pluginReactHooks,\n },\n },\n ...nextjsConfig,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n sourceType: \"module\",\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n name: \"solvro/react/rules\",\n rules: {\n ...pluginReact.configs.flat.recommended.rules,\n ...pluginReact.configs.flat[\"jsx-runtime\"].rules,\n \"react/no-danger\": \"warn\",\n \"react/jsx-no-leaked-render\": \"warn\",\n // recommended rules react-hooks\n \"react-hooks/exhaustive-deps\": \"warn\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n unnamedComponents: \"arrow-function\",\n namedComponents: \"function-declaration\",\n },\n ],\n \"react/hook-use-state\": [\n \"error\",\n {\n allowDestructuredState: true,\n },\n ],\n \"react/no-array-index-key\": \"warn\",\n \"@typescript-eslint/no-restricted-imports\": [\n \"error\",\n {\n paths: forbiddenLibraries.map((library) => ({\n name: library,\n message: `Please use ui.shadcn.com components instead.`,\n })),\n },\n ],\n },\n },\n ...pluginQuery.configs[\"flat/recommended\"],\n {\n name: \"solvro/react/disables\",\n files: [\"**/components/ui/*.{jsx,tsx}\"],\n rules: {\n \"react/prop-types\": \"off\",\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n \"unicorn/no-document-cookie\": \"off\",\n \"@typescript-eslint/no-redeclare\": \"off\",\n \"@typescript-eslint/no-deprecated\": \"off\",\n },\n },\n ];\n}\n","import tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function typescriptRelaxed(): ConfigWithExtends[] {\n return [\n ...tseslint.configs.recommendedTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n {\n name: \"solvro/typescript-relaxed/rules\",\n rules: {\n \"@typescript-eslint/no-unsafe-return\": \"off\",\n \"@typescript-eslint/require-await\": \"off\",\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksVoidReturn: false,\n },\n ],\n \"unused-imports/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n },\n ],\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/no-unnecessary-condition\": \"warn\",\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n \"@typescript-eslint/no-unnecessary-template-expression\": \"error\",\n \"@typescript-eslint/strict-boolean-expressions\": [\n \"error\",\n {\n allowNullableObject: false,\n },\n ],\n },\n },\n ];\n}\n","import tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu } from \"../plugins\";\n\nexport function typescriptStrict(): ConfigWithExtends[] {\n return [\n ...tseslint.configs.strictTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n {\n name: \"solvro/typescript-strict/setup\",\n plugins: {\n antfu: pluginAntfu,\n },\n },\n {\n files: [\"**/*.{ts,tsx}\"],\n name: \"solvro/typescript-strict/rules\",\n rules: {\n \"@typescript-eslint/ban-ts-comment\": [\n \"error\",\n { \"ts-expect-error\": \"allow-with-description\" },\n ],\n \"@typescript-eslint/consistent-type-definitions\": [\n \"error\",\n \"interface\",\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeAnnotations: false,\n prefer: \"type-imports\",\n },\n ],\n \"@typescript-eslint/method-signature-style\": [\"error\", \"property\"], // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful\n \"@typescript-eslint/no-dupe-class-members\": \"error\",\n \"@typescript-eslint/no-empty-object-type\": [\n \"error\",\n { allowInterfaces: \"always\" },\n ],\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n \"@typescript-eslint/no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n \"@typescript-eslint/no-use-before-define\": [\n \"error\",\n { classes: false, functions: false, variables: true },\n ],\n \"@typescript-eslint/no-wrapper-object-types\": \"error\",\n // prevent unnecessary use of void operator\n \"@typescript-eslint/no-meaningless-void-operator\": \"error\",\n // \"using non-null assertions cancels the benefits of the strict\n // null-checking mode.\"\n // warn when one of the types in union / intersection overrides others\n \"@typescript-eslint/no-redundant-type-constituents\": \"warn\",\n // prevent variables shadowing\n \"no-shadow\": \"error\",\n \"@typescript-eslint/no-shadow\": \"error\",\n // prevent assignment of this, signals a wrong usage of it\n \"@typescript-eslint/no-this-alias\": \"error\",\n // prevent throwing non-error\n \"no-throw-literal\": \"off\",\n\n // prevent unnecessary explicitly adding a default type argument\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n // prevent unnecessary assertions that won't change the outcome\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n // prevent extending default types\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n // force typing out function arguments\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n // prevent usage of any via reassigning\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n // prevent usage of any via calling it\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n // prevent usage of any via using it's members\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n // prevent reverting any from functions\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n // prevent unused expressions\n \"no-unused-expressions\": \"off\",\n // var<'string'> = 'string' -> var = 'string' as const\n \"@typescript-eslint/prefer-as-const\": \"error\",\n // force initializing enums\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n // prefer for x of obj to for let i = 0...\n \"@typescript-eslint/prefer-for-of\": \"error\",\n // prefer includes() to indexOf()\n \"@typescript-eslint/prefer-includes\": \"error\",\n // use literals for enum initialization\n \"@typescript-eslint/prefer-literal-enum-member\": \"error\",\n // prefer safe cascade of a value when dealing with undefined or null\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n // prefer optional chaining (a?.b)\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n // prefer using type parameter for Array.reduce\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n // prefer RegExp#exec when no /g flag in regex\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n // enforce `this` as a type when stating type for a method\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n // enforce startsWith to indexOf === 0\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // prevents default behavior of .sort() - which is confusing\n \"@typescript-eslint/require-array-sort-compare\": \"error\",\n // no async functions without awaits in body\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": \"error\",\n // prevent number + string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n // only allow string in templates\n \"@typescript-eslint/restrict-template-expressions\": \"error\",\n // prevent returning await\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": \"error\",\n // only booleans in ifs and whiles\n \"@typescript-eslint/strict-boolean-expressions\": \"error\",\n // check if all paths are followed in code\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n \"dot-notation\": \"off\",\n \"no-implied-eval\": \"off\",\n \"@typescript-eslint/await-thenable\": \"error\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-for-in-array\": \"error\",\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"@typescript-eslint/no-misused-promises\": \"error\",\n \"@typescript-eslint/promise-function-async\": \"error\",\n \"@typescript-eslint/unbound-method\": \"error\",\n \"no-restricted-imports\": \"off\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginUnicorn } from \"../plugins\";\n\nexport function unicorn(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/unicorn/rules\",\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs[\"flat/recommended\"].rules,\n \"unicorn/no-array-reduce\": \"off\",\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-useless-switch-case\": \"off\",\n \"unicorn/prefer-global-this\": \"off\",\n \"unicorn/prevent-abbreviations\": [\n \"error\",\n {\n replacements: {\n env: false,\n envs: false,\n props: false,\n prop: false,\n ref: false,\n },\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";AAAA,OAAO,QAAQ;AACf,OAAO,QAAQ,MAAM,SAAS,UAAU,eAAe;AACvD,OAAOA,cAAa;;;ACuSpB,SAAS,gCAAgC,SAAS;AACjD,QAAM,YAAY,QAAQ,WAAW,GAAG;AACxC,QAAM,gBAAgB,YAAY,MAAM;A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/D,IAAM,SAAS,UAAU,cAAmC;AACjE,QAAM,WAAW,MAAM,gBAAgB,gBAAgB;AACvD,QAAM,SAAS,MAAM,gBAAgB,MAAM;AAE3C,MAAI,UAAU,UAAU;AACtB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,QAAM,YAAiC,CAAC;AAExC,MAAI,UAAU;AACZ,cAAU,KAAK,GAAG,YAAY;AAAA,EAChC;AAEA,MAAI,QAAQ;AACV,cAAU,KAAK,GAAI,MAAM,aAAa,CAAE;AAAA,EAC1C;AAEA,QAAM,eAAeC,YAAW,iBAAiB;AAAA,IAC/C,KAAK,QAAQ,IAAI;AAAA,EACnB,CAAC;AAED,MAAI,gBAAgB,MAAM;AACxB,UAAM,IAAI,MAAM,wBAAwB;AAAA,EAC1C;AAEA,QAAM,gBAAgBC,MAAK,QAAQ,YAAY;AAE/C,UAAQ,KAAK;AAAA,IACX,iBAAiB;AAAA,MACf,eAAe;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAOC,UAAS;AAAA,IACd,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;","names":["process","process","ignores","findUpSync","path","tseslint","default","default","default","globals","globals","default","default","nextjsConfig","tseslint","tseslint","tseslint","default","default","findUpSync","path","tseslint"]}
|
1
|
+
{"version":3,"sources":["../../node_modules/eslint-config-flat-gitignore/dist/index.mjs","../../node_modules/@eslint/compat/dist/esm/index.js","../../src/eslint/index.ts","../../src/eslint/configs/a11y.ts","../../src/eslint/plugins.ts","../../src/eslint/configs/comments.ts","../../src/eslint/configs/disables.ts","../../src/eslint/globs.ts","../../src/eslint/configs/formatters.ts","../../src/eslint/configs/ignores.ts","../../src/eslint/configs/imports.ts","../../src/eslint/configs/javascript.ts","../../src/eslint/configs/jsdoc.ts","../../src/eslint/configs/node.ts","../../src/eslint/configs/react.ts","../../src/eslint/configs/typescript-relaxed.ts","../../src/eslint/configs/typescript-strict.ts","../../src/eslint/configs/unicorn.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path, { join, resolve, relative, dirname } from 'node:path';\nimport process from 'node:process';\nimport { convertIgnorePatternToMinimatch } from '@eslint/compat';\nimport 'node:fs/promises';\nimport { fileURLToPath } from 'node:url';\n\nfunction toArray(array) {\n array = array ?? [];\n return Array.isArray(array) ? array : [array];\n}\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nfunction findUpSync(name, {\n\tcwd = process.cwd(),\n\ttype = 'file',\n\tstopAt,\n} = {}) {\n\tlet directory = path.resolve(toPath(cwd) ?? '');\n\tconst {root} = path.parse(directory);\n\tstopAt = path.resolve(directory, toPath(stopAt) ?? root);\n\n\twhile (directory && directory !== stopAt && directory !== root) {\n\t\tconst filePath = path.isAbsolute(name) ? name : path.join(directory, name);\n\n\t\ttry {\n\t\t\tconst stats = fs.statSync(filePath, {throwIfNoEntry: false});\n\t\t\tif ((type === 'file' && stats?.isFile()) || (type === 'directory' && stats?.isDirectory())) {\n\t\t\t\treturn filePath;\n\t\t\t}\n\t\t} catch {}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n}\n\nconst GITIGNORE = \".gitignore\";\nconst GITMODULES = \".gitmodules\";\nfunction ignore(options = {}) {\n const ignores = [];\n const {\n cwd = process.cwd(),\n root = false,\n files: _files = root ? GITIGNORE : findUpSync(GITIGNORE, { cwd }) || [],\n filesGitModules: _filesGitModules = root ? fs.existsSync(join(cwd, GITMODULES)) ? GITMODULES : [] : findUpSync(GITMODULES, { cwd }) || [],\n strict = true\n } = options;\n const files = toArray(_files).map((file) => resolve(cwd, file));\n const filesGitModules = toArray(_filesGitModules).map((file) => resolve(cwd, file));\n for (const file of files) {\n let content = \"\";\n try {\n content = fs.readFileSync(file, \"utf8\");\n } catch (error) {\n if (strict)\n throw error;\n continue;\n }\n const relativePath = relative(cwd, dirname(file)).replaceAll(\"\\\\\", \"/\");\n const globs = content.split(/\\r?\\n/u).filter((line) => line && !line.startsWith(\"#\")).map((line) => convertIgnorePatternToMinimatch(line)).map((glob) => relativeMinimatch(glob, relativePath, cwd)).filter((glob) => glob !== null);\n ignores.push(...globs);\n }\n for (const file of filesGitModules) {\n let content = \"\";\n try {\n content = fs.readFileSync(file, \"utf8\");\n } catch (error) {\n if (strict)\n throw error;\n continue;\n }\n const dirs = parseGitSubmodules(content);\n ignores.push(...dirs.map((dir) => `${dir}/**`));\n }\n if (strict && files.length === 0)\n throw new Error(\"No .gitignore file found\");\n return {\n name: options.name || \"gitignore\",\n ignores\n };\n}\nfunction relativeMinimatch(pattern, relativePath, cwd) {\n if ([\"\", \".\", \"/\"].includes(relativePath))\n return pattern;\n const negated = pattern.startsWith(\"!\") ? \"!\" : \"\";\n let cleanPattern = negated ? pattern.slice(1) : pattern;\n if (!relativePath.endsWith(\"/\"))\n relativePath = `${relativePath}/`;\n const isParent = relativePath.startsWith(\"..\");\n if (!isParent)\n return `${negated}${relativePath}${cleanPattern}`;\n if (!relativePath.match(/^(\\.\\.\\/)+$/))\n throw new Error(\"The ignore file location should be either a parent or child directory\");\n if (cleanPattern.startsWith(\"**\"))\n return pattern;\n const parents = relative(resolve(cwd, relativePath), cwd).split(/[/\\\\]/);\n while (parents.length && cleanPattern.startsWith(`${parents[0]}/`)) {\n cleanPattern = cleanPattern.slice(parents[0].length + 1);\n parents.shift();\n }\n if (cleanPattern.startsWith(\"**\"))\n return `${negated}${cleanPattern}`;\n if (parents.length === 0)\n return `${negated}${cleanPattern}`;\n return null;\n}\nfunction parseGitSubmodules(content) {\n return content.split(/\\r?\\n/u).map((line) => line.match(/path\\s*=\\s*(.+)/u)).filter((match) => match !== null).map((match) => match[1].trim());\n}\n\nexport { ignore as default };\n","// @ts-self-types=\"./index.d.ts\"\nimport fs from 'node:fs';\nimport path from 'node:path';\n\n/**\n * @filedescription Functions to fix up rules to provide missing methods on the `context` object.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"eslint\").ESLint.Plugin} FixupPluginDefinition */\n/** @typedef {import(\"eslint\").Rule.RuleModule} FixupRuleDefinition */\n/** @typedef {FixupRuleDefinition[\"create\"]} FixupLegacyRuleDefinition */\n/** @typedef {import(\"eslint\").Linter.Config} FixupConfig */\n/** @typedef {Array<FixupConfig>} FixupConfigArray */\n\n//-----------------------------------------------------------------------------\n// Data\n//-----------------------------------------------------------------------------\n\n/**\n * The removed methods from the `context` object that need to be added back.\n * The keys are the name of the method on the `context` object and the values\n * are the name of the method on the `sourceCode` object.\n * @type {Map<string, string>}\n */\nconst removedMethodNames = new Map([\n\t[\"getSource\", \"getText\"],\n\t[\"getSourceLines\", \"getLines\"],\n\t[\"getAllComments\", \"getAllComments\"],\n\t[\"getDeclaredVariables\", \"getDeclaredVariables\"],\n\t[\"getNodeByRangeIndex\", \"getNodeByRangeIndex\"],\n\t[\"getCommentsBefore\", \"getCommentsBefore\"],\n\t[\"getCommentsAfter\", \"getCommentsAfter\"],\n\t[\"getCommentsInside\", \"getCommentsInside\"],\n\t[\"getJSDocComment\", \"getJSDocComment\"],\n\t[\"getFirstToken\", \"getFirstToken\"],\n\t[\"getFirstTokens\", \"getFirstTokens\"],\n\t[\"getLastToken\", \"getLastToken\"],\n\t[\"getLastTokens\", \"getLastTokens\"],\n\t[\"getTokenAfter\", \"getTokenAfter\"],\n\t[\"getTokenBefore\", \"getTokenBefore\"],\n\t[\"getTokenByRangeStart\", \"getTokenByRangeStart\"],\n\t[\"getTokens\", \"getTokens\"],\n\t[\"getTokensAfter\", \"getTokensAfter\"],\n\t[\"getTokensBefore\", \"getTokensBefore\"],\n\t[\"getTokensBetween\", \"getTokensBetween\"],\n]);\n\n/**\n * Tracks the original rule definition and the fixed-up rule definition.\n * @type {WeakMap<FixupRuleDefinition|FixupLegacyRuleDefinition,FixupRuleDefinition>}\n */\nconst fixedUpRuleReplacements = new WeakMap();\n\n/**\n * Tracks all of the fixed up rule definitions so we don't duplicate effort.\n * @type {WeakSet<FixupRuleDefinition>}\n */\nconst fixedUpRules = new WeakSet();\n\n/**\n * Tracks the original plugin definition and the fixed-up plugin definition.\n * @type {WeakMap<FixupPluginDefinition,FixupPluginDefinition>}\n */\nconst fixedUpPluginReplacements = new WeakMap();\n\n/**\n * Tracks all of the fixed up plugin definitions so we don't duplicate effort.\n * @type {WeakSet<FixupPluginDefinition>}\n */\nconst fixedUpPlugins = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Takes the given rule and creates a new rule with the `create()` method wrapped\n * to provide the missing methods on the `context` object.\n * @param {FixupRuleDefinition|FixupLegacyRuleDefinition} ruleDefinition The rule to fix up.\n * @returns {FixupRuleDefinition} The fixed-up rule.\n */\nfunction fixupRule(ruleDefinition) {\n\t// first check if we've already fixed up this rule\n\tif (fixedUpRuleReplacements.has(ruleDefinition)) {\n\t\treturn fixedUpRuleReplacements.get(ruleDefinition);\n\t}\n\n\tconst isLegacyRule = typeof ruleDefinition === \"function\";\n\n\t// check to see if this rule definition has already been fixed up\n\tif (!isLegacyRule && fixedUpRules.has(ruleDefinition)) {\n\t\treturn ruleDefinition;\n\t}\n\n\tconst originalCreate = isLegacyRule\n\t\t? ruleDefinition\n\t\t: ruleDefinition.create.bind(ruleDefinition);\n\n\tfunction ruleCreate(context) {\n\t\t// if getScope is already there then no need to create old methods\n\t\tif (\"getScope\" in context) {\n\t\t\treturn originalCreate(context);\n\t\t}\n\n\t\tconst sourceCode = context.sourceCode;\n\t\tlet currentNode = sourceCode.ast;\n\n\t\tconst newContext = Object.assign(Object.create(context), {\n\t\t\tparserServices: sourceCode.parserServices,\n\n\t\t\t/*\n\t\t\t * The following methods rely on the current node in the traversal,\n\t\t\t * so we need to add them manually.\n\t\t\t */\n\t\t\tgetScope() {\n\t\t\t\treturn sourceCode.getScope(currentNode);\n\t\t\t},\n\n\t\t\tgetAncestors() {\n\t\t\t\treturn sourceCode.getAncestors(currentNode);\n\t\t\t},\n\n\t\t\tmarkVariableAsUsed(variable) {\n\t\t\t\tsourceCode.markVariableAsUsed(variable, currentNode);\n\t\t\t},\n\t\t});\n\n\t\t// add passthrough methods\n\t\tfor (const [\n\t\t\tcontextMethodName,\n\t\t\tsourceCodeMethodName,\n\t\t] of removedMethodNames) {\n\t\t\tnewContext[contextMethodName] =\n\t\t\t\tsourceCode[sourceCodeMethodName].bind(sourceCode);\n\t\t}\n\n\t\t// freeze just like the original context\n\t\tObject.freeze(newContext);\n\n\t\t/*\n\t\t * Create the visitor object using the original create() method.\n\t\t * This is necessary to ensure that the visitor object is created\n\t\t * with the correct context.\n\t\t */\n\t\tconst visitor = originalCreate(newContext);\n\n\t\t/*\n\t\t * Wrap each method in the visitor object to update the currentNode\n\t\t * before calling the original method. This is necessary because the\n\t\t * methods like `getScope()` need to know the current node.\n\t\t */\n\t\tfor (const [methodName, method] of Object.entries(visitor)) {\n\t\t\t/*\n\t\t\t * Node is the second argument to most code path methods,\n\t\t\t * and the third argument for onCodePathSegmentLoop.\n\t\t\t */\n\t\t\tif (methodName.startsWith(\"on\")) {\n\t\t\t\t// eslint-disable-next-line no-loop-func -- intentionally updating shared `currentNode` variable\n\t\t\t\tvisitor[methodName] = (...args) => {\n\t\t\t\t\tcurrentNode =\n\t\t\t\t\t\targs[methodName === \"onCodePathSegmentLoop\" ? 2 : 1];\n\n\t\t\t\t\treturn method.call(visitor, ...args);\n\t\t\t\t};\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// eslint-disable-next-line no-loop-func -- intentionally updating shared `currentNode` variable\n\t\t\tvisitor[methodName] = (...args) => {\n\t\t\t\tcurrentNode = args[0];\n\n\t\t\t\treturn method.call(visitor, ...args);\n\t\t\t};\n\t\t}\n\n\t\treturn visitor;\n\t}\n\n\tconst newRuleDefinition = {\n\t\t...(isLegacyRule ? undefined : ruleDefinition),\n\t\tcreate: ruleCreate,\n\t};\n\n\t// copy `schema` property of function-style rule or top-level `schema` property of object-style rule into `meta` object\n\t// @ts-ignore -- top-level `schema` property was not offically supported for object-style rules so it doesn't exist in types\n\tconst { schema } = ruleDefinition;\n\tif (schema) {\n\t\tif (!newRuleDefinition.meta) {\n\t\t\tnewRuleDefinition.meta = { schema };\n\t\t} else {\n\t\t\tnewRuleDefinition.meta = {\n\t\t\t\t...newRuleDefinition.meta,\n\t\t\t\t// top-level `schema` had precedence over `meta.schema` so it's okay to overwrite `meta.schema` if it exists\n\t\t\t\tschema,\n\t\t\t};\n\t\t}\n\t}\n\n\t// cache the fixed up rule\n\tfixedUpRuleReplacements.set(ruleDefinition, newRuleDefinition);\n\tfixedUpRules.add(newRuleDefinition);\n\n\treturn newRuleDefinition;\n}\n\n/**\n * Takes the given plugin and creates a new plugin with all of the rules wrapped\n * to provide the missing methods on the `context` object.\n * @param {FixupPluginDefinition} plugin The plugin to fix up.\n * @returns {FixupPluginDefinition} The fixed-up plugin.\n */\nfunction fixupPluginRules(plugin) {\n\t// first check if we've already fixed up this plugin\n\tif (fixedUpPluginReplacements.has(plugin)) {\n\t\treturn fixedUpPluginReplacements.get(plugin);\n\t}\n\n\t/*\n\t * If the plugin has already been fixed up, or if the plugin\n\t * doesn't have any rules, we can just return it.\n\t */\n\tif (fixedUpPlugins.has(plugin) || !plugin.rules) {\n\t\treturn plugin;\n\t}\n\n\tconst newPlugin = {\n\t\t...plugin,\n\t\trules: Object.fromEntries(\n\t\t\tObject.entries(plugin.rules).map(([ruleId, ruleDefinition]) => [\n\t\t\t\truleId,\n\t\t\t\tfixupRule(ruleDefinition),\n\t\t\t]),\n\t\t),\n\t};\n\n\t// cache the fixed up plugin\n\tfixedUpPluginReplacements.set(plugin, newPlugin);\n\tfixedUpPlugins.add(newPlugin);\n\n\treturn newPlugin;\n}\n\n/**\n * Takes the given configuration and creates a new configuration with all of the\n * rules wrapped to provide the missing methods on the `context` object.\n * @param {FixupConfigArray|FixupConfig} config The configuration to fix up.\n * @returns {FixupConfigArray} The fixed-up configuration.\n */\nfunction fixupConfigRules(config) {\n\tconst configs = Array.isArray(config) ? config : [config];\n\n\treturn configs.map(configItem => {\n\t\tif (!configItem.plugins) {\n\t\t\treturn configItem;\n\t\t}\n\n\t\tconst newPlugins = Object.fromEntries(\n\t\t\tObject.entries(configItem.plugins).map(([pluginName, plugin]) => [\n\t\t\t\tpluginName,\n\t\t\t\tfixupPluginRules(plugin),\n\t\t\t]),\n\t\t);\n\n\t\treturn {\n\t\t\t...configItem,\n\t\t\tplugins: newPlugins,\n\t\t};\n\t});\n}\n\n/**\n * @fileoverview Ignore file utilities for the compat package.\n * @author Nicholas C. Zakas\n */\n\n\n//-----------------------------------------------------------------------------\n// Types\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"eslint\").Linter.Config} FlatConfig */\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * Converts an ESLint ignore pattern to a minimatch pattern.\n * @param {string} pattern The .eslintignore or .gitignore pattern to convert.\n * @returns {string} The converted pattern.\n */\nfunction convertIgnorePatternToMinimatch(pattern) {\n\tconst isNegated = pattern.startsWith(\"!\");\n\tconst negatedPrefix = isNegated ? \"!\" : \"\";\n\tconst patternToTest = (isNegated ? pattern.slice(1) : pattern).trimEnd();\n\n\t// special cases\n\tif ([\"\", \"**\", \"/**\", \"**/\"].includes(patternToTest)) {\n\t\treturn `${negatedPrefix}${patternToTest}`;\n\t}\n\n\tconst firstIndexOfSlash = patternToTest.indexOf(\"/\");\n\n\tconst matchEverywherePrefix =\n\t\tfirstIndexOfSlash < 0 || firstIndexOfSlash === patternToTest.length - 1\n\t\t\t? \"**/\"\n\t\t\t: \"\";\n\n\tconst patternWithoutLeadingSlash =\n\t\tfirstIndexOfSlash === 0 ? patternToTest.slice(1) : patternToTest;\n\n\t/*\n\t * Escape `{` and `(` because in gitignore patterns they are just\n\t * literal characters without any specific syntactic meaning,\n\t * while in minimatch patterns they can form brace expansion or extglob syntax.\n\t *\n\t * For example, gitignore pattern `src/{a,b}.js` ignores file `src/{a,b}.js`.\n\t * But, the same minimatch pattern `src/{a,b}.js` ignores files `src/a.js` and `src/b.js`.\n\t * Minimatch pattern `src/\\{a,b}.js` is equivalent to gitignore pattern `src/{a,b}.js`.\n\t */\n\tconst escapedPatternWithoutLeadingSlash =\n\t\tpatternWithoutLeadingSlash.replaceAll(\n\t\t\t/(?=((?:\\\\.|[^{(])*))\\1([{(])/guy,\n\t\t\t\"$1\\\\$2\",\n\t\t);\n\n\tconst matchInsideSuffix = patternToTest.endsWith(\"/**\") ? \"/*\" : \"\";\n\n\treturn `${negatedPrefix}${matchEverywherePrefix}${escapedPatternWithoutLeadingSlash}${matchInsideSuffix}`;\n}\n\n/**\n * Reads an ignore file and returns an object with the ignore patterns.\n * @param {string} ignoreFilePath The absolute path to the ignore file.\n * @returns {FlatConfig} An object with an `ignores` property that is an array of ignore patterns.\n * @throws {Error} If the ignore file path is not an absolute path.\n */\nfunction includeIgnoreFile(ignoreFilePath) {\n\tif (!path.isAbsolute(ignoreFilePath)) {\n\t\tthrow new Error(\"The ignore file location must be an absolute path.\");\n\t}\n\n\tconst ignoreFile = fs.readFileSync(ignoreFilePath, \"utf8\");\n\tconst lines = ignoreFile.split(/\\r?\\n/u);\n\n\treturn {\n\t\tname: \"Imported .gitignore patterns\",\n\t\tignores: lines\n\t\t\t.map(line => line.trim())\n\t\t\t.filter(line => line && !line.startsWith(\"#\"))\n\t\t\t.map(convertIgnorePatternToMinimatch),\n\t};\n}\n\nexport { convertIgnorePatternToMinimatch, fixupConfigRules, fixupPluginRules, fixupRule, includeIgnoreFile };\n","import gitignore from \"eslint-config-flat-gitignore\";\nimport { findUpSync } from \"find-up-simple\";\nimport { isPackageListed } from \"local-pkg\";\nimport path from \"node:path\";\nimport tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { configApp } from \"@adonisjs/eslint-config\";\n\nimport { a11y } from \"./configs/a11y\";\nimport { comments } from \"./configs/comments\";\nimport { disables } from \"./configs/disables\";\nimport { formatters } from \"./configs/formatters\";\nimport { ignores } from \"./configs/ignores\";\nimport { imports } from \"./configs/imports\";\nimport { javascript } from \"./configs/javascript\";\nimport { jsdoc } from \"./configs/jsdoc\";\nimport { node } from \"./configs/node\";\nimport { react } from \"./configs/react\";\nimport { typescriptRelaxed } from \"./configs/typescript-relaxed\";\nimport { typescriptStrict } from \"./configs/typescript-strict\";\nimport { unicorn } from \"./configs/unicorn\";\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call\nconst builtinAdonisConfig: ConfigWithExtends[] = configApp();\n\nconst adonisConfig: ConfigWithExtends[] = [\n ...builtinAdonisConfig,\n ...node(),\n ...imports(),\n {\n rules: {\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n {\n selector: [\"enum\", \"enumMember\", \"class\", \"interface\", \"typeLike\"],\n format: [\"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: [\"classProperty\", \"classMethod\", \"method\", \"variableLike\"],\n format: [\"camelCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n {\n selector: \"variable\",\n format: [\"camelCase\", \"UPPER_CASE\", \"PascalCase\"],\n leadingUnderscore: \"allow\",\n trailingUnderscore: \"allow\",\n },\n ],\n },\n },\n];\n\nconst nestjsConfig: ConfigWithExtends[] = [\n ...node(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n {\n rules: {\n \"no-implicit-coercion\": [\n \"error\",\n {\n allow: [\"+\"],\n },\n ],\n \"unicorn/prefer-top-level-await\": \"off\",\n },\n },\n {\n rules: {\n \"@typescript-eslint/no-extraneous-class\": [\n \"error\",\n {\n allowEmpty: true,\n },\n ],\n },\n files: [\"**/*.module.ts\"],\n },\n];\n\nconst reactConfig = async (): Promise<ConfigWithExtends[]> => [\n ...a11y(),\n ...unicorn(),\n ...typescriptStrict(),\n ...imports({ forbidDefaultExport: true }),\n ...(await react()),\n];\n\nconst configs: ConfigWithExtends[] = [\n gitignore(),\n ...javascript(),\n ...jsdoc(),\n ...comments(),\n ...typescriptRelaxed(),\n];\n\nconst defaultOverrides = [...ignores(), ...formatters(), ...disables()];\n\nexport const solvro = async (...overrides: ConfigWithExtends[]) => {\n const isAdonis = await isPackageListed(\"@adonisjs/core\");\n const isReact = await isPackageListed(\"react\");\n const isNestJs = await isPackageListed(\"@nestjs/core\");\n if (isReact && isAdonis) {\n throw new Error(\"You can't use both Adonis and React in the same project\");\n }\n\n const newConfig: ConfigWithExtends[] = [];\n\n if (isAdonis) {\n newConfig.push(...adonisConfig);\n }\n\n if (isNestJs) {\n newConfig.push(...nestjsConfig);\n }\n\n if (isReact) {\n newConfig.push(...(await reactConfig()));\n }\n\n const tsConfigPath = findUpSync(\"tsconfig.json\", {\n cwd: process.cwd(),\n });\n\n if (tsConfigPath == null) {\n throw new Error(\"No tsconfig.json found\");\n }\n\n const rootDirectory = path.dirname(tsConfigPath);\n\n configs.push({\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: rootDirectory,\n },\n },\n });\n\n return tseslint.config(\n ...configs,\n ...newConfig,\n ...defaultOverrides,\n ...overrides,\n );\n};\n","import jsxA11y from \"eslint-plugin-jsx-a11y\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function a11y(): ConfigWithExtends[] {\n return [\n {\n files: [\"**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}\"],\n ...jsxA11y.flatConfigs.recommended,\n languageOptions: {\n ...jsxA11y.flatConfigs.recommended.languageOptions,\n globals: {\n ...globals.serviceworker,\n ...globals.browser,\n },\n },\n settings: {\n \"jsx-a11y\": {\n components: {\n Input: \"input\",\n Button: \"button\",\n Link: \"a\",\n Label: \"label\",\n Select: \"select\",\n Textarea: \"textarea\",\n },\n attributes: {\n for: [\"htmlFor\", \"for\"],\n },\n },\n },\n },\n ];\n}\n","//@ts-expect-error not working\nexport { default as pluginComments } from \"@eslint-community/eslint-plugin-eslint-comments\";\nexport { default as pluginAntfu } from \"eslint-plugin-antfu\";\nexport { default as pluginImport } from \"eslint-plugin-import\";\nexport { default as pluginNode } from \"eslint-plugin-n\";\nexport { default as pluginUnicorn } from \"eslint-plugin-unicorn\";\nexport { default as pluginUnusedImports } from \"eslint-plugin-unused-imports\";\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginComments } from \"../plugins\";\n\nexport function comments(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/eslint-comments/rules\",\n plugins: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n \"eslint-comments\": pluginComments,\n },\n rules: {\n \"eslint-comments/no-aggregating-enable\": \"error\",\n \"eslint-comments/no-duplicate-disable\": \"error\",\n \"eslint-comments/no-unlimited-disable\": \"error\",\n \"eslint-comments/no-unused-enable\": \"error\",\n },\n },\n ];\n}\n","import tseslint, { type ConfigWithExtends } from \"typescript-eslint\";\n\nimport { GLOB_SRC, GLOB_SRC_EXT } from \"../globs\";\n\nexport function disables(): ConfigWithExtends[] {\n return [\n {\n files: [`**/scripts/${GLOB_SRC}`],\n name: \"solvro/disables/scripts\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n },\n {\n rules: {\n \"prettier/prettier\": \"off\",\n },\n },\n {\n files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/cli\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n },\n },\n {\n files: [\"**/bin/**/*\", `**/bin.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/bin\",\n rules: {\n \"antfu/no-import-dist\": \"off\",\n \"antfu/no-import-node-modules-by-path\": \"off\",\n },\n },\n {\n files: [\"**/*.d.?([cm])ts\"],\n name: \"solvro/disables/dts\",\n rules: {\n \"eslint-comments/no-unlimited-disable\": \"off\",\n \"import-x/no-duplicates\": \"off\",\n \"no-restricted-syntax\": \"off\",\n \"unused-imports/no-unused-vars\": \"off\",\n },\n },\n {\n files: [\"**/*.js\", \"**/*.cjs\"],\n name: \"solvro/disables/cjs\",\n rules: {\n \"@typescript-eslint/no-require-imports\": \"off\",\n },\n },\n {\n files: [`**/*.config.${GLOB_SRC_EXT}`, `**/*.config.*.${GLOB_SRC_EXT}`],\n name: \"solvro/disables/config-files\",\n rules: {\n \"antfu/no-top-level-await\": \"off\",\n \"no-console\": \"off\",\n \"@typescript-eslint/explicit-function-return-type\": \"off\",\n },\n },\n {\n files: [\"**/*.js\"],\n extends: [tseslint.configs.disableTypeChecked],\n },\n ];\n}\n","export const GLOB_SRC_EXT = \"?([cm])[jt]s?(x)\";\nexport const GLOB_SRC = \"**/*.?([cm])[jt]s?(x)\";\n\nexport const GLOB_JS = \"**/*.?([cm])js\";\nexport const GLOB_JSX = \"**/*.?([cm])jsx\";\n\nexport const GLOB_TS = \"**/*.?([cm])ts\";\nexport const GLOB_TSX = \"**/*.?([cm])tsx\";\n\nexport const GLOB_EXCLUDE = [\n \"**/node_modules\",\n \"**/dist\",\n \"**/package-lock.json\",\n \"**/yarn.lock\",\n \"**/pnpm-lock.yaml\",\n \"**/bun.lockb\",\n \"**/build\",\n \"**/output\",\n \"**/coverage\",\n \"**/temp\",\n \"**/.temp\",\n \"**/tmp\",\n \"**/.tmp\",\n \"**/.history\",\n \"**/.vitepress/cache\",\n \"**/.nuxt\",\n \"**/.next\",\n \"**/.svelte-kit\",\n \"**/.vercel\",\n \"**/.changeset\",\n \"**/.idea\",\n \"**/.cache\",\n \"**/.output\",\n \"**/.vite-inspect\",\n \"**/.yarn\",\n \"**/vite.config.*.timestamp-*\",\n\n \"**/CHANGELOG*.md\",\n \"**/*.min.*\",\n \"**/LICENSE*\",\n \"**/__snapshots__\",\n \"**/auto-import?(s).d.ts\",\n \"**/components.d.ts\",\n];\n","import prettierConfig from \"eslint-config-prettier\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function formatters(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/prettier\",\n rules: {\n ...prettierConfig.rules,\n curly: \"error\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { GLOB_EXCLUDE } from \"../globs\";\n\nexport function ignores(): ConfigWithExtends[] {\n return [\n {\n ignores: [...GLOB_EXCLUDE],\n name: \"solvro/ignores\",\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu, pluginImport } from \"../plugins\";\n\nconst forbiddenUiLibraries = [\n \"@headlessui/react\",\n \"@mui/material\",\n \"@chakra-ui/react\",\n \"@chakra-ui/core\",\n \"@nextui-org/react\",\n \"react-bootstrap\",\n \"antd\",\n];\n\nexport function imports({\n forbidDefaultExport = true,\n} = {}): ConfigWithExtends[] {\n const config = [\n pluginImport.flatConfigs.typescript,\n {\n name: \"solvro/imports/rules\",\n plugins: {\n antfu: pluginAntfu,\n },\n\n rules: {\n \"antfu/import-dedupe\": \"error\",\n \"antfu/no-import-dist\": \"error\",\n \"antfu/no-import-node-modules-by-path\": \"error\",\n\n ...(pluginImport.flatConfigs.recommended\n .rules as ConfigWithExtends[\"rules\"]),\n \"import/no-dynamic-require\": \"warn\",\n \"import/no-unresolved\": \"off\",\n \"import/consistent-type-specifier-style\": \"warn\",\n \"@typescript-eslint/no-restricted-imports\": [\n \"error\",\n {\n paths: [\n {\n name: \"axios\",\n message: \"Please use fetch instead\",\n },\n ...forbiddenUiLibraries.map((library) => ({\n name: library,\n message: `Please use ui.shadcn.com components instead.`,\n })),\n ],\n },\n ],\n },\n },\n ] satisfies ConfigWithExtends[];\n\n if (forbidDefaultExport) {\n config.push(\n {\n rules: { \"import/no-default-export\": \"error\" },\n },\n {\n files: [\n \"tsup.config.*\",\n \"eslint.config.*\",\n \".commitlintrc.*\",\n \"knip.*\",\n \"next.config.*\",\n \"commitlint.config.*\",\n \".releaserc.*\",\n \"vitest.config.*\",\n \"playwright.config.*\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return config;\n}\n","import eslint from \"@eslint/js\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu, pluginUnusedImports } from \"../plugins\";\n\nexport function javascript(): ConfigWithExtends[] {\n return [\n {\n languageOptions: {\n ecmaVersion: 2022,\n globals: {\n ...globals.browser,\n ...globals.es2021,\n ...globals.node,\n document: \"readonly\",\n navigator: \"readonly\",\n window: \"readonly\",\n },\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: 2022,\n sourceType: \"module\",\n },\n sourceType: \"module\",\n },\n linterOptions: {\n reportUnusedDisableDirectives: true,\n },\n name: \"solvro/javascript/setup\",\n },\n {\n name: \"solvro/javascript/rules\",\n plugins: {\n antfu: pluginAntfu,\n \"unused-imports\": pluginUnusedImports,\n },\n rules: {\n ...eslint.configs.recommended.rules,\n \"accessor-pairs\": [\n \"error\",\n { enforceForClassMembers: true, setWithoutGet: true },\n ],\n curly: \"error\",\n \"array-callback-return\": \"error\",\n \"block-scoped-var\": \"error\",\n \"constructor-super\": \"error\",\n \"default-case-last\": \"error\",\n \"dot-notation\": [\"error\", { allowKeywords: true }],\n eqeqeq: [\"error\", \"smart\"],\n \"new-cap\": [\n \"error\",\n { capIsNew: false, newIsCap: true, properties: true },\n ],\n \"no-alert\": \"error\",\n \"no-array-constructor\": \"error\",\n \"no-async-promise-executor\": \"error\",\n \"no-caller\": \"error\",\n \"no-case-declarations\": \"error\",\n \"no-class-assign\": \"error\",\n \"no-compare-neg-zero\": \"error\",\n \"no-cond-assign\": [\"error\", \"always\"],\n \"no-console\": [\"error\", { allow: [\"warn\", \"error\"] }],\n \"no-const-assign\": \"error\",\n \"no-control-regex\": \"error\",\n \"no-debugger\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-dupe-args\": \"error\",\n \"no-dupe-class-members\": \"error\",\n \"no-dupe-keys\": \"error\",\n \"no-duplicate-case\": \"error\",\n \"no-empty\": [\"error\", { allowEmptyCatch: true }],\n \"no-empty-character-class\": \"error\",\n \"no-empty-pattern\": \"error\",\n \"no-eval\": \"error\",\n \"no-ex-assign\": \"error\",\n \"no-extend-native\": \"error\",\n \"no-extra-bind\": \"error\",\n \"no-extra-boolean-cast\": \"error\",\n \"no-fallthrough\": \"error\",\n \"no-func-assign\": \"error\",\n \"no-global-assign\": \"error\",\n \"no-implied-eval\": \"error\",\n \"no-implicit-coercion\": \"error\",\n \"no-import-assign\": \"error\",\n \"no-invalid-regexp\": \"error\",\n \"no-irregular-whitespace\": \"error\",\n \"no-iterator\": \"error\",\n \"no-labels\": [\"error\", { allowLoop: false, allowSwitch: false }],\n \"no-lone-blocks\": \"error\",\n \"no-loss-of-precision\": \"error\",\n \"no-misleading-character-class\": \"error\",\n \"no-multi-str\": \"error\",\n \"no-new\": \"error\",\n \"no-new-func\": \"error\",\n \"no-new-native-nonconstructor\": \"error\",\n \"no-new-wrappers\": \"error\",\n \"no-obj-calls\": \"error\",\n \"no-octal\": \"error\",\n \"no-octal-escape\": \"error\",\n \"no-proto\": \"error\",\n \"no-prototype-builtins\": \"error\",\n \"no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"no-regex-spaces\": \"error\",\n \"no-restricted-globals\": [\n \"error\",\n { message: \"Use `globalThis` instead.\", name: \"global\" },\n { message: \"Use `globalThis` instead.\", name: \"self\" },\n ],\n \"no-restricted-properties\": [\n \"error\",\n {\n message:\n \"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.\",\n property: \"__proto__\",\n },\n {\n message: \"Use `Object.defineProperty` instead.\",\n property: \"__defineGetter__\",\n },\n {\n message: \"Use `Object.defineProperty` instead.\",\n property: \"__defineSetter__\",\n },\n {\n message: \"Use `Object.getOwnPropertyDescriptor` instead.\",\n property: \"__lookupGetter__\",\n },\n {\n message: \"Use `Object.getOwnPropertyDescriptor` instead.\",\n property: \"__lookupSetter__\",\n },\n ],\n \"no-restricted-syntax\": [\n \"error\",\n \"TSEnumDeclaration[const=true]\",\n \"TSExportAssignment\",\n ],\n \"no-self-assign\": [\"error\", { props: true }],\n \"no-self-compare\": \"error\",\n \"no-sequences\": \"error\",\n \"no-shadow-restricted-names\": \"error\",\n \"no-sparse-arrays\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-this-before-super\": \"error\",\n \"no-throw-literal\": \"error\",\n \"no-undef-init\": \"error\",\n \"no-unexpected-multiline\": \"error\",\n \"no-unmodified-loop-condition\": \"error\",\n \"no-unneeded-ternary\": [\"error\", { defaultAssignment: false }],\n \"no-unreachable\": \"error\",\n \"no-unreachable-loop\": \"error\",\n \"no-unsafe-finally\": \"error\",\n \"no-unsafe-negation\": \"error\",\n \"no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n\n \"no-useless-backreference\": \"error\",\n \"no-useless-call\": \"error\",\n \"no-useless-catch\": \"error\",\n \"no-useless-computed-key\": \"error\",\n \"no-useless-constructor\": \"error\",\n \"no-useless-rename\": \"error\",\n \"no-useless-return\": \"error\",\n \"no-var\": \"error\",\n \"no-with\": \"error\",\n \"object-shorthand\": [\n \"error\",\n \"always\",\n {\n avoidQuotes: true,\n ignoreConstructors: false,\n },\n ],\n \"one-var\": [\"error\", { initialized: \"never\" }],\n \"prefer-arrow-callback\": [\n \"error\",\n {\n allowNamedFunctions: false,\n allowUnboundThis: true,\n },\n ],\n \"prefer-const\": [\n \"error\",\n {\n destructuring: \"all\",\n ignoreReadBeforeAssign: true,\n },\n ],\n \"prefer-exponentiation-operator\": \"error\",\n \"prefer-promise-reject-errors\": \"error\",\n \"prefer-regex-literals\": [\"error\", { disallowRedundantWrapping: true }],\n \"prefer-rest-params\": \"error\",\n \"prefer-spread\": \"error\",\n \"prefer-template\": \"error\",\n \"symbol-description\": \"error\",\n \"unicode-bom\": [\"error\", \"never\"],\n \"unused-imports/no-unused-imports\": \"error\",\n \"unused-imports/no-unused-vars\": [\n \"error\",\n {\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"use-isnan\": [\n \"error\",\n { enforceForIndexOf: true, enforceForSwitchCase: true },\n ],\n \"valid-typeof\": [\"error\", { requireStringLiterals: true }],\n \"vars-on-top\": \"error\",\n yoda: [\"error\", \"never\"],\n },\n },\n ];\n}\n","import jsdocPlugin from \"eslint-plugin-jsdoc\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function jsdoc(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/jsdoc/rules\",\n plugins: {\n jsdoc: jsdocPlugin,\n },\n rules: {\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-param-names\": \"warn\",\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": \"warn\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginNode } from \"../plugins\";\n\nexport function node(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/node/rules\",\n plugins: {\n node: pluginNode,\n },\n rules: {\n \"node/handle-callback-err\": [\"error\", \"^(err|error)$\"],\n \"node/no-deprecated-api\": \"error\",\n \"node/no-exports-assign\": \"error\",\n \"node/no-new-require\": \"error\",\n \"node/no-path-concat\": \"error\",\n \"node/prefer-global/buffer\": [\"error\"],\n \"node/prefer-global/process\": [\"error\"],\n \"node/process-exit-as-throw\": \"error\",\n },\n },\n ];\n}\n","import pluginQuery from \"@tanstack/eslint-plugin-query\";\nimport pluginReact from \"eslint-plugin-react\";\nimport pluginReactHooks from \"eslint-plugin-react-hooks\";\nimport { isPackageExists } from \"local-pkg\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nconst nextJsPackages = [\"next\"];\n\nexport async function react(): Promise<ConfigWithExtends[]> {\n const isUsingNext = nextJsPackages.some((index) => isPackageExists(index));\n\n const nextjsConfig: ConfigWithExtends[] = [];\n\n if (isUsingNext) {\n const nextPlugin = await import(\"@next/eslint-plugin-next\").then(\n (d) => d.default,\n );\n\n nextjsConfig.push(\n {\n name: \"solvro/next/setup\",\n plugins: {\n \"@next/next\": nextPlugin,\n },\n\n rules: nextPlugin.configs.recommended.rules,\n },\n {\n files: [\n \"**/app/**/{page,loading,layout,template,error,not-found,unauthorized,forbidden,default,robots,sitemap}.{js,jsx,ts,tsx}\",\n \"**/pages/**/*.{js,jsx,ts,tsx}\",\n ],\n name: \"solvro/next/pages\",\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return [\n {\n name: \"solvro/react/setup\",\n plugins: {\n react: pluginReact,\n\n \"react-hooks\": pluginReactHooks,\n },\n },\n ...nextjsConfig,\n {\n files: [\"**/*.{js,jsx,mjs,cjs,ts,tsx}\"],\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n sourceType: \"module\",\n },\n settings: {\n react: {\n version: \"detect\",\n },\n },\n name: \"solvro/react/rules\",\n rules: {\n ...pluginReact.configs.flat.recommended.rules,\n ...pluginReact.configs.flat[\"jsx-runtime\"].rules,\n \"react/no-danger\": \"warn\",\n \"react/jsx-no-leaked-render\": \"warn\",\n // recommended rules react-hooks\n \"react-hooks/exhaustive-deps\": \"warn\",\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react/jsx-no-useless-fragment\": \"error\",\n \"react/function-component-definition\": [\n \"error\",\n {\n unnamedComponents: \"arrow-function\",\n namedComponents: \"function-declaration\",\n },\n ],\n \"react/hook-use-state\": [\n \"error\",\n {\n allowDestructuredState: true,\n },\n ],\n \"react/no-array-index-key\": \"warn\",\n },\n },\n ...pluginQuery.configs[\"flat/recommended\"],\n {\n name: \"solvro/react/disables\",\n files: [\"**/components/ui/*.{jsx,tsx}\"],\n rules: {\n \"react/prop-types\": \"off\",\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n \"unicorn/no-document-cookie\": \"off\",\n \"@typescript-eslint/no-redeclare\": \"off\",\n \"@typescript-eslint/no-deprecated\": \"off\",\n },\n },\n ];\n}\n","import tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nexport function typescriptRelaxed(): ConfigWithExtends[] {\n return [\n ...tseslint.configs.recommendedTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n {\n name: \"solvro/typescript-relaxed/rules\",\n rules: {\n \"@typescript-eslint/no-unsafe-return\": \"off\",\n \"@typescript-eslint/require-await\": \"off\",\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksVoidReturn: false,\n },\n ],\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": \"error\",\n \"unused-imports/no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": [\n \"error\",\n {\n args: \"all\",\n argsIgnorePattern: \"^_\",\n destructuredArrayIgnorePattern: \"^_\",\n varsIgnorePattern: \"^_\",\n ignoreRestSiblings: true,\n },\n ],\n \"@typescript-eslint/no-empty-object-type\": \"off\",\n \"@typescript-eslint/no-unnecessary-condition\": \"warn\",\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n \"@typescript-eslint/no-unnecessary-template-expression\": \"error\",\n \"@typescript-eslint/strict-boolean-expressions\": [\n \"error\",\n {\n allowNullableObject: false,\n },\n ],\n },\n },\n ];\n}\n","import tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginAntfu } from \"../plugins\";\n\nexport function typescriptStrict(): ConfigWithExtends[] {\n return [\n ...tseslint.configs.strictTypeChecked,\n ...tseslint.configs.stylisticTypeChecked,\n {\n name: \"solvro/typescript-strict/setup\",\n plugins: {\n antfu: pluginAntfu,\n },\n },\n {\n files: [\"**/*.{ts,tsx}\"],\n name: \"solvro/typescript-strict/rules\",\n rules: {\n \"@typescript-eslint/ban-ts-comment\": [\n \"error\",\n { \"ts-expect-error\": \"allow-with-description\" },\n ],\n \"@typescript-eslint/consistent-type-definitions\": [\n \"error\",\n \"interface\",\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"error\",\n {\n disallowTypeAnnotations: false,\n prefer: \"type-imports\",\n },\n ],\n \"@typescript-eslint/method-signature-style\": [\"error\", \"property\"], // https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful\n \"@typescript-eslint/no-dupe-class-members\": \"error\",\n \"@typescript-eslint/no-empty-object-type\": [\n \"error\",\n { allowInterfaces: \"always\" },\n ],\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n \"@typescript-eslint/no-redeclare\": [\"error\", { builtinGlobals: false }],\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTaggedTemplates: true,\n allowTernary: true,\n },\n ],\n \"@typescript-eslint/no-use-before-define\": [\n \"error\",\n { classes: false, functions: false, variables: true },\n ],\n \"@typescript-eslint/no-wrapper-object-types\": \"error\",\n // prevent unnecessary use of void operator\n \"@typescript-eslint/no-meaningless-void-operator\": \"error\",\n // \"using non-null assertions cancels the benefits of the strict\n // null-checking mode.\"\n // warn when one of the types in union / intersection overrides others\n \"@typescript-eslint/no-redundant-type-constituents\": \"warn\",\n // prevent variables shadowing\n \"no-shadow\": \"error\",\n \"@typescript-eslint/no-shadow\": \"error\",\n // prevent assignment of this, signals a wrong usage of it\n \"@typescript-eslint/no-this-alias\": \"error\",\n // prevent throwing non-error\n \"no-throw-literal\": \"off\",\n\n // prevent unnecessary explicitly adding a default type argument\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n // prevent unnecessary assertions that won't change the outcome\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n // prevent extending default types\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n // force typing out function arguments\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n // prevent usage of any via reassigning\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n // prevent usage of any via calling it\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n // prevent usage of any via using it's members\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n // prevent reverting any from functions\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n // prevent unused expressions\n \"no-unused-expressions\": \"off\",\n // var<'string'> = 'string' -> var = 'string' as const\n \"@typescript-eslint/prefer-as-const\": \"error\",\n // force initializing enums\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n // prefer for x of obj to for let i = 0...\n \"@typescript-eslint/prefer-for-of\": \"error\",\n // prefer includes() to indexOf()\n \"@typescript-eslint/prefer-includes\": \"error\",\n // use literals for enum initialization\n \"@typescript-eslint/prefer-literal-enum-member\": \"error\",\n // prefer safe cascade of a value when dealing with undefined or null\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n // prefer optional chaining (a?.b)\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n // prefer using type parameter for Array.reduce\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n // prefer RegExp#exec when no /g flag in regex\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n // enforce `this` as a type when stating type for a method\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n // enforce startsWith to indexOf === 0\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // prevents default behavior of .sort() - which is confusing\n \"@typescript-eslint/require-array-sort-compare\": \"error\",\n // no async functions without awaits in body\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": \"error\",\n // prevent number + string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n // only allow string in templates\n \"@typescript-eslint/restrict-template-expressions\": \"error\",\n // prevent returning await\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": \"error\",\n // only booleans in ifs and whiles\n \"@typescript-eslint/strict-boolean-expressions\": \"error\",\n // check if all paths are followed in code\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n \"dot-notation\": \"off\",\n \"no-implied-eval\": \"off\",\n \"@typescript-eslint/await-thenable\": \"error\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n \"@typescript-eslint/no-floating-promises\": \"error\",\n \"@typescript-eslint/no-for-in-array\": \"error\",\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"@typescript-eslint/no-misused-promises\": \"error\",\n \"@typescript-eslint/promise-function-async\": \"error\",\n \"@typescript-eslint/unbound-method\": \"error\",\n \"no-restricted-imports\": \"off\",\n },\n },\n ];\n}\n","import type { ConfigWithExtends } from \"typescript-eslint\";\n\nimport { pluginUnicorn } from \"../plugins\";\n\nexport function unicorn(): ConfigWithExtends[] {\n return [\n {\n name: \"solvro/unicorn/rules\",\n plugins: {\n unicorn: pluginUnicorn,\n },\n rules: {\n ...pluginUnicorn.configs[\"flat/recommended\"].rules,\n \"unicorn/no-array-reduce\": \"off\",\n \"unicorn/no-null\": \"off\",\n \"unicorn/no-useless-switch-case\": \"off\",\n \"unicorn/prefer-global-this\": \"off\",\n \"unicorn/prevent-abbreviations\": [\n \"error\",\n {\n replacements: {\n env: false,\n envs: false,\n props: false,\n prop: false,\n ref: false,\n },\n allowList: {\n e2e: true,\n },\n ignore: [String.raw`e2e`],\n },\n ],\n },\n },\n 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AAQ,IAAI;AAAA,EACnB,CAAC;AAED,MAAI,gBAAgB,MAAM;AACxB,UAAM,IAAI,MAAM,wBAAwB;AAAA,EAC1C;AAEA,QAAM,gBAAgBC,MAAK,QAAQ,YAAY;AAE/C,UAAQ,KAAK;AAAA,IACX,iBAAiB;AAAA,MACf,eAAe;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAOC,UAAS;AAAA,IACd,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;","names":["fs","path","process","process","path","fs","ignores","findUpSync","path","tseslint","default","default","default","globals","globals","default","default","tseslint","tseslint","tseslint","default","default","findUpSync","path","tseslint"]}
|
package/dist/prettier/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
declare const _default: {
|
2
|
-
readonly importOrder: readonly ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@japa/(.*)$", "^@adonisjs/(.*)$", "^@/(.*)$", "^#(.*)$", "^[./]"];
|
2
|
+
readonly importOrder: readonly ["^@assets/(.*)$", "<THIRD_PARTY_MODULES>", "^@japa/(.*)$", "^@adonisjs/(.*)$", "^@nestjs/(.*)$", "^@/(.*)$", "^#(.*)$", "^[./]"];
|
3
3
|
readonly importOrderSeparation: true;
|
4
4
|
readonly importOrderSortSpecifiers: true;
|
5
5
|
readonly importOrderParserPlugins: readonly ["typescript", "jsx", "decorators-legacy"];
|
package/dist/prettier/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/prettier/index.ts"],"sourcesContent":["import type { Options } from \"prettier\";\n\n/**\n * Some of Prettier's defaults can be overridden by an EditorConfig file. We\n * define those here to ensure that doesn't happen.\n *\n * See: https://github.com/prettier/prettier/blob/main/docs/configuration.md#editorconfig\n */\n\nconst overridableDefaults = {\n arrowParens: \"always\",\n endOfLine: \"lf\",\n printWidth: 80,\n quoteProps: \"as-needed\",\n semi: true,\n tabWidth: 2,\n trailingComma: \"all\",\n useTabs: false,\n} as const;\n\nexport default {\n ...overridableDefaults,\n importOrder: [\n \"^@assets/(.*)$\",\n \"<THIRD_PARTY_MODULES>\",\n \"^@japa/(.*)$\",\n \"^@adonisjs/(.*)$\",\n \"^@/(.*)$\",\n \"^#(.*)$\",\n \"^[./]\",\n ],\n importOrderSeparation: true,\n importOrderSortSpecifiers: true,\n importOrderParserPlugins: [\"typescript\", \"jsx\", \"decorators-legacy\"],\n plugins: [\n \"prettier-plugin-packagejson\",\n \"@trivago/prettier-plugin-sort-imports\",\n \"prettier-plugin-tailwindcss\",\n ],\n singleQuote: false,\n} as const satisfies Options;\n"],"mappings":";AASA,IAAM,sBAAsB;AAAA,EAC1B,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,eAAe;AAAA,EACf,SAAS;AACX;AAEA,IAAO,mBAAQ;AAAA,EACb,GAAG;AAAA,EACH,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,0BAA0B,CAAC,cAAc,OAAO,mBAAmB;AAAA,EACnE,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa;AACf;","names":[]}
|
1
|
+
{"version":3,"sources":["../../src/prettier/index.ts"],"sourcesContent":["import type { Options } from \"prettier\";\n\n/**\n * Some of Prettier's defaults can be overridden by an EditorConfig file. We\n * define those here to ensure that doesn't happen.\n *\n * See: https://github.com/prettier/prettier/blob/main/docs/configuration.md#editorconfig\n */\n\nconst overridableDefaults = {\n arrowParens: \"always\",\n endOfLine: \"lf\",\n printWidth: 80,\n quoteProps: \"as-needed\",\n semi: true,\n tabWidth: 2,\n trailingComma: \"all\",\n useTabs: false,\n} as const;\n\nexport default {\n ...overridableDefaults,\n importOrder: [\n \"^@assets/(.*)$\",\n \"<THIRD_PARTY_MODULES>\",\n \"^@japa/(.*)$\",\n \"^@adonisjs/(.*)$\",\n \"^@nestjs/(.*)$\",\n \"^@/(.*)$\",\n \"^#(.*)$\",\n \"^[./]\",\n ],\n importOrderSeparation: true,\n importOrderSortSpecifiers: true,\n importOrderParserPlugins: [\"typescript\", \"jsx\", \"decorators-legacy\"],\n plugins: [\n \"prettier-plugin-packagejson\",\n \"@trivago/prettier-plugin-sort-imports\",\n \"prettier-plugin-tailwindcss\",\n ],\n singleQuote: false,\n} as const satisfies Options;\n"],"mappings":";AASA,IAAM,sBAAsB;AAAA,EAC1B,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,eAAe;AAAA,EACf,SAAS;AACX;AAEA,IAAO,mBAAQ;AAAA,EACb,GAAG;AAAA,EACH,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,uBAAuB;AAAA,EACvB,2BAA2B;AAAA,EAC3B,0BAA0B,CAAC,cAAc,OAAO,mBAAmB;AAAA,EACnE,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,aAAa;AACf;","names":[]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@solvro/config",
|
3
|
-
"version": "1.13.
|
3
|
+
"version": "1.13.7-beta.1",
|
4
4
|
"description": "Solvro's engineering style guide",
|
5
5
|
"keywords": [
|
6
6
|
"eslint",
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"prettier": "./dist/prettier/index.js",
|
58
58
|
"dependencies": {
|
59
59
|
"@adonisjs/eslint-config": "^2.0.0-beta.7",
|
60
|
-
"@clack/prompts": "^0.
|
60
|
+
"@clack/prompts": "^0.11.0",
|
61
61
|
"@commitlint/config-conventional": "^19.6.0",
|
62
62
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
63
63
|
"@eslint/js": "^9.16.0",
|
@@ -100,7 +100,7 @@
|
|
100
100
|
"husky": "^9.1.7",
|
101
101
|
"jiti": "^2.4.1",
|
102
102
|
"knip": "^5.39.2",
|
103
|
-
"lint-staged": "^
|
103
|
+
"lint-staged": "^16.1.0",
|
104
104
|
"prettier": "^3.4.2",
|
105
105
|
"react": "^19.0.0",
|
106
106
|
"react-dom": "^19.0.0",
|