@yunarch/config-web 0.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/LICENSE.md +21 -0
- package/README.md +322 -0
- package/dist/cli/chunk-PWSW557X.js +1 -0
- package/dist/cli/openapi-sync/index.js +134 -0
- package/dist/cli/turbo-select/index.js +5 -0
- package/dist/formatters/biome.config.json +1 -0
- package/dist/formatters/prettier.config.js +1 -0
- package/dist/index.js +1 -0
- package/dist/linters/eslint.config.d.ts +11162 -0
- package/dist/linters/eslint.config.js +1 -0
- package/dist/linters/oxlint.config.json +1 -0
- package/dist/ts/reset.d.ts +8 -0
- package/dist/ts/tsconfig-base.json +1 -0
- package/package.json +130 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FlatConfigComposer as J}from"eslint-flat-config-utils";import C from"globals";import{default as v}from"@eslint/js";import{default as g}from"@vitest/eslint-plugin";import{default as k}from"eslint-config-prettier";import{default as b}from"eslint-plugin-import-x";import{default as m}from"eslint-plugin-jsdoc";import{default as j}from"eslint-plugin-oxlint";import{default as I}from"eslint-plugin-perfectionist";import{default as w}from"eslint-plugin-unicorn";import{default as S}from"eslint-plugin-unused-imports";import{default as f}from"typescript-eslint";function _(e={},r,t){let o=e.linterOptions??{};return[{name:"yunarch/base/ignores",ignores:["**/node_modules/","**/dist/","**/out/","**/output","**/.output","**/build/","**/*.min.*","**/.yarn/","**/.yarnrc.yml","**/package-lock.json","**/yarn.lock","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/*.log","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*",".pnp.*","**/.pnp","**/.pnp.js","**/.pnp.cjs","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.turbo/","**/.DS_Store","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/mockServiceWorker.js","**/CHANGELOG*.md","**/LICENSE*",...r??[]]},{name:"yunarch/base/setup",languageOptions:{ecmaVersion:2022,globals:{...C.browser,...C.es2021,...C.node,document:"readonly",navigator:"readonly",window:"readonly"},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:"module"},sourceType:"module"},linterOptions:{...o,reportUnusedDisableDirectives:t?!1:o.reportUnusedDisableDirectives??!0}},{name:"yunarch/base/rules",plugins:{"unused-imports":S},rules:{...v.configs.recommended.rules,"array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error",camelcase:["error",{allow:["^UNSAFE_"],ignoreDestructuring:!1,properties:"never"}],curly:["error","multi-line","consistent"],"default-case-last":"error",eqeqeq:"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constant-binary-expression":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["error",{allow:["!!","+"]}],"no-implied-eval":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-nested-ternary":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-param-reassign":"error","no-promise-executor-return":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-sequences":"error","no-template-curly-in-string":"error","no-undef-init":"warn","no-unneeded-ternary":"error","no-unreachable-loop":"error","no-unused-expressions":"error","no-unused-vars":["error",{args:"none",caughtErrors:"none",ignoreRestSiblings:!0,vars:"all"}],"no-useless-call":"error","no-useless-computed-key":"warn","no-useless-concat":"error","no-useless-rename":"warn","no-useless-return":"warn","no-var":"error","no-void":["error",{allowAsStatement:!0}],"object-shorthand":"warn","prefer-const":"warn","prefer-named-capture-group":"error","prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-regex-literals":"error","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"warn","symbol-description":"error","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["error",{args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0,vars:"all",varsIgnorePattern:"^_"}],yoda:"warn"}}]}var y="**/*.?([cm])[jt]s?(x)",u="?([cm])[jt]s?(x)",F="**/*.d.?([cm])ts",l="**/*.?([cm])ts",c="**/*.?([cm])tsx",x="**/*.astro/*.ts",h="**/*.md",A=[`**/__tests__/**/*.${u}`,`**/*.spec.${u}`,`**/*.test.${u}`,`**/*.bench.${u}`,`**/*.benchmark.${u}`];function G(e){let{oxlint:r}=e;return[{name:"yunarch/disables/cli",files:[`**/scripts/${y}`,`**/tasks/${y}`,`**/bin/${y}`,`**/bin.${u}`,`**/cli/${y}`,`**/cli.${u}`],rules:{"@typescript-eslint/no-floating-promises":"off","no-console":"off","unicorn/no-process-exit":"off"}},{name:"yunarch/disables/dts",files:[F],rules:{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off","no-restricted-syntax":"off","unused-imports/no-unused-vars":"off"}},{name:"yunarch/disables/prettier",rules:{...k.rules}},...r?.oxlintConfigPath?j.buildFromOxlintConfigFile(r.oxlintConfigPath):[]]}function P(){return[{name:"yunarch/import/rules",plugins:{import:b},rules:{...b.flatConfigs.recommended.rules,"import/first":"error","import/newline-after-import":["error",{count:1}],"import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{ignoreExternal:!1,maxDepth:3}],"import/no-duplicates":["error",{"prefer-inline":!0}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-relative-packages":"error","import/no-self-import":"error","import/no-useless-path-segments":"error"}},{name:"yunarch/import/typescript/rules",files:[l,c],rules:{...b.flatConfigs.typescript.rules},settings:{"import-x/resolver":{typescript:!0}}}]}function E(){return[{name:"yunarch/jsdoc/rules",plugins:{jsdoc:m},rules:{...m.configs["flat/recommended-error"].rules,"jsdoc/check-param-names":["error",{checkDestructured:!1}],"jsdoc/lines-before-block":["error",{lines:0}],"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-param":["error",{checkDestructured:!1,enableRestElementFixer:!1}],"jsdoc/require-throws":"error","jsdoc/tag-lines":["error","any",{startLines:1}]}},{name:"yunarch/jsdoc/typescript/rules",files:[l,c],rules:{...m.configs["flat/recommended-typescript-error"].rules,...m.configs["flat/contents-typescript-error"].rules,...m.configs["flat/logical-typescript-error"].rules,...m.configs["flat/stylistic-typescript-error"].rules,"jsdoc/require-hyphen-before-param-description":["error","always"],"jsdoc/require-throws":"error"}}]}function L(){return[{name:"yunarch/perfectionist/rules",plugins:{perfectionist:I},rules:{"perfectionist/sort-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-imports":["error",{groups:["builtin","external","internal",["parent","sibling","index"],"side-effect","object","unknown"],newlinesBetween:"never",order:"asc",type:"natural"}],"perfectionist/sort-named-exports":["error",{order:"asc",type:"natural"}],"perfectionist/sort-named-imports":["error",{groupKind:"values-first",order:"asc",type:"natural"}],"import/order":"off","import-x/order":"off","sort-imports":"off"}}]}async function p(e){let r=await e;return typeof r=="object"&&r&&"default"in r?r.default:r}async function B(e){let[r,t,o]=await Promise.all([p(import("@eslint-react/eslint-plugin")),p(import("eslint-plugin-react-hooks")),p(import("eslint-plugin-react-refresh"))]),s=r.configs.all.plugins;return[{name:"yunarch/react/setup",plugins:{"@eslint-react":s["@eslint-react"],"@eslint-react/dom":s["@eslint-react/dom"],"@eslint-react/hooks-extra":s["@eslint-react/hooks-extra"],"@eslint-react/naming-convention":s["@eslint-react/naming-convention"],"@eslint-react/web-api":s["@eslint-react/web-api"],"react-hooks":t,"react-refresh":o}},{name:"yunarch/react/rules",files:[y],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}},sourceType:"module"},rules:{...r.configs.recommended.rules,...t.configs.recommended.rules,...o.configs.recommended.rules}},...e.isTypescriptEnabled?[{name:"yunarch/react/typescript/rules",files:[l,c],ignores:[`${h}/**`,x],languageOptions:{parserOptions:{projectService:!0}},rules:{...r.configs["recommended-typescript"].rules,...e.isTypeAware?{...r.configs["recommended-type-checked"].rules}:{}}}]:[]]}async function D(e){let r=e===!0||e.enableQuery,t=e===!0||e.enableRouter,o=[];if(r){let s=await p(import("@tanstack/eslint-plugin-query"));o.push({name:"yunarch/tanstack/query/rules",plugins:{"@tanstack/query":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}if(t){let s=await p(import("@tanstack/eslint-plugin-router"));o.push({name:"yunarch/tanstack/router/rules",plugins:{"@tanstack/router":s},rules:{...s.configs["flat/recommended"].at(0)?.rules}})}return o}function R(e){let{enableTypeTesting:r}=e;return[{name:"yunarch/test/setup",plugins:{vitest:g},...r?{settings:{vitest:{typecheck:!0}},languageOptions:{globals:{...g.environments.env.globals}}}:{}},{name:"yunarch/test/rules",files:[...A],rules:{...g.configs.recommended.rules,"vitest/consistent-test-it":["error",{fn:"it",withinDescribe:"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"}}]}function N(e,r,t){return{name:e,files:r,...t.ignores?{ignores:t.ignores}:{},languageOptions:{parser:f.parser,parserOptions:{extraFileExtensions:t.extraFileExtensions?.map(o=>`.${o}`),sourceType:"module",...t.tsconfigPath?{projectService:{allowDefaultProject:["./*.js"],defaultProject:t.tsconfigPath},tsconfigRootDir:process.cwd()}:{},...t.parserOptions}}}}function $(e,r=[]){let t=[l,c],o=e.filesTypeAware??[l,c],s=e.ignoresTypeAware??[`${h}/**`,x];return[{name:"yunarch/typescript/setup",plugins:{"@typescript-eslint":f.plugin}},N("yunarch/typescript/parser",t,{ignores:void 0,extraFileExtensions:r,parserOptions:e.parserOptions}),...e.tsconfigPath?[N("yunarch/typescript/parser/type-aware",o,{ignores:s,extraFileExtensions:r,parserOptions:e.parserOptions,tsconfigPath:e.tsconfigPath})]:[],{name:"yunarch/typescript/rules",files:t,rules:{...f.configs.strict.at(-1)?.rules,...f.configs.stylistic.at(-1)?.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"separate-type-imports",prefer:"type-imports"}],"@typescript-eslint/default-param-last":"error","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/naming-convention":["error",{format:["PascalCase"],selector:["typeLike"]},{format:["UPPER_CASE"],selector:["enumMember"]},{custom:{match:!1,regex:"^I[A-Z]|^(Interface|Props|State)$"},format:["PascalCase"],selector:"interface"}],"@typescript-eslint/no-dupe-class-members":"error","@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"always"}],"@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-redeclare":["error",{builtinGlobals:!1}],"@typescript-eslint/no-shadow":"error","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":["error",{classes:!1,functions:!1,variables:!0}],"@typescript-eslint/no-useless-empty-export":"warn","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0,ignoreOverloadsWithDifferentJSDoc:!0}]}},...e.tsconfigPath&&!e.disableTypeAware?[{name:"yunarch/typescript/rules/type-aware",files:o,ignores:s,rules:{...f.configs.strictTypeCheckedOnly.at(-1)?.rules,...f.configs.stylisticTypeCheckedOnly.at(-1)?.rules,"@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:{attributes:!1}}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!0}],"@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowBoolean:!0}],"@typescript-eslint/switch-exhaustiveness-check":"warn"}}]:[]]}function U(){return[{name:"yunarch/unicorn/rules",plugins:{unicorn:w},rules:{...w.configs.recommended.rules,"unicorn/filename-case":["error",{cases:{camelCase:!0,kebabCase:!0,pascalCase:!0}}],"unicorn/no-array-reduce":"off","unicorn/prefer-number-properties":["error",{checkInfinity:!0,checkNaN:!0}],"unicorn/prefer-top-level-await":"warn","unicorn/prevent-abbreviations":"off"}}]}function K(e={},...r){let{gitignore:t=!0,ignores:o,extraFileExtensions:s,import:q=!0,jsdoc:W=!0,unicorn:X=!0,oxlint:O}=e,V=!!O,a=[];t&&(typeof t=="boolean"?a.push(p(import("eslint-config-flat-gitignore")).then(T=>[T({name:"yunarch/gitignore",strict:!1})])):a.push(p(import("eslint-config-flat-gitignore")).then(T=>[T({name:"yunarch/gitignore",...t})]))),a.push(_(e.base,o,V)),e.typescript&&a.push($(e.typescript===!0?{}:e.typescript,s)),q&&a.push(P()),W&&a.push(E()),X&&a.push(U()),e.test&&a.push(R(e.test===!0?{}:e.test)),e.tanstack&&a.push(D(e.tanstack)),e.react&&a.push(B({isTypescriptEnabled:!!e.typescript,isTypeAware:typeof e.typescript=="object"&&!!e.typescript.tsconfigPath&&!e.typescript.disableTypeAware})),a.push(L(),G({oxlint:O}));let d=new J;return d=d.append(...a,...r),d=d.renamePlugins({"import-x":"import"}),d}export{K as config};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ignorePatterns":["**/node_modules/","**/dist/","**/out/","**/output","**/.output","**/build/","**/*.min.*","**/.yarn/","**/.yarnrc.yml","**/package-lock.json","**/yarn.lock","**/bun.lock","**/bun.lockb","**/pnpm-lock.yaml","**/.vite-inspect","**/.vitepress/cache","**/vite.config.*.timestamp-*","**/*.log","**/npm-debug.log*","**/yarn-debug.log*","**/yarn-error.log*",".pnp.*","**/.pnp","**/.pnp.js","**/.pnp.cjs","**/coverage/","**/.nyc_output/","**/__snapshots__","**/.vscode/","**/.idea/","**/.cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.turbo/","**/.DS_Store","**/Thumbs.db","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/mockServiceWorker.js","**/CHANGELOG*.md","**/LICENSE*"],"plugins":["import","jsdoc","unicorn","vitest","react","react-hooks"],"rules":{"for-direction":"error","no-async-promise-executor":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":"error","no-const-assign":"error","no-constant-binary-expression":"error","no-constant-condition":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-class-members":"error","no-dupe-else-if":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-empty":"error","no-empty-character-class":"error","no-empty-pattern":"error","no-empty-static-block":"error","no-ex-assign":"error","no-extra-boolean-cast":"error","no-fallthrough":"error","no-func-assign":"error","no-global-assign":"error","no-import-assign":"error","no-invalid-regexp":"error","no-irregular-whitespace":"error","no-loss-of-precision":"error","no-new-native-nonconstructor":"error","no-nonoctal-decimal-escape":"error","no-obj-calls":"error","no-prototype-builtins":"error","no-redeclare":"error","no-regex-spaces":"error","no-self-assign":"error","no-setter-return":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-this-before-super":"error","no-unexpected-multiline":0,"no-unsafe-finally":"error","no-unsafe-negation":"error","no-unsafe-optional-chaining":"error","no-unused-labels":"error","no-unused-private-class-members":"error","no-unused-vars":["error",{"args":"none","caughtErrors":"none","ignoreRestSiblings":true,"vars":"all"}],"no-useless-backreference":"error","no-useless-catch":"error","no-useless-escape":"error","no-with":"error","require-yield":"error","use-isnan":"error","valid-typeof":"error","array-callback-return":["error",{"allowImplicit":true}],"block-scoped-var":"error","curly":0,"default-case-last":"error","eqeqeq":"error","func-names":["error","as-needed"],"grouped-accessor-pairs":"error","max-lines":["warn",300],"max-params":["warn",4],"new-cap":["error",{"capIsNew":false}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"error","no-caller":"error","no-console":"error","no-constructor-return":"error","no-else-return":"warn","no-eval":"error","no-extend-native":"error","no-extra-label":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"warn","no-multi-assign":"error","no-nested-ternary":"off","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-proto":"error","no-return-assign":"error","no-script-url":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unneeded-ternary":"error","no-unused-expressions":"error","no-useless-call":"error","no-useless-concat":"error","no-useless-rename":"warn","no-var":"error","no-void":["error",{"allowAsStatement":true}],"prefer-numeric-literals":"error","prefer-object-has-own":"error","prefer-object-spread":"warn","prefer-promise-reject-errors":["error",{"allowEmptyReject":true}],"prefer-rest-params":"error","prefer-spread":"error","symbol-description":"error","yoda":"warn","import/namespace":"error","import/default":"error","import/no-named-as-default":"warn","import/no-named-as-default-member":"warn","import/no-duplicates":["error",{"prefer-inline":true}],"import/first":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-cycle":["error",{"ignoreExternal":false,"maxDepth":3}],"import/no-dynamic-require":"error","import/no-mutable-exports":"error","import/no-self-import":"error","jsdoc/check-access":"error","jsdoc/check-property-names":"error","jsdoc/check-tag-names":"error","jsdoc/empty-tags":"error","jsdoc/implements-on-classes":"error","jsdoc/no-defaults":"error","jsdoc/require-param":["error",{"checkDestructured":false,"enableRestElementFixer":false}],"jsdoc/require-param-description":"error","jsdoc/require-param-name":"error","jsdoc/require-param-type":"error","jsdoc/require-property":"error","jsdoc/require-property-description":"error","jsdoc/require-property-name":"error","jsdoc/require-property-type":"error","jsdoc/require-returns":"error","jsdoc/require-returns-description":"error","jsdoc/require-returns-type":"error","jsdoc/require-yields":"error","no-negated-condition":"off","unicorn/catch-error-name":"error","unicorn/consistent-assert":"error","unicorn/consistent-date-clone":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/consistent-function-scoping":"error","unicorn/empty-brace-spaces":"off","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/filename-case":["error",{"cases":{"camelCase":true,"kebabCase":true,"pascalCase":true}}],"unicorn/new-for-builtins":"error","unicorn/no-abusive-eslint-disable":"error","unicorn/no-accessor-recursion":"error","unicorn/no-anonymous-default-export":"error","unicorn/no-array-for-each":"error","unicorn/no-array-reduce":"off","unicorn/no-await-expression-member":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-console-spaces":"error","unicorn/no-document-cookie":"error","unicorn/no-empty-file":"error","unicorn/no-hex-escape":"error","unicorn/no-invalid-fetch-options":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-magic-array-flat-depth":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-nested-ternary":"off","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-null":"error","unicorn/no-object-as-default-parameter":"error","unicorn/no-process-exit":"error","unicorn/no-single-promise-in-promise-methods":"error","unicorn/no-static-only-class":"error","unicorn/no-thenable":"error","unicorn/no-this-assignment":"error","unicorn/no-typeof-undefined":"error","unicorn/no-unnecessary-await":"error","unicorn/no-unnecessary-slice-end":"error","unicorn/no-unreadable-array-destructuring":"error","unicorn/no-unreadable-iife":"error","unicorn/no-useless-fallback-in-spread":"error","unicorn/no-useless-length-check":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-spread":"error","unicorn/no-useless-switch-case":"error","unicorn/no-useless-undefined":"error","unicorn/no-zero-fractions":"error","unicorn/number-literal-case":"off","unicorn/numeric-separators-style":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-array-some":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-code-point":"error","unicorn/prefer-date-now":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-dom-node-text-content":"error","unicorn/prefer-event-target":"error","unicorn/prefer-includes":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-math-trunc":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-native-coercion-functions":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":["error",{"checkInfinity":true,"checkNaN":true}],"unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-set-has":"error","unicorn/prefer-set-size":"error","unicorn/prefer-spread":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-structured-clone":"error","unicorn/prefer-type-error":"error","unicorn/require-array-join-separator":"error","unicorn/require-number-to-fixed-digits-argument":"error","unicorn/require-post-message-target-origin":"off","unicorn/switch-case-braces":"error","unicorn/text-encoding-identifier-case":"error","unicorn/throw-new-error":"error","sort-imports":"off"},"overrides":[{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description"}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-object-type":["error",{"allowInterfaces":"always"}],"@typescript-eslint/no-explicit-any":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-function-type":"error","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":"error","no-unused-vars":"off","@typescript-eslint/no-unused-vars":"off","no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-wrapper-object-types":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-namespace-keyword":"error","@typescript-eslint/triple-slash-reference":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/array-type":"error","@typescript-eslint/ban-tslint-comment":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/consistent-indexed-object-style":"error","@typescript-eslint/consistent-type-definitions":"off","@typescript-eslint/no-confusing-non-null-assertion":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/consistent-type-imports":["error",{"disallowTypeAnnotations":false,"fixStyle":"separate-type-imports","prefer":"type-imports"}],"@typescript-eslint/default-param-last":"error","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/no-dupe-class-members":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-redeclare":["error",{"builtinGlobals":false}],"@typescript-eslint/no-useless-empty-export":"warn"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"no-throw-literal":"off","prefer-promise-reject-errors":"off","require-await":"off"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"jsdoc/check-access":"error","jsdoc/check-property-names":"error","jsdoc/check-tag-names":"error","jsdoc/empty-tags":"error","jsdoc/implements-on-classes":"error","jsdoc/no-defaults":"error","jsdoc/require-param":"error","jsdoc/require-param-description":"error","jsdoc/require-param-name":"error","jsdoc/require-param-type":"off","jsdoc/require-property":"error","jsdoc/require-property-description":"error","jsdoc/require-property-name":"error","jsdoc/require-property-type":"off","jsdoc/require-returns":"error","jsdoc/require-returns-description":"error","jsdoc/require-returns-type":"off","jsdoc/require-yields":"error"}},{"files":["**/__tests__/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.spec.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.test.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.bench.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/*.benchmark.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"vitest/expect-expect":"error","vitest/no-identical-title":"error","vitest/no-commented-out-tests":"error","vitest/valid-expect":"error","vitest/valid-describe-callback":"error","vitest/require-local-test-context-for-concurrent-snapshots":"error","vitest/no-import-node-test":"error","vitest/consistent-test-it":["error",{"fn":"it","withinDescribe":"it"}],"vitest/prefer-hooks-in-order":"error","vitest/prefer-lowercase-title":"error"}},{"files":["**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"react/jsx-no-duplicate-props":"warn","react/no-array-index-key":"warn","react/no-direct-mutation-state":"error","react/no-string-refs":"error","react-hooks/rules-of-hooks":"error"}},{"files":["**/*.{ts,cts,mts}","**/*.{tsx,ctsx,mtsx}"],"rules":{"react/jsx-no-duplicate-props":"off","react/no-array-index-key":"warn","react/no-direct-mutation-state":"error","react/no-string-refs":"error"}},{"files":["**/scripts/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/tasks/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/bin.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli/**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}","**/cli.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,cts,ctsx,mts,mtjsx}"],"rules":{"no-console":"off","unicorn/no-process-exit":"off"}},{"files":["**/*.d.{ts,cts,mts}"],"rules":{"@typescript-eslint/consistent-indexed-object-style":"off","import/no-duplicates":"off"}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"display":"Base TypeScript Configuration","compilerOptions":{"target":"ESNext","module":"Preserve","composite":false,"skipLibCheck":true,"moduleResolution":"Bundler","isolatedModules":true,"inlineSources":false,"esModuleInterop":true,"declarationMap":true,"noEmit":true,"allowImportingTsExtensions":true,"strict":true,"strictNullChecks":true,"noUnusedLocals":false,"noUnusedParameters":false,"forceConsistentCasingInFileNames":true,"noUncheckedIndexedAccess":true,"declaration":true,"preserveWatchOutput":true},"exclude":["node_modules"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/package",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"name": "@yunarch/config-web",
|
|
5
|
+
"description": "Shared configurations for web projects.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"config",
|
|
8
|
+
"eslint",
|
|
9
|
+
"oxlint",
|
|
10
|
+
"prettier",
|
|
11
|
+
"biome",
|
|
12
|
+
"typescript",
|
|
13
|
+
"tooling"
|
|
14
|
+
],
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Adrian Lopez Gonzalez",
|
|
17
|
+
"url": "https://github.com/yunarch"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/yunarch/config-web"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/yunarch/config-web/issues"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"bun": ">=1",
|
|
28
|
+
"node": ">=22"
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"files": ["README.md", "LICENSE.md", "dist"],
|
|
32
|
+
"bin": {
|
|
33
|
+
"openapi-sync": "./dist/cli/openapi-sync/index.js",
|
|
34
|
+
"turbo-select": "./dist/cli/turbo-select/index.js"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": "./dist/index.js",
|
|
38
|
+
"./prettier": "./dist/formatters/prettier.config.js",
|
|
39
|
+
"./eslint": "./dist/linters/eslint.config.js",
|
|
40
|
+
"./oxlint": "./dist/linters/oxlint.config.json",
|
|
41
|
+
"./biome-formatter": "./dist/formatters/biome.config.json",
|
|
42
|
+
"./tsconfig-base": "./dist/ts/tsconfig-base.json",
|
|
43
|
+
"./reset.d.ts": "./dist/ts/reset.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"type": "module",
|
|
46
|
+
"scripts": {
|
|
47
|
+
"postinstall": "husky && bun run gen",
|
|
48
|
+
"gen": "bun run gen:eslint-typegen && bun run gen:oxlint-compatgen",
|
|
49
|
+
"gen:eslint-typegen": "bun run ./scripts/eslint-typegen.ts",
|
|
50
|
+
"gen:oxlint-compatgen": "bun run ./scripts/oxlint-compatgen.ts && prettier --write ./src/linters/oxlint.config.jsonc",
|
|
51
|
+
"lint": "turbo run lint:code lint:ts",
|
|
52
|
+
"lint:code": "oxlint && eslint .",
|
|
53
|
+
"lint:ts": "tsc --noEmit",
|
|
54
|
+
"lint:inspect": "bunx @eslint/config-inspector --config eslint.config.ts",
|
|
55
|
+
"format": "biome format && prettier \"**/*.{html,md,yaml,yml}\" --check",
|
|
56
|
+
"format:all": "biome format --write && prettier \"**/*.{html,md,yaml,yml}\" --write",
|
|
57
|
+
"clean": "rimraf dist coverage .turbo",
|
|
58
|
+
"build": "bun run gen && tsup",
|
|
59
|
+
"test": "vitest --typecheck run",
|
|
60
|
+
"test:watch": "vitest --typecheck watch",
|
|
61
|
+
"release": "turbo run build && bun publish --dry-run && bunx bumpp && bun publish"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@biomejs/biome": ">= 1 || < 2",
|
|
65
|
+
"prettier": ">= 3 || < 4",
|
|
66
|
+
"eslint": ">=9.5.0 || < 10",
|
|
67
|
+
"oxlint": ">=0.16.2 || < 1"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@biomejs/biome": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"prettier": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"eslint": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"oxlint": {
|
|
80
|
+
"optional": true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"commander": "14.0.0",
|
|
85
|
+
"ora": "8.2.0",
|
|
86
|
+
"@inquirer/confirm": "5.1.10",
|
|
87
|
+
"@inquirer/select": "4.2.1",
|
|
88
|
+
"@total-typescript/ts-reset": "0.6.1",
|
|
89
|
+
"globals": "16.1.0",
|
|
90
|
+
"eslint-flat-config-utils": "2.0.1",
|
|
91
|
+
"eslint-config-flat-gitignore": "2.1.0",
|
|
92
|
+
"eslint-import-resolver-typescript": "4.3.5",
|
|
93
|
+
"@eslint/js": "9.27.0",
|
|
94
|
+
"typescript-eslint": "8.32.1",
|
|
95
|
+
"eslint-plugin-unicorn": "59.0.1",
|
|
96
|
+
"eslint-plugin-perfectionist": "4.13.0",
|
|
97
|
+
"eslint-plugin-import-x": "4.12.2",
|
|
98
|
+
"eslint-plugin-unused-imports": "4.1.4",
|
|
99
|
+
"eslint-plugin-jsdoc": "50.6.17",
|
|
100
|
+
"eslint-config-prettier": "10.1.5",
|
|
101
|
+
"eslint-plugin-oxlint": "0.16.11",
|
|
102
|
+
"@eslint-react/eslint-plugin": "1.49.0",
|
|
103
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
104
|
+
"eslint-plugin-react-refresh": "0.4.20",
|
|
105
|
+
"@tanstack/eslint-plugin-query": "5.74.7",
|
|
106
|
+
"@tanstack/eslint-plugin-router": "1.115.0",
|
|
107
|
+
"@vitest/eslint-plugin": "1.2.0"
|
|
108
|
+
},
|
|
109
|
+
"devDependencies": {
|
|
110
|
+
"@commitlint/cli": "19.8.1",
|
|
111
|
+
"@commitlint/config-conventional": "19.8.1",
|
|
112
|
+
"prettier": "3.5.3",
|
|
113
|
+
"@biomejs/biome": "1.9.4",
|
|
114
|
+
"eslint": "9.27.0",
|
|
115
|
+
"eslint-typegen": "2.2.0",
|
|
116
|
+
"oxlint": "0.16.11",
|
|
117
|
+
"husky": "9.1.7",
|
|
118
|
+
"lint-staged": "16.0.0",
|
|
119
|
+
"rimraf": "6.0.1",
|
|
120
|
+
"tsup": "8.5.0",
|
|
121
|
+
"turbo": "2.5.3",
|
|
122
|
+
"typescript": "5.8.3",
|
|
123
|
+
"vitest": "3.1.4",
|
|
124
|
+
"@types/node": "22.15.20"
|
|
125
|
+
},
|
|
126
|
+
"publishConfig": {
|
|
127
|
+
"access": "public"
|
|
128
|
+
},
|
|
129
|
+
"packageManager": "bun@1.2.13"
|
|
130
|
+
}
|