@solvro/config 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adonis-GN4AQKAU.js → adonis-IGPNFIOR.js} +4 -4
- package/dist/adonis-IGPNFIOR.js.map +1 -0
- package/dist/{chunk-LNSDT6IT.js → chunk-DPDE52KB.js} +2 -2
- package/dist/chunk-DPDE52KB.js.map +1 -0
- package/dist/{chunk-VMUJRX4H.js → chunk-GO7SIG7Y.js} +1 -1
- package/dist/chunk-GO7SIG7Y.js.map +1 -0
- package/dist/{chunk-VXVVMPZI.js → chunk-NCPWMNFM.js} +2 -2
- package/dist/chunk-NCPWMNFM.js.map +1 -0
- package/dist/{chunk-SUGOLX7X.js → chunk-YZ6XWZKU.js} +2 -2
- package/dist/chunk-YZ6XWZKU.js.map +1 -0
- package/dist/cli/index.cjs +73 -54
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +73 -54
- package/dist/cli/index.js.map +1 -1
- package/dist/commitlint/index.cjs +1 -1
- package/dist/commitlint/index.cjs.map +1 -1
- package/dist/commitlint/index.js +1 -1
- package/dist/commitlint/index.js.map +1 -1
- package/dist/eslint/index.cjs +3 -2
- package/dist/eslint/index.cjs.map +1 -1
- package/dist/eslint/index.d.cts +2 -3
- package/dist/eslint/index.d.ts +2 -3
- package/dist/eslint/index.js +7 -7
- package/dist/eslint/index.js.map +1 -1
- package/dist/{nestjs-SVXAEFXN.js → nestjs-2STKSA5M.js} +5 -5
- package/dist/nestjs-2STKSA5M.js.map +1 -0
- package/dist/{node-LOZFNKBL.js → node-6FQFMXKP.js} +5 -5
- package/dist/node-6FQFMXKP.js.map +1 -0
- package/dist/{react-CM27K2YV.js → react-ZVTTVRVH.js} +5 -4
- package/dist/react-ZVTTVRVH.js.map +1 -0
- package/package.json +45 -41
- package/dist/adonis-GN4AQKAU.js.map +0 -1
- package/dist/chunk-LNSDT6IT.js.map +0 -1
- package/dist/chunk-SUGOLX7X.js.map +0 -1
- package/dist/chunk-VMUJRX4H.js.map +0 -1
- package/dist/chunk-VXVVMPZI.js.map +0 -1
- package/dist/nestjs-SVXAEFXN.js.map +0 -1
- package/dist/node-LOZFNKBL.js.map +0 -1
- package/dist/react-CM27K2YV.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
node
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YZ6XWZKU.js";
|
|
4
4
|
import {
|
|
5
5
|
imports
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-DPDE52KB.js";
|
|
7
|
+
import "./chunk-GO7SIG7Y.js";
|
|
8
8
|
|
|
9
9
|
// src/eslint/presets/adonis.ts
|
|
10
10
|
import { configApp } from "@adonisjs/eslint-config";
|
|
@@ -49,4 +49,4 @@ var adonisPreset = () => {
|
|
|
49
49
|
export {
|
|
50
50
|
adonisPreset
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=adonis-
|
|
52
|
+
//# sourceMappingURL=adonis-IGPNFIOR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eslint/presets/adonis.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"@eslint/config-helpers\";\n\nimport { configApp } from \"@adonisjs/eslint-config\";\n\nimport { imports } from \"../configs/imports\";\nimport { node } from \"../configs/node\";\n\nexport const adonisPreset = (): ConfigWithExtends[] => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call\n const builtinAdonisConfig: ConfigWithExtends[] = configApp();\n\n return [\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: [\n \"classProperty\",\n \"classMethod\",\n \"method\",\n \"variableLike\",\n ],\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};\n"],"mappings":";;;;;;;;;AAEA,SAAS,iBAAiB;AAKnB,IAAM,eAAe,MAA2B;AAErD,QAAM,sBAA2C,UAAU;AAE3D,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG,KAAK;AAAA,IACR,GAAG,QAAQ;AAAA,IACX;AAAA,MACE,OAAO;AAAA,QACL,wCAAwC;AAAA,UACtC;AAAA,UACA;AAAA,YACE,UAAU,CAAC,QAAQ,cAAc,SAAS,aAAa,UAAU;AAAA,YACjE,QAAQ,CAAC,YAAY;AAAA,YACrB,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,UAAU;AAAA,cACR;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,YACF;AAAA,YACA,QAAQ,CAAC,WAAW;AAAA,YACpB,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,UACA;AAAA,YACE,UAAU;AAAA,YACV,QAAQ,CAAC,aAAa,cAAc,YAAY;AAAA,YAChD,mBAAmB;AAAA,YACnB,oBAAoB;AAAA,UACtB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
default2,
|
|
3
3
|
default3
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GO7SIG7Y.js";
|
|
5
5
|
|
|
6
6
|
// src/eslint/configs/imports.ts
|
|
7
7
|
var forbiddenUiLibraries = [
|
|
@@ -80,4 +80,4 @@ function imports({
|
|
|
80
80
|
export {
|
|
81
81
|
imports
|
|
82
82
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-DPDE52KB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eslint/configs/imports.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"@eslint/config-helpers\";\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: ConfigWithExtends[] = [\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 ];\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 \"vite.config.*\",\n \".releaserc.*\",\n \"vitest.config.*\",\n \"postcss.config.*\",\n \"playwright.config.*\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n );\n }\n\n return config;\n}\n"],"mappings":";;;;;;AAIA,IAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,QAAQ;AAAA,EACtB,sBAAsB;AACxB,IAAI,CAAC,GAAwB;AAC3B,QAAM,SAA8B;AAAA,IAClCA,SAAa,YAAY;AAAA,IACzB;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,OAAOA;AAAA,MACT;AAAA,MAEA,OAAO;AAAA,QACL,uBAAuB;AAAA,QACvB,wBAAwB;AAAA,QACxB,wCAAwC;AAAA,QAExC,GAAIA,SAAa,YAAY,YAC1B;AAAA,QACH,6BAA6B;AAAA,QAC7B,wBAAwB;AAAA,QACxB,0CAA0C;AAAA,QAC1C,4CAA4C;AAAA,UAC1C;AAAA,UACA;AAAA,YACE,OAAO;AAAA,cACL;AAAA,gBACE,MAAM;AAAA,gBACN,SAAS;AAAA,cACX;AAAA,cACA,GAAG,qBAAqB,IAAI,CAAC,aAAa;AAAA,gBACxC,MAAM;AAAA,gBACN,SAAS;AAAA,cACX,EAAE;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,MAAI,qBAAqB;AACvB,WAAO;AAAA,MACL;AAAA,QACE,OAAO,EAAE,4BAA4B,QAAQ;AAAA,MAC/C;AAAA,MACA;AAAA,QACE,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL,4BAA4B;AAAA,QAC9B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":["default"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eslint/plugins.ts"],"sourcesContent":["export { 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"],"mappings":";AAAA,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAA8B;AACvC,SAAoB,WAAXA,gBAA+B;AACxC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,gBAAsC;","names":["default"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
default2,
|
|
3
3
|
default5 as default3
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GO7SIG7Y.js";
|
|
5
5
|
|
|
6
6
|
// src/eslint/configs/typescript-strict.ts
|
|
7
7
|
import tseslint from "typescript-eslint";
|
|
@@ -182,4 +182,4 @@ export {
|
|
|
182
182
|
typescriptStrict,
|
|
183
183
|
unicorn
|
|
184
184
|
};
|
|
185
|
-
//# sourceMappingURL=chunk-
|
|
185
|
+
//# sourceMappingURL=chunk-NCPWMNFM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eslint/configs/typescript-strict.ts","../src/eslint/configs/unicorn.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"@eslint/config-helpers\";\nimport tseslint 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 \"@eslint/config-helpers\";\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.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 utils: false,\n },\n allowList: {\n e2e: true,\n },\n ignore: [String.raw`e2e`],\n },\n ],\n },\n },\n ];\n}\n"],"mappings":";;;;;;AACA,OAAO,cAAc;AAId,SAAS,mBAAwC;AACtD,SAAO;AAAA,IACL,GAAG,SAAS,QAAQ;AAAA,IACpB,GAAG,SAAS,QAAQ;AAAA,IACpB;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,OAAOA;AAAA,MACT;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,eAAe;AAAA,MACvB,MAAM;AAAA,MACN,OAAO;AAAA,QACL,qCAAqC;AAAA,UACnC;AAAA,UACA,EAAE,mBAAmB,yBAAyB;AAAA,QAChD;AAAA,QACA,kDAAkD;AAAA,UAChD;AAAA,UACA;AAAA,QACF;AAAA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
default4 as default2
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GO7SIG7Y.js";
|
|
4
4
|
|
|
5
5
|
// src/eslint/configs/node.ts
|
|
6
6
|
function node() {
|
|
@@ -27,4 +27,4 @@ function node() {
|
|
|
27
27
|
export {
|
|
28
28
|
node
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-YZ6XWZKU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eslint/configs/node.ts"],"sourcesContent":["import type { ConfigWithExtends } from \"@eslint/config-helpers\";\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"],"mappings":";;;;;AAIO,SAAS,OAA4B;AAC1C,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,SAAS;AAAA,QACP,MAAMA;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACL,4BAA4B,CAAC,SAAS,eAAe;AAAA,QACrD,0BAA0B;AAAA,QAC1B,0BAA0B;AAAA,QAC1B,uBAAuB;AAAA,QACvB,uBAAuB;AAAA,QACvB,6BAA6B,CAAC,OAAO;AAAA,QACrC,8BAA8B,CAAC,OAAO;AAAA,QACtC,8BAA8B;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AACF;","names":["default"]}
|
package/dist/cli/index.cjs
CHANGED
|
@@ -31,7 +31,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "@solvro/config",
|
|
34
|
-
version: "2.0.
|
|
34
|
+
version: "2.0.7",
|
|
35
35
|
description: "Solvro's engineering style guide",
|
|
36
36
|
keywords: [
|
|
37
37
|
"eslint",
|
|
@@ -83,7 +83,7 @@ var package_default = {
|
|
|
83
83
|
test: "vitest run",
|
|
84
84
|
"test:ui": "vitest --ui",
|
|
85
85
|
"test:watch": "vitest",
|
|
86
|
-
typecheck: "
|
|
86
|
+
typecheck: "tsgo --noEmit"
|
|
87
87
|
},
|
|
88
88
|
"lint-staged": {
|
|
89
89
|
"*": "prettier -w --ignore-unknown"
|
|
@@ -92,65 +92,69 @@ var package_default = {
|
|
|
92
92
|
dependencies: {
|
|
93
93
|
"@adonisjs/eslint-config": "^2.1.2",
|
|
94
94
|
"@clack/prompts": "^0.11.0",
|
|
95
|
-
"@commitlint/config-conventional": "^
|
|
96
|
-
"@darraghor/eslint-plugin-nestjs-typed": "^6.
|
|
97
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
98
|
-
"@eslint/
|
|
99
|
-
"@
|
|
95
|
+
"@commitlint/config-conventional": "^20.4.3",
|
|
96
|
+
"@darraghor/eslint-plugin-nestjs-typed": "^6.18.0",
|
|
97
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
98
|
+
"@eslint/config-helpers": "^0.4.2",
|
|
99
|
+
"@eslint/js": "^9.37.0",
|
|
100
|
+
"@tanstack/eslint-plugin-query": "^5.91.4",
|
|
100
101
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
|
101
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
102
|
-
commander: "^14.0.
|
|
103
|
-
"eslint-config-flat-gitignore": "^2.1
|
|
102
|
+
"@typescript-eslint/eslint-plugin": "^8.46.0",
|
|
103
|
+
commander: "^14.0.3",
|
|
104
|
+
"eslint-config-flat-gitignore": "^2.2.1",
|
|
104
105
|
"eslint-config-prettier": "^10.1.8",
|
|
105
|
-
"eslint-plugin-antfu": "^3.
|
|
106
|
+
"eslint-plugin-antfu": "^3.2.2",
|
|
106
107
|
"eslint-plugin-import": "^2.32.0",
|
|
107
|
-
"eslint-plugin-jsdoc": "^
|
|
108
|
+
"eslint-plugin-jsdoc": "^62.7.1",
|
|
108
109
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
109
|
-
"eslint-plugin-n": "^17.
|
|
110
|
+
"eslint-plugin-n": "^17.24.0",
|
|
110
111
|
"eslint-plugin-react": "^7.37.5",
|
|
111
|
-
"eslint-plugin-react-hooks": "^
|
|
112
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
113
|
-
"eslint-plugin-react-you-might-not-need-an-effect": "^0.
|
|
114
|
-
"eslint-plugin-unicorn": "^
|
|
115
|
-
"eslint-plugin-unused-imports": "^4.
|
|
116
|
-
execa: "^9.6.
|
|
112
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
113
|
+
"eslint-plugin-react-refresh": "^0.4.26",
|
|
114
|
+
"eslint-plugin-react-you-might-not-need-an-effect": "^0.6.1",
|
|
115
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
116
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
117
|
+
execa: "^9.6.1",
|
|
117
118
|
"find-up-simple": "^1.0.1",
|
|
118
|
-
globals: "^16.
|
|
119
|
+
globals: "^16.5.0",
|
|
119
120
|
"is-interactive": "^2.0.0",
|
|
120
121
|
"local-pkg": "^1.1.2",
|
|
121
|
-
"package-manager-detector": "^1.
|
|
122
|
+
"package-manager-detector": "^1.6.0",
|
|
122
123
|
picocolors: "^1.1.1",
|
|
123
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
124
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
125
|
-
semver: "^7.7.
|
|
126
|
-
"typescript-eslint": "^8.
|
|
124
|
+
"prettier-plugin-packagejson": "^2.5.22",
|
|
125
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
126
|
+
semver: "^7.7.4",
|
|
127
|
+
"typescript-eslint": "^8.56.1"
|
|
127
128
|
},
|
|
128
129
|
devDependencies: {
|
|
129
|
-
"@commitlint/cli": "^
|
|
130
|
-
"@
|
|
131
|
-
"@
|
|
130
|
+
"@commitlint/cli": "^20.4.3",
|
|
131
|
+
"@commitlint/types": "^20.4.3",
|
|
132
|
+
"@eslint/config-inspector": "^1.5.0",
|
|
133
|
+
"@next/eslint-plugin-next": "^15.5.12",
|
|
132
134
|
"@semantic-release/git": "^10.0.1",
|
|
133
|
-
"@types/node": "^
|
|
134
|
-
"@types/semver": "^7.7.
|
|
135
|
+
"@types/node": "^25.3.5",
|
|
136
|
+
"@types/semver": "^7.7.1",
|
|
137
|
+
"@typescript-eslint/utils": "^8.56.1",
|
|
138
|
+
"@typescript/native-preview": "^7.0.0-dev.20251012.1",
|
|
135
139
|
"@vitest/coverage-v8": "^3.2.4",
|
|
136
140
|
"@vitest/ui": "^3.2.4",
|
|
137
|
-
eslint: "^9.
|
|
141
|
+
eslint: "^9.39.4",
|
|
138
142
|
husky: "^9.1.7",
|
|
139
|
-
knip: "^5.
|
|
140
|
-
"lint-staged": "^16.
|
|
141
|
-
"pkg-pr-new": "^0.0.
|
|
142
|
-
prettier: "^3.
|
|
143
|
-
"semantic-release": "^
|
|
144
|
-
tsup: "^8.5.
|
|
145
|
-
tsx: "^4.
|
|
146
|
-
typescript: "^5.9.
|
|
143
|
+
knip: "^5.86.0",
|
|
144
|
+
"lint-staged": "^16.3.2",
|
|
145
|
+
"pkg-pr-new": "^0.0.60",
|
|
146
|
+
prettier: "^3.8.1",
|
|
147
|
+
"semantic-release": "^25.0.3",
|
|
148
|
+
tsup: "^8.5.1",
|
|
149
|
+
tsx: "^4.21.0",
|
|
150
|
+
typescript: "^5.9.3",
|
|
147
151
|
vitest: "^3.2.4"
|
|
148
152
|
},
|
|
149
153
|
peerDependencies: {
|
|
150
|
-
"@next/eslint-plugin-next": ">=12.3.0
|
|
154
|
+
"@next/eslint-plugin-next": ">=12.3.0",
|
|
151
155
|
eslint: ">=9.0.0 <10.0.0"
|
|
152
156
|
},
|
|
153
|
-
packageManager: "npm@11.
|
|
157
|
+
packageManager: "npm@11.11.0",
|
|
154
158
|
engines: {
|
|
155
159
|
node: "^20.19.0 || >=22.12.0"
|
|
156
160
|
},
|
|
@@ -288,7 +292,8 @@ var PackageJson = class {
|
|
|
288
292
|
async save() {
|
|
289
293
|
await (0, import_promises.writeFile)(
|
|
290
294
|
import_node_path2.default.join(projectRoot(), "package.json"),
|
|
291
|
-
JSON.stringify(this.json, null, 2)
|
|
295
|
+
`${JSON.stringify(this.json, null, 2)}
|
|
296
|
+
`
|
|
292
297
|
);
|
|
293
298
|
}
|
|
294
299
|
async addScriptIfNotExists(name, script) {
|
|
@@ -505,16 +510,16 @@ jobs:
|
|
|
505
510
|
cp .env.example .env
|
|
506
511
|
node ace generate:key
|
|
507
512
|
${withCommitlint ? commitLintCi() : ""}
|
|
508
|
-
- name:
|
|
513
|
+
- name: Check formatting
|
|
509
514
|
run: npm run format:check
|
|
510
515
|
if: always()
|
|
511
516
|
|
|
512
|
-
- name:
|
|
517
|
+
- name: Lint code
|
|
513
518
|
run: npm run lint
|
|
514
519
|
if: always()
|
|
515
520
|
|
|
516
521
|
- name: Check types
|
|
517
|
-
run: npm run
|
|
522
|
+
run: npm run types:check
|
|
518
523
|
if: always()
|
|
519
524
|
|
|
520
525
|
- name: Run tests
|
|
@@ -523,7 +528,8 @@ ${withCommitlint ? commitLintCi() : ""}
|
|
|
523
528
|
|
|
524
529
|
- name: Build
|
|
525
530
|
run: npm run build
|
|
526
|
-
if: always()
|
|
531
|
+
if: always()
|
|
532
|
+
`;
|
|
527
533
|
|
|
528
534
|
// src/cli/templates/adonis-ci-migrations.ts
|
|
529
535
|
var adonisMigrationsCi = () => `name: Migration check
|
|
@@ -616,16 +622,16 @@ jobs:
|
|
|
616
622
|
- name: Install dependencies
|
|
617
623
|
run: npm ci
|
|
618
624
|
${withCommitlint ? commitLintCi() : ""}
|
|
619
|
-
- name:
|
|
625
|
+
- name: Check formatting
|
|
620
626
|
run: npm run format:check
|
|
621
627
|
if: always()
|
|
622
628
|
|
|
623
|
-
- name:
|
|
629
|
+
- name: Lint code
|
|
624
630
|
run: npm run lint
|
|
625
631
|
if: always()
|
|
626
632
|
|
|
627
633
|
- name: Check types
|
|
628
|
-
run: npm run
|
|
634
|
+
run: npm run types:check
|
|
629
635
|
if: always()
|
|
630
636
|
|
|
631
637
|
- name: Run tests
|
|
@@ -638,7 +644,8 @@ ${withCommitlint ? commitLintCi() : ""}
|
|
|
638
644
|
|
|
639
645
|
- name: Build
|
|
640
646
|
run: npm run build
|
|
641
|
-
if: always()
|
|
647
|
+
if: always()
|
|
648
|
+
`;
|
|
642
649
|
|
|
643
650
|
// src/cli/templates/nextjs-ci.ts
|
|
644
651
|
var nextJsCi = () => `
|
|
@@ -676,18 +683,27 @@ jobs:
|
|
|
676
683
|
uses: actions/setup-node@v4
|
|
677
684
|
with:
|
|
678
685
|
node-version: ${nodeVersion}
|
|
679
|
-
cache:
|
|
686
|
+
cache: "npm"
|
|
680
687
|
${usingNextJs ? nextJsCi() : ""}
|
|
681
688
|
- name: Install dependencies
|
|
682
689
|
run: npm ci
|
|
683
690
|
${withCommitlint ? commitLintCi() : ""}
|
|
684
|
-
- name:
|
|
691
|
+
- name: Check formatting
|
|
685
692
|
run: npm run format:check
|
|
686
693
|
if: always()
|
|
687
694
|
|
|
695
|
+
- name: Lint code
|
|
696
|
+
run: npm run lint
|
|
697
|
+
if: always()
|
|
698
|
+
|
|
699
|
+
- name: Check types
|
|
700
|
+
run: npm run types:check
|
|
701
|
+
if: always()
|
|
702
|
+
|
|
688
703
|
- name: Build
|
|
689
704
|
run: npm run build
|
|
690
|
-
if: always()
|
|
705
|
+
if: always()
|
|
706
|
+
`;
|
|
691
707
|
|
|
692
708
|
// src/cli/install-ga.ts
|
|
693
709
|
var packageJson4 = new PackageJson();
|
|
@@ -728,6 +744,9 @@ var installGithubActions = async () => {
|
|
|
728
744
|
usingNextJs
|
|
729
745
|
})
|
|
730
746
|
);
|
|
747
|
+
if (usingNextJs) {
|
|
748
|
+
await packageJson4.addScriptIfNotExists("types:generate", "next typegen");
|
|
749
|
+
}
|
|
731
750
|
}
|
|
732
751
|
if (type === "nestjs") {
|
|
733
752
|
await fs2.writeFile(
|
|
@@ -747,7 +766,7 @@ var installGithubActions = async () => {
|
|
|
747
766
|
await packageJson4.addScriptIfNotExists("format:check", "prettier --check .");
|
|
748
767
|
await packageJson4.addScriptIfNotExists("lint", "eslint . --max-warnings=0");
|
|
749
768
|
await packageJson4.addScriptIfNotExists("format", "prettier --write .");
|
|
750
|
-
await packageJson4.addScriptIfNotExists("
|
|
769
|
+
await packageJson4.addScriptIfNotExists("types:check", "tsc --noEmit");
|
|
751
770
|
p4.note("Dodano konfiguracj\u0119 CI i skrypty.");
|
|
752
771
|
};
|
|
753
772
|
|