@lntvow/eslint-config 9.23.0 → 9.23.2

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/index.cjs CHANGED
@@ -1,2 +1 @@
1
- "use strict";var ve=Object.create;var w=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var we=(e,r)=>{for(var o in r)w(e,o,{get:r[o],enumerable:!0})},X=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ye(r))!be.call(e,n)&&n!==o&&w(e,n,{get:()=>r[n],enumerable:!(s=ge(r,n))||s.enumerable});return e};var p=(e,r,o)=>(o=e!=null?ve(xe(e)):{},X(r||!e||!e.__esModule?w(o,"default",{value:e,enumerable:!0}):o,e)),Oe=e=>X(w({},"__esModule",{value:!0}),e);var Ue={};we(Ue,{GLOB_ALL_SRC:()=>Ee,GLOB_ASTRO:()=>Ge,GLOB_CSS:()=>_e,GLOB_EXCLUDE:()=>k,GLOB_GRAPHQL:()=>Be,GLOB_HTML:()=>Z,GLOB_JS:()=>Te,GLOB_JSON:()=>J,GLOB_JSON5:()=>H,GLOB_JSONC:()=>Fe,GLOB_JSX:()=>Ce,GLOB_LESS:()=>Se,GLOB_MARKDOWN:()=>F,GLOB_MARKDOWN_CODE:()=>Pe,GLOB_MARKDOWN_IN_MARKDOWN:()=>Ie,GLOB_POSTCSS:()=>Le,GLOB_SCSS:()=>je,GLOB_SRC:()=>d,GLOB_SRC_EXT:()=>u,GLOB_STYLE:()=>W,GLOB_SVELTE:()=>Y,GLOB_TESTS:()=>I,GLOB_TOML:()=>ke,GLOB_TS:()=>S,GLOB_TSX:()=>j,GLOB_VUE:()=>O,GLOB_XML:()=>Q,GLOB_YAML:()=>z,combine:()=>he,custom:()=>L,disables:()=>G,gitignore:()=>B,ignores:()=>P,imports:()=>E,javascript:()=>R,lntvow:()=>de,notInRecommendedRules:()=>se,prettier:()=>q,regexp:()=>A,renameRules:()=>_,stylistic:()=>V,test:()=>U,typescript:()=>$,vue:()=>M});module.exports=Oe(Ue);function _(e,r){return Object.fromEntries(Object.entries(e).map(([o,s])=>{for(let[n,i]of Object.entries(r))if(o.startsWith(`${n}/`))return[i+o.slice(n.length),s];return[o,s]}))}async function he(...e){return(await Promise.all(e)).flat()}var K=p(require("@lntvow/eslint-plugin"),1);async function L(){return[{name:"lntvow/custom/setup",plugins:{lntvow:K.default}}]}var u="?([cm])[jt]s?(x)",d="**/*.?([cm])[jt]s?(x)",Te="**/*.?([cm])js",Ce="**/*.?([cm])jsx",S="**/*.?([cm])ts",j="**/*.?([cm])tsx",W="**/*.{c,le,sc}ss",_e="**/*.css",Le="**/*.{p,post}css",Se="**/*.less",je="**/*.scss",J="**/*.json",H="**/*.json5",Fe="**/*.jsonc",F="**/*.md",Ie="**/*.md/*.md",Y="**/*.svelte",O="**/*.vue",z="**/*.y?(a)ml",ke="**/*.toml",Q="**/*.xml",Z="**/*.htm?(l)",Ge="**/*.astro",Be="**/*.{g,graph}ql",Pe=`${F}/${d}`,I=[`**/__tests__/**/*.${u}`,`**/*.spec.${u}`,`**/*.test.${u}`,`**/*.bench.${u}`,`**/*.benchmark.${u}`],Ee=[d,W,J,H,F,Y,O,z,Q,Z],k=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];async function G(){return[{files:[`scripts/${d}`],name:"lntvow/disables/scripts",rules:{"no-console":"off"}},{files:[`cli/${d}`,`cli.${u}`],name:"lntvow/disables/cli",rules:{"no-console":"off"}},{files:["**/*.d.?([cm])ts"],name:"lntvow/disables/dts",rules:{}},{files:["**/*.{test,spec}.([tj])s?(x)"],name:"lntvow/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs"],name:"lntvow/disables/cjs",rules:{"ts/no-require-imports":"off"}}]}var ee=p(require("fs"),1),re=require("@lntvow/utils"),oe=require("@eslint/compat");async function B(e){let{findUpSync:r}=await import("find-up-simple"),{name:o=".gitignore",root:s=!1,files:n=s?o:r(o)||[],strict:i=!1}=e,c=(0,re.castArray)(n),g=[];for(let T of c){let x;try{x=ee.default.readFileSync(T,"utf8")}catch(f){if(i)throw f;continue}let a=x.split(/\r?\n/u);g.push(...a.map(f=>f.trim()).filter(f=>f&&!f.startsWith("#")).map(oe.convertIgnorePatternToMinimatch))}if(i&&c.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:g}]}async function P(e=[]){return[{name:"lntvow/ignores",ignores:[...k,...e]}]}var te=p(require("eslint-plugin-import-x"),1);async function E(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:te.default}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}var ne=p(require("@eslint/js"),1),sr=require("globals");async function R(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:2022,sourceType:"module",parserOptions:{ecmaVersion:2022,sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...ne.default.configs.recommended.rules,...se,"no-unused-vars":"warn",...r}}]}var se={"array-callback-return":"error","no-await-in-loop":"off","no-constructor-return":"error","no-duplicate-imports":"error","no-inner-declarations":"error","no-promise-executor-return":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{functions:!1,variables:!1}],"no-useless-assignment":"off","require-atomic-updates":"off","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"warn","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"off","consistent-this":"off",curly:["error","multi-line"],"default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","func-name-matching":"error","func-names":"off","func-style":"off","grouped-accessor-pairs":"error","guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","logical-assignment-operators":"error","max-classes-per-file":"off","max-depth":"off","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"off","max-params":"off","max-statements":"off","new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"off","no-caller":"error","no-console":"warn","no-continue":"off","no-div-regex":"error","no-else-return":"error","no-empty-function":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-inline-comments":"off","no-invalid-this":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-magic-numbers":"off","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"off","no-nested-ternary":"off","no-new":"off","no-new-func":"error","no-new-wrappers":"error","no-object-constructor":"error","no-octal-escape":"error","no-param-reassign":"off","no-plusplus":"off","no-proto":"error","no-restricted-exports":"off","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-imports":"off","no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":"off","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow":0,"no-ternary":"off","no-throw-literal":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"off","no-unneeded-ternary":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-useless-call":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"off","no-warning-comments":"off","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-named-capture-group":"off","prefer-numeric-literals":"off","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"off","prefer-regex-literals":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"off","require-await":"off","require-unicode-regexp":"off","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:"off","symbol-description":"error","vars-on-top":"error",yoda:"error","unicode-bom":"error"};var ie=p(require("eslint-plugin-prettier"),1),ae=p(require("eslint-config-prettier"),1);async function q(){return[{name:"lntvow/prettier/setup",plugins:{prettier:ie.default}},{name:"lntvow/prettier/rules",rules:{...ae.default.rules,"prettier/prettier":"warn"}}]}var N=require("eslint-plugin-regexp");async function A(e={}){let{overrides:r}=e,o=N.configs["flat/recommended"].plugins.regexp,{rules:s}=N.configs["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:o}},{name:"lntvow/regexp/rules",rules:{...s,...r}}]}var pe=p(require("@stylistic/eslint-plugin"),1);async function V(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:pe.default}},{name:"lntvow/stylistic/rules",rules:{"style/spaced-comment":"error","style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:"cjs-export"},{blankLine:"always",prev:"*",next:"export"},{blankLine:"always",prev:"*",next:"function"},{blankLine:"always",prev:"*",next:["interface","type"]},{blankLine:"never",prev:"function-overload",next:"function"}],"style/lines-around-comment":[2,{beforeBlockComment:!0,allowBlockStart:!0,allowObjectStart:!0,allowInterfaceStart:!0,allowTypeStart:!0,allowArrayStart:!0,allowClassStart:!0,allowModuleStart:!0}],...r}}]}var le=p(require("eslint-plugin-vitest"),1);async function U(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:le.default}},{name:"lntvow/test/rules",files:[...I],rules:{"lntvow/newline-before-describe-test":"error",...r}}]}var v=require("typescript-eslint");async function $(e={}){let{componentExts:r=[],overrides:o={},parserOptions:s={}}=e,n=[S,j,...r.map(i=>`**/*.${i}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:v.plugin}},{name:"lntvow/typescript/rules",languageOptions:{parser:v.parser,parserOptions:{sourceType:"module"}},files:n,rules:{..._(v.configs.strict.map(i=>i.rules).filter(Boolean).reduce((i,c)=>({...i,...c}),{}),{"@typescript-eslint":"ts"}),"ts/no-non-null-assertion":"off","ts/no-explicit-any":"off","ts/ban-ts-comment":"off","ts/no-unused-vars":"warn","no-use-before-define":"off","ts/no-use-before-define":["error",{functions:!1,variables:!1}],"no-unused-expressions":"off","ts/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],...o}}]}var fe=require("local-pkg"),D=require("typescript-eslint"),ue=p(require("vue-eslint-parser"),1),l=p(require("eslint-plugin-vue"),1);var Re={...l.default.configs["vue3-essential"].rules,...l.default.configs["vue3-strongly-recommended"].rules,...l.default.configs["vue3-recommended"].rules,"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/component-api-style":"error","vue/no-deprecated-model-definition":"error"},qe={...l.default.configs.essential.rules,...l.default.configs["strongly-recommended"].rules,...l.default.configs.recommended.rules,"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}]};async function M(e={}){let{overrides:r={},vueVersion:o=Ne()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l.default}},{name:"lntvow/vue/rules",languageOptions:{parser:ue.default,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:D.parser,tsx:D.parser},sourceType:"module"}},processor:l.default.processors[".vue"],files:[O],rules:{...l.default.configs.base.rules,...o===3?Re:qe,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":"off","vue/html-indent":"off","vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"off","vue/v-on-event-hyphenation":"off","vue/block-tag-newline":"error","vue/component-name-in-template-casing":["error","PascalCase",{ignores:["/-/"]}],"vue/component-options-name-casing":"error","vue/custom-event-name-casing":"error","vue/define-emits-declaration":"error","vue/define-macros-order":"error","vue/define-props-declaration":"error","vue/enforce-style-attribute":"error","vue/html-button-has-type":"off","vue/html-comment-content-newline":"error","vue/html-comment-content-spacing":"error","vue/html-comment-indent":"off","vue/match-component-file-name":["error",{extensions:["jsx","tsx"],shouldMatchCase:!0}],"vue/match-component-import-name":"error","vue/max-lines-per-block":"off","vue/max-props":"off","vue/max-template-depth":"off","vue/new-line-between-multi-line-property":"off","vue/next-tick-style":"off","vue/no-bare-strings-in-template":"off","vue/no-boolean-default":"off","vue/no-deprecated-model-definition":"error","vue/no-duplicate-attr-inheritance":"error","vue/no-empty-component-block":"off","vue/no-multiple-objects-in-class":"error","vue/no-potential-component-option-typo":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-required-prop-with-default":"error","vue/no-restricted-block":"off","vue/no-restricted-call-after-await":"off","vue/no-restricted-class":"off","vue/no-restricted-component-names":"off","vue/no-restricted-component-options":"off","vue/no-restricted-custom-event":"off","vue/no-restricted-html-elements":"off","vue/no-restricted-props":"off","vue/no-restricted-static-attribute":"off","vue/no-restricted-v-bind":"off","vue/no-root-v-if":"off","vue/no-setup-props-reactivity-loss":"error","vue/no-static-inline-styles":"error","vue/no-template-target-blank":"error","vue/no-this-in-before-route-enter":"error","vue/no-undef-components":"off","vue/no-undef-properties":"error","vue/no-unsupported-features":"off","vue/no-unused-emit-declarations":"error","vue/no-unused-properties":["warn",{groups:["props","data","computed","methods","setup"]}],"vue/no-unused-refs":"error","vue/no-use-v-else-with-v-for":"error","vue/no-useless-mustaches":"error","vue/no-useless-v-bind":"error","vue/no-v-text":"error","vue/padding-line-between-blocks":"error","vue/padding-line-between-tags":["error",[{blankLine:"never",prev:"*",next:"*"}]],"vue/padding-lines-in-component-definition":["error",{betweenOptions:"never"}],"vue/prefer-define-options":"error","vue/prefer-prop-type-boolean-first":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/require-default-export":"off","vue/require-direct-export":"error","vue/require-emit-validator":"off","vue/require-explicit-slots":"off","vue/require-expose":"error","vue/require-macro-variable-name":"error","vue/require-name-property":"off","vue/require-prop-comment":"off","vue/require-typed-object-prop":"error","vue/require-typed-ref":"error","vue/script-indent":"off","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-on-handler-style":"off","vue/valid-define-options":"error","vue/array-bracket-newline":"off","vue/array-bracket-spacing":"off","vue/array-element-newline":"off","vue/arrow-spacing":"off","vue/block-spacing":"off","vue/brace-style":"off","vue/camelcase":"error","vue/comma-dangle":"off","vue/comma-spacing":"off","vue/comma-style":"off","vue/dot-location":"off","vue/dot-notation":"error","vue/eqeqeq":"error","vue/func-call-spacing":"off","vue/key-spacing":"off","vue/keyword-spacing":"off","vue/max-len":"off","vue/multiline-ternary":"off","vue/no-console":"off","vue/no-constant-condition":"error","vue/no-extra-parens":"off","vue/no-empty-pattern":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-restricted-syntax":"off","vue/no-sparse-arrays":"error","vue/no-useless-concat":"error","vue/object-curly-newline":"off","vue/object-curly-spacing":"off","vue/object-property-newline":"off","vue/object-shorthand":"error","vue/operator-linebreak":"off","vue/prefer-template":"error","vue/quote-props":"off","vue/space-in-parens":"off","vue/space-infix-ops":"off","vue/space-unary-ops":"off","vue/template-curly-spacing":"off",...r}}]}function Ne(){let e=(0,fe.getPackageInfoSync)("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}var ce=require("eslint-flat-config-utils"),me=require("@lntvow/utils"),h=require("local-pkg");var Ae=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Ve={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function de(e={},...r){if("files"in e)throw new Error('[@lntvow/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let{autoRenamePlugins:o=!0,componentExts:s=[],gitignore:n=!0,regexp:i=!0,typescript:c=(0,h.isPackageExists)("typescript"),vue:g=["vue","nuxt","vitepress"].some(b=>(0,h.isPackageExists)(b)),test:T=(0,h.isPackageExists)("vitest"),stylistic:x=!0}=e,a=[];a.push(P(e.ignores),L(),R({...m(e,"javascript")}),E({typescript:!!c})),n&&a.push(B({...m(e,"gitignore")})),g&&s.push("vue"),c&&a.push($({...m(e,"typescript"),componentExts:s})),g&&a.push(M({...m(e,"vue")})),i&&a.push(A({...m(e,"regexp")})),T&&a.push(U({...m(e,"test")})),x&&a.push(V({...m(e,"stylistic")})),a.push(q(),G());let f=Ae.reduce((b,C)=>(C in e&&(b[C]=e[C]),b),{});Object.keys(f).length&&a.push([f]);let y=new ce.FlatConfigComposer;return y=y.append(...a,...r),o&&(y=y.renamePlugins(Ve)),y}function m(e,r){return(0,me.isBoolean)(e[r])?{}:e[r]||{}}0&&(module.exports={GLOB_ALL_SRC,GLOB_ASTRO,GLOB_CSS,GLOB_EXCLUDE,GLOB_GRAPHQL,GLOB_HTML,GLOB_JS,GLOB_JSON,GLOB_JSON5,GLOB_JSONC,GLOB_JSX,GLOB_LESS,GLOB_MARKDOWN,GLOB_MARKDOWN_CODE,GLOB_MARKDOWN_IN_MARKDOWN,GLOB_POSTCSS,GLOB_SCSS,GLOB_SRC,GLOB_SRC_EXT,GLOB_STYLE,GLOB_SVELTE,GLOB_TESTS,GLOB_TOML,GLOB_TS,GLOB_TSX,GLOB_VUE,GLOB_XML,GLOB_YAML,combine,custom,disables,gitignore,ignores,imports,javascript,lntvow,notInRecommendedRules,prettier,regexp,renameRules,stylistic,test,typescript,vue});
2
- //# sourceMappingURL=index.cjs.map
1
+ "use strict";var ve=Object.create;var w=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var ye=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var we=(e,r)=>{for(var o in r)w(e,o,{get:r[o],enumerable:!0})},X=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ye(r))!be.call(e,n)&&n!==o&&w(e,n,{get:()=>r[n],enumerable:!(s=ge(r,n))||s.enumerable});return e};var p=(e,r,o)=>(o=e!=null?ve(xe(e)):{},X(r||!e||!e.__esModule?w(o,"default",{value:e,enumerable:!0}):o,e)),Oe=e=>X(w({},"__esModule",{value:!0}),e);var Ue={};we(Ue,{GLOB_ALL_SRC:()=>Ee,GLOB_ASTRO:()=>Ge,GLOB_CSS:()=>_e,GLOB_EXCLUDE:()=>k,GLOB_GRAPHQL:()=>Be,GLOB_HTML:()=>Z,GLOB_JS:()=>Te,GLOB_JSON:()=>J,GLOB_JSON5:()=>H,GLOB_JSONC:()=>Fe,GLOB_JSX:()=>Ce,GLOB_LESS:()=>Se,GLOB_MARKDOWN:()=>F,GLOB_MARKDOWN_CODE:()=>Pe,GLOB_MARKDOWN_IN_MARKDOWN:()=>Ie,GLOB_POSTCSS:()=>Le,GLOB_SCSS:()=>je,GLOB_SRC:()=>d,GLOB_SRC_EXT:()=>u,GLOB_STYLE:()=>W,GLOB_SVELTE:()=>Y,GLOB_TESTS:()=>I,GLOB_TOML:()=>ke,GLOB_TS:()=>S,GLOB_TSX:()=>j,GLOB_VUE:()=>O,GLOB_XML:()=>Q,GLOB_YAML:()=>z,combine:()=>he,custom:()=>L,disables:()=>G,gitignore:()=>B,ignores:()=>P,imports:()=>E,javascript:()=>R,lntvow:()=>de,notInRecommendedRules:()=>se,prettier:()=>q,regexp:()=>A,renameRules:()=>_,stylistic:()=>V,test:()=>U,typescript:()=>$,vue:()=>M});module.exports=Oe(Ue);function _(e,r){return Object.fromEntries(Object.entries(e).map(([o,s])=>{for(let[n,i]of Object.entries(r))if(o.startsWith(`${n}/`))return[i+o.slice(n.length),s];return[o,s]}))}async function he(...e){return(await Promise.all(e)).flat()}var K=p(require("@lntvow/eslint-plugin"),1);async function L(){return[{name:"lntvow/custom/setup",plugins:{lntvow:K.default}}]}var u="?([cm])[jt]s?(x)",d="**/*.?([cm])[jt]s?(x)",Te="**/*.?([cm])js",Ce="**/*.?([cm])jsx",S="**/*.?([cm])ts",j="**/*.?([cm])tsx",W="**/*.{c,le,sc}ss",_e="**/*.css",Le="**/*.{p,post}css",Se="**/*.less",je="**/*.scss",J="**/*.json",H="**/*.json5",Fe="**/*.jsonc",F="**/*.md",Ie="**/*.md/*.md",Y="**/*.svelte",O="**/*.vue",z="**/*.y?(a)ml",ke="**/*.toml",Q="**/*.xml",Z="**/*.htm?(l)",Ge="**/*.astro",Be="**/*.{g,graph}ql",Pe=`${F}/${d}`,I=[`**/__tests__/**/*.${u}`,`**/*.spec.${u}`,`**/*.test.${u}`,`**/*.bench.${u}`,`**/*.benchmark.${u}`],Ee=[d,W,J,H,F,Y,O,z,Q,Z],k=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];async function G(){return[{files:[`scripts/${d}`],name:"lntvow/disables/scripts",rules:{"no-console":"off"}},{files:[`cli/${d}`,`cli.${u}`],name:"lntvow/disables/cli",rules:{"no-console":"off"}},{files:["**/*.d.?([cm])ts"],name:"lntvow/disables/dts",rules:{}},{files:["**/*.{test,spec}.([tj])s?(x)"],name:"lntvow/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs"],name:"lntvow/disables/cjs",rules:{"ts/no-require-imports":"off"}}]}var ee=p(require("fs"),1),re=require("@lntvow/utils"),oe=require("@eslint/compat");async function B(e){let{findUpSync:r}=await import("find-up-simple"),{name:o=".gitignore",root:s=!1,files:n=s?o:r(o)||[],strict:i=!1}=e,c=(0,re.castArray)(n),g=[];for(let T of c){let x;try{x=ee.default.readFileSync(T,"utf8")}catch(f){if(i)throw f;continue}let a=x.split(/\r?\n/u);g.push(...a.map(f=>f.trim()).filter(f=>f&&!f.startsWith("#")).map(oe.convertIgnorePatternToMinimatch))}if(i&&c.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:g}]}async function P(e=[]){return[{name:"lntvow/ignores",ignores:[...k,...e]}]}var te=p(require("eslint-plugin-import-x"),1);async function E(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:te.default}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}var ne=p(require("@eslint/js"),1),sr=require("globals");async function R(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:2022,sourceType:"module",parserOptions:{ecmaVersion:2022,sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...ne.default.configs.recommended.rules,...se,"no-unused-vars":"warn",...r}}]}var se={"array-callback-return":"error","no-await-in-loop":"off","no-constructor-return":"error","no-duplicate-imports":"error","no-inner-declarations":"error","no-promise-executor-return":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{functions:!1,variables:!1}],"no-useless-assignment":"off","require-atomic-updates":"off","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"warn","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"off","consistent-this":"off",curly:["error","multi-line"],"default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","func-name-matching":"error","func-names":"off","func-style":"off","grouped-accessor-pairs":"error","guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","logical-assignment-operators":"error","max-classes-per-file":"off","max-depth":"off","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"off","max-params":"off","max-statements":"off","new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"off","no-caller":"error","no-console":"warn","no-continue":"off","no-div-regex":"error","no-else-return":"error","no-empty-function":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-inline-comments":"off","no-invalid-this":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-magic-numbers":"off","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"off","no-nested-ternary":"off","no-new":"off","no-new-func":"error","no-new-wrappers":"error","no-object-constructor":"error","no-octal-escape":"error","no-param-reassign":"off","no-plusplus":"off","no-proto":"error","no-restricted-exports":"off","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-imports":"off","no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":"off","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow":0,"no-ternary":"off","no-throw-literal":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"off","no-unneeded-ternary":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-useless-call":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"off","no-warning-comments":"off","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-named-capture-group":"off","prefer-numeric-literals":"off","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"off","prefer-regex-literals":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"off","require-await":"off","require-unicode-regexp":"off","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:"off","symbol-description":"error","vars-on-top":"error",yoda:"error","unicode-bom":"error"};var ie=p(require("eslint-plugin-prettier"),1),ae=p(require("eslint-config-prettier"),1);async function q(){return[{name:"lntvow/prettier/setup",plugins:{prettier:ie.default}},{name:"lntvow/prettier/rules",rules:{...ae.default.rules,"prettier/prettier":"warn"}}]}var N=require("eslint-plugin-regexp");async function A(e={}){let{overrides:r}=e,o=N.configs["flat/recommended"].plugins.regexp,{rules:s}=N.configs["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:o}},{name:"lntvow/regexp/rules",rules:{...s,...r}}]}var pe=p(require("@stylistic/eslint-plugin"),1);async function V(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:pe.default}},{name:"lntvow/stylistic/rules",rules:{"style/spaced-comment":"error","style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:"cjs-export"},{blankLine:"always",prev:"*",next:"export"},{blankLine:"always",prev:"*",next:"function"},{blankLine:"always",prev:"*",next:["interface","type"]},{blankLine:"never",prev:"function-overload",next:"function"}],"style/lines-around-comment":[2,{beforeBlockComment:!0,allowBlockStart:!0,allowObjectStart:!0,allowInterfaceStart:!0,allowTypeStart:!0,allowArrayStart:!0,allowClassStart:!0,allowModuleStart:!0}],...r}}]}var le=p(require("eslint-plugin-vitest"),1);async function U(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:le.default}},{name:"lntvow/test/rules",files:[...I],rules:{"lntvow/newline-before-specified-function-call":"error",...r}}]}var v=require("typescript-eslint");async function $(e={}){let{componentExts:r=[],overrides:o={},parserOptions:s={}}=e,n=[S,j,...r.map(i=>`**/*.${i}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:v.plugin}},{name:"lntvow/typescript/rules",languageOptions:{parser:v.parser,parserOptions:{sourceType:"module"}},files:n,rules:{..._(v.configs.strict.map(i=>i.rules).filter(Boolean).reduce((i,c)=>({...i,...c}),{}),{"@typescript-eslint":"ts"}),"ts/no-non-null-assertion":"off","ts/no-explicit-any":"off","ts/ban-ts-comment":"off","ts/no-unused-vars":"warn","no-use-before-define":"off","ts/no-use-before-define":["error",{functions:!1,variables:!1}],"no-unused-expressions":"off","ts/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],...o}}]}var fe=require("local-pkg"),D=require("typescript-eslint"),ue=p(require("vue-eslint-parser"),1),l=p(require("eslint-plugin-vue"),1);var Re={...l.default.configs["vue3-essential"].rules,...l.default.configs["vue3-strongly-recommended"].rules,...l.default.configs["vue3-recommended"].rules,"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/component-api-style":"error","vue/no-deprecated-model-definition":"error"},qe={...l.default.configs.essential.rules,...l.default.configs["strongly-recommended"].rules,...l.default.configs.recommended.rules,"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}]};async function M(e={}){let{overrides:r={},vueVersion:o=Ne()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l.default}},{name:"lntvow/vue/rules",languageOptions:{parser:ue.default,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:D.parser,tsx:D.parser},sourceType:"module"}},processor:l.default.processors[".vue"],files:[O],rules:{...l.default.configs.base.rules,...o===3?Re:qe,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":"off","vue/html-indent":"off","vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"off","vue/v-on-event-hyphenation":"off","vue/block-tag-newline":"error","vue/component-name-in-template-casing":["error","PascalCase",{ignores:["/-/"]}],"vue/component-options-name-casing":"error","vue/custom-event-name-casing":"error","vue/define-emits-declaration":"error","vue/define-macros-order":"error","vue/define-props-declaration":"error","vue/enforce-style-attribute":"error","vue/html-button-has-type":"off","vue/html-comment-content-newline":"error","vue/html-comment-content-spacing":"error","vue/html-comment-indent":"off","vue/match-component-file-name":["error",{extensions:["jsx","tsx"],shouldMatchCase:!0}],"vue/match-component-import-name":"error","vue/max-lines-per-block":"off","vue/max-props":"off","vue/max-template-depth":"off","vue/new-line-between-multi-line-property":"off","vue/next-tick-style":"off","vue/no-bare-strings-in-template":"off","vue/no-boolean-default":"off","vue/no-deprecated-model-definition":"error","vue/no-duplicate-attr-inheritance":"error","vue/no-empty-component-block":"off","vue/no-multiple-objects-in-class":"error","vue/no-potential-component-option-typo":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-required-prop-with-default":"error","vue/no-restricted-block":"off","vue/no-restricted-call-after-await":"off","vue/no-restricted-class":"off","vue/no-restricted-component-names":"off","vue/no-restricted-component-options":"off","vue/no-restricted-custom-event":"off","vue/no-restricted-html-elements":"off","vue/no-restricted-props":"off","vue/no-restricted-static-attribute":"off","vue/no-restricted-v-bind":"off","vue/no-root-v-if":"off","vue/no-setup-props-reactivity-loss":"error","vue/no-static-inline-styles":"error","vue/no-template-target-blank":"error","vue/no-this-in-before-route-enter":"error","vue/no-undef-components":"off","vue/no-undef-properties":"error","vue/no-unsupported-features":"off","vue/no-unused-emit-declarations":"error","vue/no-unused-properties":["warn",{groups:["props","data","computed","methods","setup"]}],"vue/no-unused-refs":"error","vue/no-use-v-else-with-v-for":"error","vue/no-useless-mustaches":"error","vue/no-useless-v-bind":"error","vue/no-v-text":"error","vue/padding-line-between-blocks":"error","vue/padding-line-between-tags":["error",[{blankLine:"never",prev:"*",next:"*"}]],"vue/padding-lines-in-component-definition":["error",{betweenOptions:"never"}],"vue/prefer-define-options":"error","vue/prefer-prop-type-boolean-first":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/require-default-export":"off","vue/require-direct-export":"error","vue/require-emit-validator":"off","vue/require-explicit-slots":"off","vue/require-expose":"error","vue/require-macro-variable-name":"error","vue/require-name-property":"off","vue/require-prop-comment":"off","vue/require-typed-object-prop":"error","vue/require-typed-ref":"error","vue/script-indent":"off","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-on-handler-style":"off","vue/valid-define-options":"error","vue/array-bracket-newline":"off","vue/array-bracket-spacing":"off","vue/array-element-newline":"off","vue/arrow-spacing":"off","vue/block-spacing":"off","vue/brace-style":"off","vue/camelcase":"error","vue/comma-dangle":"off","vue/comma-spacing":"off","vue/comma-style":"off","vue/dot-location":"off","vue/dot-notation":"error","vue/eqeqeq":"error","vue/func-call-spacing":"off","vue/key-spacing":"off","vue/keyword-spacing":"off","vue/max-len":"off","vue/multiline-ternary":"off","vue/no-console":"off","vue/no-constant-condition":"error","vue/no-extra-parens":"off","vue/no-empty-pattern":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-restricted-syntax":"off","vue/no-sparse-arrays":"error","vue/no-useless-concat":"error","vue/object-curly-newline":"off","vue/object-curly-spacing":"off","vue/object-property-newline":"off","vue/object-shorthand":"error","vue/operator-linebreak":"off","vue/prefer-template":"error","vue/quote-props":"off","vue/space-in-parens":"off","vue/space-infix-ops":"off","vue/space-unary-ops":"off","vue/template-curly-spacing":"off",...r}}]}function Ne(){let e=(0,fe.getPackageInfoSync)("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}var ce=require("eslint-flat-config-utils"),me=require("@lntvow/utils"),h=require("local-pkg");var Ae=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Ve={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function de(e={},...r){if("files"in e)throw new Error('[@lntvow/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let{autoRenamePlugins:o=!0,componentExts:s=[],gitignore:n=!0,regexp:i=!0,typescript:c=(0,h.isPackageExists)("typescript"),vue:g=["vue","nuxt","vitepress"].some(b=>(0,h.isPackageExists)(b)),test:T=(0,h.isPackageExists)("vitest"),stylistic:x=!0}=e,a=[];a.push(P(e.ignores),L(),R({...m(e,"javascript")}),E({typescript:!!c})),n&&a.push(B({...m(e,"gitignore")})),g&&s.push("vue"),c&&a.push($({...m(e,"typescript"),componentExts:s})),g&&a.push(M({...m(e,"vue")})),i&&a.push(A({...m(e,"regexp")})),T&&a.push(U({...m(e,"test")})),x&&a.push(V({...m(e,"stylistic")})),a.push(q(),G());let f=Ae.reduce((b,C)=>(C in e&&(b[C]=e[C]),b),{});Object.keys(f).length&&a.push([f]);let y=new ce.FlatConfigComposer;return y=y.append(...a,...r),o&&(y=y.renamePlugins(Ve)),y}function m(e,r){return(0,me.isBoolean)(e[r])?{}:e[r]||{}}0&&(module.exports={GLOB_ALL_SRC,GLOB_ASTRO,GLOB_CSS,GLOB_EXCLUDE,GLOB_GRAPHQL,GLOB_HTML,GLOB_JS,GLOB_JSON,GLOB_JSON5,GLOB_JSONC,GLOB_JSX,GLOB_LESS,GLOB_MARKDOWN,GLOB_MARKDOWN_CODE,GLOB_MARKDOWN_IN_MARKDOWN,GLOB_POSTCSS,GLOB_SCSS,GLOB_SRC,GLOB_SRC_EXT,GLOB_STYLE,GLOB_SVELTE,GLOB_TESTS,GLOB_TOML,GLOB_TS,GLOB_TSX,GLOB_VUE,GLOB_XML,GLOB_YAML,combine,custom,disables,gitignore,ignores,imports,javascript,lntvow,notInRecommendedRules,prettier,regexp,renameRules,stylistic,test,typescript,vue});
package/dist/index.d.cts CHANGED
@@ -574,7 +574,7 @@ interface RuleOptions {
574
574
  * Enforce newline before specified keywords
575
575
  * @see https://eslint.org/docs/rules/newline-before
576
576
  */
577
- 'lntvow/newline-before-describe-test'?: Linter.RuleEntry<[]>
577
+ 'lntvow/newline-before-specified-function-call'?: Linter.RuleEntry<[]>
578
578
  /**
579
579
  * Require or disallow logical assignment operator shorthand
580
580
  * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
package/dist/index.d.ts CHANGED
@@ -574,7 +574,7 @@ interface RuleOptions {
574
574
  * Enforce newline before specified keywords
575
575
  * @see https://eslint.org/docs/rules/newline-before
576
576
  */
577
- 'lntvow/newline-before-describe-test'?: Linter.RuleEntry<[]>
577
+ 'lntvow/newline-before-specified-function-call'?: Linter.RuleEntry<[]>
578
578
  /**
579
579
  * Require or disallow logical assignment operator shorthand
580
580
  * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
package/dist/index.mjs CHANGED
@@ -1,2 +1 @@
1
- function T(e,r){return Object.fromEntries(Object.entries(e).map(([n,a])=>{for(let[f,s]of Object.entries(r))if(n.startsWith(`${f}/`))return[s+n.slice(f.length),a];return[n,a]}))}async function we(...e){return(await Promise.all(e)).flat()}import D from"@lntvow/eslint-plugin";async function C(){return[{name:"lntvow/custom/setup",plugins:{lntvow:D}}]}var c="?([cm])[jt]s?(x)",g="**/*.?([cm])[jt]s?(x)",Le="**/*.?([cm])js",Se="**/*.?([cm])jsx",_="**/*.?([cm])ts",L="**/*.?([cm])tsx",M="**/*.{c,le,sc}ss",je="**/*.css",Fe="**/*.{p,post}css",Ie="**/*.less",ke="**/*.scss",X="**/*.json",K="**/*.json5",Ge="**/*.jsonc",S="**/*.md",Be="**/*.md/*.md",W="**/*.svelte",O="**/*.vue",J="**/*.y?(a)ml",Pe="**/*.toml",H="**/*.xml",Y="**/*.htm?(l)",Ee="**/*.astro",Re="**/*.{g,graph}ql",qe=`${S}/${g}`,j=[`**/__tests__/**/*.${c}`,`**/*.spec.${c}`,`**/*.test.${c}`,`**/*.bench.${c}`,`**/*.benchmark.${c}`],Ne=[g,M,X,K,S,W,O,J,H,Y],F=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];async function I(){return[{files:[`scripts/${g}`],name:"lntvow/disables/scripts",rules:{"no-console":"off"}},{files:[`cli/${g}`,`cli.${c}`],name:"lntvow/disables/cli",rules:{"no-console":"off"}},{files:["**/*.d.?([cm])ts"],name:"lntvow/disables/dts",rules:{}},{files:["**/*.{test,spec}.([tj])s?(x)"],name:"lntvow/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs"],name:"lntvow/disables/cjs",rules:{"ts/no-require-imports":"off"}}]}import z from"fs";import{castArray as Q}from"@lntvow/utils";import{convertIgnorePatternToMinimatch as Z}from"@eslint/compat";async function k(e){let{findUpSync:r}=await import("find-up-simple"),{name:n=".gitignore",root:a=!1,files:f=a?n:r(n)||[],strict:s=!1}=e,u=Q(f),d=[];for(let b of u){let y;try{y=z.readFileSync(b,"utf8")}catch(p){if(s)throw p;continue}let i=y.split(/\r?\n/u);d.push(...i.map(p=>p.trim()).filter(p=>p&&!p.startsWith("#")).map(Z))}if(s&&u.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:d}]}async function G(e=[]){return[{name:"lntvow/ignores",ignores:[...F,...e]}]}import ee from"eslint-plugin-import-x";async function B(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:ee}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}import re from"@eslint/js";import"globals";async function P(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:2022,sourceType:"module",parserOptions:{ecmaVersion:2022,sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...re.configs.recommended.rules,...oe,"no-unused-vars":"warn",...r}}]}var oe={"array-callback-return":"error","no-await-in-loop":"off","no-constructor-return":"error","no-duplicate-imports":"error","no-inner-declarations":"error","no-promise-executor-return":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{functions:!1,variables:!1}],"no-useless-assignment":"off","require-atomic-updates":"off","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"warn","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"off","consistent-this":"off",curly:["error","multi-line"],"default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","func-name-matching":"error","func-names":"off","func-style":"off","grouped-accessor-pairs":"error","guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","logical-assignment-operators":"error","max-classes-per-file":"off","max-depth":"off","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"off","max-params":"off","max-statements":"off","new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"off","no-caller":"error","no-console":"warn","no-continue":"off","no-div-regex":"error","no-else-return":"error","no-empty-function":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-inline-comments":"off","no-invalid-this":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-magic-numbers":"off","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"off","no-nested-ternary":"off","no-new":"off","no-new-func":"error","no-new-wrappers":"error","no-object-constructor":"error","no-octal-escape":"error","no-param-reassign":"off","no-plusplus":"off","no-proto":"error","no-restricted-exports":"off","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-imports":"off","no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":"off","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow":0,"no-ternary":"off","no-throw-literal":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"off","no-unneeded-ternary":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-useless-call":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"off","no-warning-comments":"off","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-named-capture-group":"off","prefer-numeric-literals":"off","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"off","prefer-regex-literals":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"off","require-await":"off","require-unicode-regexp":"off","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:"off","symbol-description":"error","vars-on-top":"error",yoda:"error","unicode-bom":"error"};import te from"eslint-plugin-prettier";import ne from"eslint-config-prettier";async function E(){return[{name:"lntvow/prettier/setup",plugins:{prettier:te}},{name:"lntvow/prettier/rules",rules:{...ne.rules,"prettier/prettier":"warn"}}]}import{configs as R}from"eslint-plugin-regexp";async function q(e={}){let{overrides:r}=e,n=R["flat/recommended"].plugins.regexp,{rules:a}=R["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:n}},{name:"lntvow/regexp/rules",rules:{...a,...r}}]}import se from"@stylistic/eslint-plugin";async function N(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:se}},{name:"lntvow/stylistic/rules",rules:{"style/spaced-comment":"error","style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:"cjs-export"},{blankLine:"always",prev:"*",next:"export"},{blankLine:"always",prev:"*",next:"function"},{blankLine:"always",prev:"*",next:["interface","type"]},{blankLine:"never",prev:"function-overload",next:"function"}],"style/lines-around-comment":[2,{beforeBlockComment:!0,allowBlockStart:!0,allowObjectStart:!0,allowInterfaceStart:!0,allowTypeStart:!0,allowArrayStart:!0,allowClassStart:!0,allowModuleStart:!0}],...r}}]}import ie from"eslint-plugin-vitest";async function A(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:ie}},{name:"lntvow/test/rules",files:[...j],rules:{"lntvow/newline-before-describe-test":"error",...r}}]}import{parser as ae,plugin as pe,configs as le}from"typescript-eslint";async function V(e={}){let{componentExts:r=[],overrides:n={},parserOptions:a={}}=e,f=[_,L,...r.map(s=>`**/*.${s}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:pe}},{name:"lntvow/typescript/rules",languageOptions:{parser:ae,parserOptions:{sourceType:"module"}},files:f,rules:{...T(le.strict.map(s=>s.rules).filter(Boolean).reduce((s,u)=>({...s,...u}),{}),{"@typescript-eslint":"ts"}),"ts/no-non-null-assertion":"off","ts/no-explicit-any":"off","ts/ban-ts-comment":"off","ts/no-unused-vars":"warn","no-use-before-define":"off","ts/no-use-before-define":["error",{functions:!1,variables:!1}],"no-unused-expressions":"off","ts/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],...n}}]}import{getPackageInfoSync as fe}from"local-pkg";import{parser as U}from"typescript-eslint";import ue from"vue-eslint-parser";import l from"eslint-plugin-vue";var ce={...l.configs["vue3-essential"].rules,...l.configs["vue3-strongly-recommended"].rules,...l.configs["vue3-recommended"].rules,"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/component-api-style":"error","vue/no-deprecated-model-definition":"error"},me={...l.configs.essential.rules,...l.configs["strongly-recommended"].rules,...l.configs.recommended.rules,"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}]};async function $(e={}){let{overrides:r={},vueVersion:n=de()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l}},{name:"lntvow/vue/rules",languageOptions:{parser:ue,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:U,tsx:U},sourceType:"module"}},processor:l.processors[".vue"],files:[O],rules:{...l.configs.base.rules,...n===3?ce:me,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":"off","vue/html-indent":"off","vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"off","vue/v-on-event-hyphenation":"off","vue/block-tag-newline":"error","vue/component-name-in-template-casing":["error","PascalCase",{ignores:["/-/"]}],"vue/component-options-name-casing":"error","vue/custom-event-name-casing":"error","vue/define-emits-declaration":"error","vue/define-macros-order":"error","vue/define-props-declaration":"error","vue/enforce-style-attribute":"error","vue/html-button-has-type":"off","vue/html-comment-content-newline":"error","vue/html-comment-content-spacing":"error","vue/html-comment-indent":"off","vue/match-component-file-name":["error",{extensions:["jsx","tsx"],shouldMatchCase:!0}],"vue/match-component-import-name":"error","vue/max-lines-per-block":"off","vue/max-props":"off","vue/max-template-depth":"off","vue/new-line-between-multi-line-property":"off","vue/next-tick-style":"off","vue/no-bare-strings-in-template":"off","vue/no-boolean-default":"off","vue/no-deprecated-model-definition":"error","vue/no-duplicate-attr-inheritance":"error","vue/no-empty-component-block":"off","vue/no-multiple-objects-in-class":"error","vue/no-potential-component-option-typo":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-required-prop-with-default":"error","vue/no-restricted-block":"off","vue/no-restricted-call-after-await":"off","vue/no-restricted-class":"off","vue/no-restricted-component-names":"off","vue/no-restricted-component-options":"off","vue/no-restricted-custom-event":"off","vue/no-restricted-html-elements":"off","vue/no-restricted-props":"off","vue/no-restricted-static-attribute":"off","vue/no-restricted-v-bind":"off","vue/no-root-v-if":"off","vue/no-setup-props-reactivity-loss":"error","vue/no-static-inline-styles":"error","vue/no-template-target-blank":"error","vue/no-this-in-before-route-enter":"error","vue/no-undef-components":"off","vue/no-undef-properties":"error","vue/no-unsupported-features":"off","vue/no-unused-emit-declarations":"error","vue/no-unused-properties":["warn",{groups:["props","data","computed","methods","setup"]}],"vue/no-unused-refs":"error","vue/no-use-v-else-with-v-for":"error","vue/no-useless-mustaches":"error","vue/no-useless-v-bind":"error","vue/no-v-text":"error","vue/padding-line-between-blocks":"error","vue/padding-line-between-tags":["error",[{blankLine:"never",prev:"*",next:"*"}]],"vue/padding-lines-in-component-definition":["error",{betweenOptions:"never"}],"vue/prefer-define-options":"error","vue/prefer-prop-type-boolean-first":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/require-default-export":"off","vue/require-direct-export":"error","vue/require-emit-validator":"off","vue/require-explicit-slots":"off","vue/require-expose":"error","vue/require-macro-variable-name":"error","vue/require-name-property":"off","vue/require-prop-comment":"off","vue/require-typed-object-prop":"error","vue/require-typed-ref":"error","vue/script-indent":"off","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-on-handler-style":"off","vue/valid-define-options":"error","vue/array-bracket-newline":"off","vue/array-bracket-spacing":"off","vue/array-element-newline":"off","vue/arrow-spacing":"off","vue/block-spacing":"off","vue/brace-style":"off","vue/camelcase":"error","vue/comma-dangle":"off","vue/comma-spacing":"off","vue/comma-style":"off","vue/dot-location":"off","vue/dot-notation":"error","vue/eqeqeq":"error","vue/func-call-spacing":"off","vue/key-spacing":"off","vue/keyword-spacing":"off","vue/max-len":"off","vue/multiline-ternary":"off","vue/no-console":"off","vue/no-constant-condition":"error","vue/no-extra-parens":"off","vue/no-empty-pattern":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-restricted-syntax":"off","vue/no-sparse-arrays":"error","vue/no-useless-concat":"error","vue/object-curly-newline":"off","vue/object-curly-spacing":"off","vue/object-property-newline":"off","vue/object-shorthand":"error","vue/operator-linebreak":"off","vue/prefer-template":"error","vue/quote-props":"off","vue/space-in-parens":"off","vue/space-infix-ops":"off","vue/space-unary-ops":"off","vue/template-curly-spacing":"off",...r}}]}function de(){let e=fe("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}import{FlatConfigComposer as ve}from"eslint-flat-config-utils";import{isBoolean as ge}from"@lntvow/utils";import{isPackageExists as h}from"local-pkg";var ye=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],xe={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function be(e={},...r){if("files"in e)throw new Error('[@lntvow/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let{autoRenamePlugins:n=!0,componentExts:a=[],gitignore:f=!0,regexp:s=!0,typescript:u=h("typescript"),vue:d=["vue","nuxt","vitepress"].some(x=>h(x)),test:b=h("vitest"),stylistic:y=!0}=e,i=[];i.push(G(e.ignores),C(),P({...m(e,"javascript")}),B({typescript:!!u})),f&&i.push(k({...m(e,"gitignore")})),d&&a.push("vue"),u&&i.push(V({...m(e,"typescript"),componentExts:a})),d&&i.push($({...m(e,"vue")})),s&&i.push(q({...m(e,"regexp")})),b&&i.push(A({...m(e,"test")})),y&&i.push(N({...m(e,"stylistic")})),i.push(E(),I());let p=ye.reduce((x,w)=>(w in e&&(x[w]=e[w]),x),{});Object.keys(p).length&&i.push([p]);let v=new ve;return v=v.append(...i,...r),n&&(v=v.renamePlugins(xe)),v}function m(e,r){return ge(e[r])?{}:e[r]||{}}export{Ne as GLOB_ALL_SRC,Ee as GLOB_ASTRO,je as GLOB_CSS,F as GLOB_EXCLUDE,Re as GLOB_GRAPHQL,Y as GLOB_HTML,Le as GLOB_JS,X as GLOB_JSON,K as GLOB_JSON5,Ge as GLOB_JSONC,Se as GLOB_JSX,Ie as GLOB_LESS,S as GLOB_MARKDOWN,qe as GLOB_MARKDOWN_CODE,Be as GLOB_MARKDOWN_IN_MARKDOWN,Fe as GLOB_POSTCSS,ke as GLOB_SCSS,g as GLOB_SRC,c as GLOB_SRC_EXT,M as GLOB_STYLE,W as GLOB_SVELTE,j as GLOB_TESTS,Pe as GLOB_TOML,_ as GLOB_TS,L as GLOB_TSX,O as GLOB_VUE,H as GLOB_XML,J as GLOB_YAML,we as combine,C as custom,I as disables,k as gitignore,G as ignores,B as imports,P as javascript,be as lntvow,oe as notInRecommendedRules,E as prettier,q as regexp,T as renameRules,N as stylistic,A as test,V as typescript,$ as vue};
2
- //# sourceMappingURL=index.mjs.map
1
+ function T(e,r){return Object.fromEntries(Object.entries(e).map(([n,a])=>{for(let[f,s]of Object.entries(r))if(n.startsWith(`${f}/`))return[s+n.slice(f.length),a];return[n,a]}))}async function we(...e){return(await Promise.all(e)).flat()}import D from"@lntvow/eslint-plugin";async function C(){return[{name:"lntvow/custom/setup",plugins:{lntvow:D}}]}var c="?([cm])[jt]s?(x)",g="**/*.?([cm])[jt]s?(x)",Le="**/*.?([cm])js",Se="**/*.?([cm])jsx",_="**/*.?([cm])ts",L="**/*.?([cm])tsx",M="**/*.{c,le,sc}ss",je="**/*.css",Fe="**/*.{p,post}css",Ie="**/*.less",ke="**/*.scss",X="**/*.json",K="**/*.json5",Ge="**/*.jsonc",S="**/*.md",Be="**/*.md/*.md",W="**/*.svelte",O="**/*.vue",J="**/*.y?(a)ml",Pe="**/*.toml",H="**/*.xml",Y="**/*.htm?(l)",Ee="**/*.astro",Re="**/*.{g,graph}ql",qe=`${S}/${g}`,j=[`**/__tests__/**/*.${c}`,`**/*.spec.${c}`,`**/*.test.${c}`,`**/*.bench.${c}`,`**/*.benchmark.${c}`],Ne=[g,M,X,K,S,W,O,J,H,Y],F=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.svelte-kit","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/vite.config.*.timestamp-*","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];async function I(){return[{files:[`scripts/${g}`],name:"lntvow/disables/scripts",rules:{"no-console":"off"}},{files:[`cli/${g}`,`cli.${c}`],name:"lntvow/disables/cli",rules:{"no-console":"off"}},{files:["**/*.d.?([cm])ts"],name:"lntvow/disables/dts",rules:{}},{files:["**/*.{test,spec}.([tj])s?(x)"],name:"lntvow/disables/test",rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs"],name:"lntvow/disables/cjs",rules:{"ts/no-require-imports":"off"}}]}import z from"fs";import{castArray as Q}from"@lntvow/utils";import{convertIgnorePatternToMinimatch as Z}from"@eslint/compat";async function k(e){let{findUpSync:r}=await import("find-up-simple"),{name:n=".gitignore",root:a=!1,files:f=a?n:r(n)||[],strict:s=!1}=e,u=Q(f),d=[];for(let b of u){let y;try{y=z.readFileSync(b,"utf8")}catch(p){if(s)throw p;continue}let i=y.split(/\r?\n/u);d.push(...i.map(p=>p.trim()).filter(p=>p&&!p.startsWith("#")).map(Z))}if(s&&u.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:d}]}async function G(e=[]){return[{name:"lntvow/ignores",ignores:[...F,...e]}]}import ee from"eslint-plugin-import-x";async function B(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:ee}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}import re from"@eslint/js";import"globals";async function P(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:2022,sourceType:"module",parserOptions:{ecmaVersion:2022,sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...re.configs.recommended.rules,...oe,"no-unused-vars":"warn",...r}}]}var oe={"array-callback-return":"error","no-await-in-loop":"off","no-constructor-return":"error","no-duplicate-imports":"error","no-inner-declarations":"error","no-promise-executor-return":"error","no-self-compare":"error","no-template-curly-in-string":"error","no-unmodified-loop-condition":"error","no-unreachable-loop":"error","no-use-before-define":["error",{functions:!1,variables:!1}],"no-useless-assignment":"off","require-atomic-updates":"off","accessor-pairs":"error","arrow-body-style":"error","block-scoped-var":"error",camelcase:"warn","capitalized-comments":"off","class-methods-use-this":"error",complexity:"off","consistent-return":"off","consistent-this":"off",curly:["error","multi-line"],"default-case":"error","default-case-last":"error","default-param-last":"error","dot-notation":"error",eqeqeq:"error","func-name-matching":"error","func-names":"off","func-style":"off","grouped-accessor-pairs":"error","guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","logical-assignment-operators":"error","max-classes-per-file":"off","max-depth":"off","max-lines":"off","max-lines-per-function":"off","max-nested-callbacks":"off","max-params":"off","max-statements":"off","new-cap":["error",{capIsNew:!1}],"no-alert":"error","no-array-constructor":"error","no-bitwise":"off","no-caller":"error","no-console":"warn","no-continue":"off","no-div-regex":"error","no-else-return":"error","no-empty-function":"error","no-eq-null":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":"error","no-implicit-globals":"error","no-implied-eval":"error","no-inline-comments":"off","no-invalid-this":"error","no-iterator":"error","no-label-var":"error","no-labels":"error","no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"error","no-magic-numbers":"off","no-multi-assign":"error","no-multi-str":"error","no-negated-condition":"off","no-nested-ternary":"off","no-new":"off","no-new-func":"error","no-new-wrappers":"error","no-object-constructor":"error","no-octal-escape":"error","no-param-reassign":"off","no-plusplus":"off","no-proto":"error","no-restricted-exports":"off","no-restricted-globals":["error",{message:"Use `globalThis` instead.",name:"global"},{message:"Use `globalThis` instead.",name:"self"}],"no-restricted-imports":"off","no-restricted-properties":["error",{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:"__proto__"},{message:"Use `Object.defineProperty` instead.",property:"__defineGetter__"},{message:"Use `Object.defineProperty` instead.",property:"__defineSetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupGetter__"},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:"__lookupSetter__"}],"no-restricted-syntax":"off","no-return-assign":"error","no-script-url":"error","no-sequences":"error","no-shadow":0,"no-ternary":"off","no-throw-literal":"off","no-undef-init":"error","no-undefined":"off","no-underscore-dangle":"off","no-unneeded-ternary":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-useless-call":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"off","no-warning-comments":"off","object-shorthand":"error","one-var":"off","operator-assignment":"error","prefer-arrow-callback":"error","prefer-const":"error","prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-named-capture-group":"off","prefer-numeric-literals":"off","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"off","prefer-regex-literals":"off","prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error",radix:"off","require-await":"off","require-unicode-regexp":"off","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:"off","symbol-description":"error","vars-on-top":"error",yoda:"error","unicode-bom":"error"};import te from"eslint-plugin-prettier";import ne from"eslint-config-prettier";async function E(){return[{name:"lntvow/prettier/setup",plugins:{prettier:te}},{name:"lntvow/prettier/rules",rules:{...ne.rules,"prettier/prettier":"warn"}}]}import{configs as R}from"eslint-plugin-regexp";async function q(e={}){let{overrides:r}=e,n=R["flat/recommended"].plugins.regexp,{rules:a}=R["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:n}},{name:"lntvow/regexp/rules",rules:{...a,...r}}]}import se from"@stylistic/eslint-plugin";async function N(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:se}},{name:"lntvow/stylistic/rules",rules:{"style/spaced-comment":"error","style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:"cjs-export"},{blankLine:"always",prev:"*",next:"export"},{blankLine:"always",prev:"*",next:"function"},{blankLine:"always",prev:"*",next:["interface","type"]},{blankLine:"never",prev:"function-overload",next:"function"}],"style/lines-around-comment":[2,{beforeBlockComment:!0,allowBlockStart:!0,allowObjectStart:!0,allowInterfaceStart:!0,allowTypeStart:!0,allowArrayStart:!0,allowClassStart:!0,allowModuleStart:!0}],...r}}]}import ie from"eslint-plugin-vitest";async function A(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:ie}},{name:"lntvow/test/rules",files:[...j],rules:{"lntvow/newline-before-specified-function-call":"error",...r}}]}import{parser as ae,plugin as pe,configs as le}from"typescript-eslint";async function V(e={}){let{componentExts:r=[],overrides:n={},parserOptions:a={}}=e,f=[_,L,...r.map(s=>`**/*.${s}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:pe}},{name:"lntvow/typescript/rules",languageOptions:{parser:ae,parserOptions:{sourceType:"module"}},files:f,rules:{...T(le.strict.map(s=>s.rules).filter(Boolean).reduce((s,u)=>({...s,...u}),{}),{"@typescript-eslint":"ts"}),"ts/no-non-null-assertion":"off","ts/no-explicit-any":"off","ts/ban-ts-comment":"off","ts/no-unused-vars":"warn","no-use-before-define":"off","ts/no-use-before-define":["error",{functions:!1,variables:!1}],"no-unused-expressions":"off","ts/no-unused-expressions":["error",{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],...n}}]}import{getPackageInfoSync as fe}from"local-pkg";import{parser as U}from"typescript-eslint";import ue from"vue-eslint-parser";import l from"eslint-plugin-vue";var ce={...l.configs["vue3-essential"].rules,...l.configs["vue3-strongly-recommended"].rules,...l.configs["vue3-recommended"].rules,"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/component-api-style":"error","vue/no-deprecated-model-definition":"error"},me={...l.configs.essential.rules,...l.configs["strongly-recommended"].rules,...l.configs.recommended.rules,"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}]};async function $(e={}){let{overrides:r={},vueVersion:n=de()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l}},{name:"lntvow/vue/rules",languageOptions:{parser:ue,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:U,tsx:U},sourceType:"module"}},processor:l.processors[".vue"],files:[O],rules:{...l.configs.base.rules,...n===3?ce:me,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":"off","vue/html-indent":"off","vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"off","vue/v-on-event-hyphenation":"off","vue/block-tag-newline":"error","vue/component-name-in-template-casing":["error","PascalCase",{ignores:["/-/"]}],"vue/component-options-name-casing":"error","vue/custom-event-name-casing":"error","vue/define-emits-declaration":"error","vue/define-macros-order":"error","vue/define-props-declaration":"error","vue/enforce-style-attribute":"error","vue/html-button-has-type":"off","vue/html-comment-content-newline":"error","vue/html-comment-content-spacing":"error","vue/html-comment-indent":"off","vue/match-component-file-name":["error",{extensions:["jsx","tsx"],shouldMatchCase:!0}],"vue/match-component-import-name":"error","vue/max-lines-per-block":"off","vue/max-props":"off","vue/max-template-depth":"off","vue/new-line-between-multi-line-property":"off","vue/next-tick-style":"off","vue/no-bare-strings-in-template":"off","vue/no-boolean-default":"off","vue/no-deprecated-model-definition":"error","vue/no-duplicate-attr-inheritance":"error","vue/no-empty-component-block":"off","vue/no-multiple-objects-in-class":"error","vue/no-potential-component-option-typo":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-required-prop-with-default":"error","vue/no-restricted-block":"off","vue/no-restricted-call-after-await":"off","vue/no-restricted-class":"off","vue/no-restricted-component-names":"off","vue/no-restricted-component-options":"off","vue/no-restricted-custom-event":"off","vue/no-restricted-html-elements":"off","vue/no-restricted-props":"off","vue/no-restricted-static-attribute":"off","vue/no-restricted-v-bind":"off","vue/no-root-v-if":"off","vue/no-setup-props-reactivity-loss":"error","vue/no-static-inline-styles":"error","vue/no-template-target-blank":"error","vue/no-this-in-before-route-enter":"error","vue/no-undef-components":"off","vue/no-undef-properties":"error","vue/no-unsupported-features":"off","vue/no-unused-emit-declarations":"error","vue/no-unused-properties":["warn",{groups:["props","data","computed","methods","setup"]}],"vue/no-unused-refs":"error","vue/no-use-v-else-with-v-for":"error","vue/no-useless-mustaches":"error","vue/no-useless-v-bind":"error","vue/no-v-text":"error","vue/padding-line-between-blocks":"error","vue/padding-line-between-tags":["error",[{blankLine:"never",prev:"*",next:"*"}]],"vue/padding-lines-in-component-definition":["error",{betweenOptions:"never"}],"vue/prefer-define-options":"error","vue/prefer-prop-type-boolean-first":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/require-default-export":"off","vue/require-direct-export":"error","vue/require-emit-validator":"off","vue/require-explicit-slots":"off","vue/require-expose":"error","vue/require-macro-variable-name":"error","vue/require-name-property":"off","vue/require-prop-comment":"off","vue/require-typed-object-prop":"error","vue/require-typed-ref":"error","vue/script-indent":"off","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-on-handler-style":"off","vue/valid-define-options":"error","vue/array-bracket-newline":"off","vue/array-bracket-spacing":"off","vue/array-element-newline":"off","vue/arrow-spacing":"off","vue/block-spacing":"off","vue/brace-style":"off","vue/camelcase":"error","vue/comma-dangle":"off","vue/comma-spacing":"off","vue/comma-style":"off","vue/dot-location":"off","vue/dot-notation":"error","vue/eqeqeq":"error","vue/func-call-spacing":"off","vue/key-spacing":"off","vue/keyword-spacing":"off","vue/max-len":"off","vue/multiline-ternary":"off","vue/no-console":"off","vue/no-constant-condition":"error","vue/no-extra-parens":"off","vue/no-empty-pattern":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-restricted-syntax":"off","vue/no-sparse-arrays":"error","vue/no-useless-concat":"error","vue/object-curly-newline":"off","vue/object-curly-spacing":"off","vue/object-property-newline":"off","vue/object-shorthand":"error","vue/operator-linebreak":"off","vue/prefer-template":"error","vue/quote-props":"off","vue/space-in-parens":"off","vue/space-infix-ops":"off","vue/space-unary-ops":"off","vue/template-curly-spacing":"off",...r}}]}function de(){let e=fe("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}import{FlatConfigComposer as ve}from"eslint-flat-config-utils";import{isBoolean as ge}from"@lntvow/utils";import{isPackageExists as h}from"local-pkg";var ye=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],xe={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function be(e={},...r){if("files"in e)throw new Error('[@lntvow/eslint-config] The first argument should not contain the "files" property as the options are supposed to be global. Place it in the second or later config instead.');let{autoRenamePlugins:n=!0,componentExts:a=[],gitignore:f=!0,regexp:s=!0,typescript:u=h("typescript"),vue:d=["vue","nuxt","vitepress"].some(x=>h(x)),test:b=h("vitest"),stylistic:y=!0}=e,i=[];i.push(G(e.ignores),C(),P({...m(e,"javascript")}),B({typescript:!!u})),f&&i.push(k({...m(e,"gitignore")})),d&&a.push("vue"),u&&i.push(V({...m(e,"typescript"),componentExts:a})),d&&i.push($({...m(e,"vue")})),s&&i.push(q({...m(e,"regexp")})),b&&i.push(A({...m(e,"test")})),y&&i.push(N({...m(e,"stylistic")})),i.push(E(),I());let p=ye.reduce((x,w)=>(w in e&&(x[w]=e[w]),x),{});Object.keys(p).length&&i.push([p]);let v=new ve;return v=v.append(...i,...r),n&&(v=v.renamePlugins(xe)),v}function m(e,r){return ge(e[r])?{}:e[r]||{}}export{Ne as GLOB_ALL_SRC,Ee as GLOB_ASTRO,je as GLOB_CSS,F as GLOB_EXCLUDE,Re as GLOB_GRAPHQL,Y as GLOB_HTML,Le as GLOB_JS,X as GLOB_JSON,K as GLOB_JSON5,Ge as GLOB_JSONC,Se as GLOB_JSX,Ie as GLOB_LESS,S as GLOB_MARKDOWN,qe as GLOB_MARKDOWN_CODE,Be as GLOB_MARKDOWN_IN_MARKDOWN,Fe as GLOB_POSTCSS,ke as GLOB_SCSS,g as GLOB_SRC,c as GLOB_SRC_EXT,M as GLOB_STYLE,W as GLOB_SVELTE,j as GLOB_TESTS,Pe as GLOB_TOML,_ as GLOB_TS,L as GLOB_TSX,O as GLOB_VUE,H as GLOB_XML,J as GLOB_YAML,we as combine,C as custom,I as disables,k as gitignore,G as ignores,B as imports,P as javascript,be as lntvow,oe as notInRecommendedRules,E as prettier,q as regexp,T as renameRules,N as stylistic,A as test,V as typescript,$ as vue};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/eslint-config",
3
- "version": "9.23.0",
3
+ "version": "9.23.2",
4
4
  "description": "eslint-config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -59,10 +59,10 @@
59
59
  "typescript": "^5.8.2",
60
60
  "typescript-eslint": "^8.28.0",
61
61
  "vue-eslint-parser": "^9.4.3",
62
- "@lntvow/eslint-plugin": "^9.23.0"
62
+ "@lntvow/eslint-plugin": "^9.23.2"
63
63
  },
64
64
  "scripts": {
65
- "dev": "tsup src/index.ts --watch --format esm --no-sourcemap --no-dts ",
65
+ "dev": "pnpm -r dev && tsup --config tsup.dev.config.ts",
66
66
  "typegen": "pnpm -r build && tsx scripts/typegen.ts",
67
67
  "build": "pnpm typegen && tsup",
68
68
  "inspect": "pnpm eslint --inspect-config",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts","../src/utils/index.ts","../src/configs/custom.ts","../src/globs.ts","../src/configs/disables.ts","../src/configs/gitignore.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/prettier.ts","../src/configs/regexp.ts","../src/configs/stylistic.ts","../src/configs/test.ts","../src/configs/typescript.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["export * from './utils'\n\nexport * from './configs'\n\nexport * from './globs'\n\nexport { lntvow } from './factory'\n","import type { AnyObject } from '@lntvow/utils'\nimport type { Awaitable, TypedFlatConfigItem } from '../types'\n\n/**\n * Rename plugin prefixes in a rule object.\n * Accepts a map of prefixes to rename.\n *\n * @example\n * ```ts\n * import { renameRules } from '@lntvow/eslint-config'\n *\n * export default [{\n * rules: renameRules(\n * {\n * '@typescript-eslint/indent': 'error'\n * },\n * { '@typescript-eslint': 'ts' }\n * )\n * }]\n * ```\n */\nexport function renameRules(rules: AnyObject, map: Record<string, string>) {\n return Object.fromEntries(\n Object.entries(rules).map(([key, value]) => {\n for (const [from, to] of Object.entries(map)) {\n if (key.startsWith(`${from}/`)) return [to + key.slice(from.length), value]\n }\n return [key, value]\n })\n )\n}\n\nexport async function combine(\n ...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]\n): Promise<TypedFlatConfigItem[]> {\n const resolved = await Promise.all(configs)\n return resolved.flat()\n}\n","import lntvowPlugin from '@lntvow/eslint-plugin'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function custom(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/custom/setup',\n plugins: {\n lntvow: lntvowPlugin,\n },\n },\n ]\n}\n","/* eslint-disable style/padding-line-between-statements */\nexport 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_STYLE = '**/*.{c,le,sc}ss'\nexport const GLOB_CSS = '**/*.css'\nexport const GLOB_POSTCSS = '**/*.{p,post}css'\nexport const GLOB_LESS = '**/*.less'\nexport const GLOB_SCSS = '**/*.scss'\n\nexport const GLOB_JSON = '**/*.json'\nexport const GLOB_JSON5 = '**/*.json5'\nexport const GLOB_JSONC = '**/*.jsonc'\n\nexport const GLOB_MARKDOWN = '**/*.md'\nexport const GLOB_MARKDOWN_IN_MARKDOWN = '**/*.md/*.md'\nexport const GLOB_SVELTE = '**/*.svelte'\nexport const GLOB_VUE = '**/*.vue'\nexport const GLOB_YAML = '**/*.y?(a)ml'\nexport const GLOB_TOML = '**/*.toml'\nexport const GLOB_XML = '**/*.xml'\nexport const GLOB_HTML = '**/*.htm?(l)'\nexport const GLOB_ASTRO = '**/*.astro'\nexport const GLOB_GRAPHQL = '**/*.{g,graph}ql'\n\nexport const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`\n\nexport const GLOB_TESTS = [\n `**/__tests__/**/*.${GLOB_SRC_EXT}`,\n `**/*.spec.${GLOB_SRC_EXT}`,\n `**/*.test.${GLOB_SRC_EXT}`,\n `**/*.bench.${GLOB_SRC_EXT}`,\n `**/*.benchmark.${GLOB_SRC_EXT}`,\n]\n\nexport const GLOB_ALL_SRC = [\n GLOB_SRC,\n GLOB_STYLE,\n GLOB_JSON,\n GLOB_JSON5,\n GLOB_MARKDOWN,\n GLOB_SVELTE,\n GLOB_VUE,\n GLOB_YAML,\n GLOB_XML,\n GLOB_HTML,\n]\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\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 { GLOB_SRC, GLOB_SRC_EXT } from '../globs'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function disables(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n files: [`scripts/${GLOB_SRC}`],\n name: 'lntvow/disables/scripts',\n rules: {\n 'no-console': 'off',\n // 'ts/explicit-function-return-type': 'off',\n // 'unicorn/consistent-function-scoping': 'off',\n },\n },\n {\n files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],\n name: 'lntvow/disables/cli',\n rules: {\n 'no-console': 'off',\n },\n },\n {\n files: ['**/*.d.?([cm])ts'],\n name: 'lntvow/disables/dts',\n rules: {\n // 'eslint-comments/no-unlimited-disable': 'off',\n // 'import/no-duplicates': 'off',\n // 'no-restricted-syntax': 'off',\n // 'unused-imports/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.([tj])s?(x)'],\n name: 'lntvow/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs'],\n name: 'lntvow/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n },\n },\n ]\n}\n","import fs from 'fs'\nimport { castArray } from '@lntvow/utils'\nimport { convertIgnorePatternToMinimatch } from '@eslint/compat'\nimport type { FlatGitignoreOptions, TypedFlatConfigItem } from '../types'\n\nexport async function gitignore(options: FlatGitignoreOptions): Promise<TypedFlatConfigItem[]> {\n const { findUpSync } = await import('find-up-simple')\n\n const {\n name = '.gitignore',\n root = false,\n files: _files = root ? name : findUpSync(name) || [],\n strict = false,\n } = options\n\n const files = castArray(_files)\n\n const ignores = []\n for (const file of files) {\n let ignoreFile\n try {\n ignoreFile = fs.readFileSync(file, 'utf8')\n } catch (error) {\n if (strict) throw error\n continue\n }\n const lines = ignoreFile.split(/\\r?\\n/u)\n\n ignores.push(\n ...lines\n .map(line => line.trim())\n .filter(line => line && !line.startsWith('#'))\n .map(convertIgnorePatternToMinimatch)\n )\n }\n if (strict && files.length === 0) throw new Error('No .gitignore file found')\n\n return [\n {\n name: 'lntvow/gitignore',\n ignores,\n },\n ]\n}\n","import { GLOB_EXCLUDE } from '../globs'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function ignores(ignoresList: string[] = []): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/ignores',\n ignores: [...GLOB_EXCLUDE, ...ignoresList],\n },\n ]\n}\n","import pluginImport from 'eslint-plugin-import-x'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function imports(options: { typescript?: boolean } = {}): Promise<TypedFlatConfigItem[]> {\n const { typescript = false } = options\n\n return [\n {\n name: 'lntvow/imports/setup',\n plugins: {\n import: pluginImport,\n },\n },\n {\n name: 'lntvow/imports/rules',\n rules: {\n // Helpful warnings\n // 禁止重复导入\n // 'import/export': 'error',\n // 禁止导入废弃的内容\n // 'import/no-deprecated': 'warn',\n // 禁止空的导入\n // 'import/no-empty-named-blocks': 'error',\n // 幽灵依赖\n // 'import/no-extraneous-dependencies': 'error',\n // 禁止使用var或let进行可变导出\n // 'import/no-mutable-exports': 'error',\n // // 'import/no-named-as-default': 'error',\n // // 'import/no-named-as-default-member': 'error',\n // // 'import/no-unused-modules': 'error',\n // // Module systems\n // // 'import/no-amd': 'off',\n // // 'import/no-commonjs': 'off',\n // // 'import/no-import-module-exports': 'off',\n // // 'import/no-nodejs-modules': 'off',\n // // 'import/unambiguous': 'off',\n // // Static analysis\n // // 'import/default': 'error',\n // // 'import/named': 'error',\n // // 'import/namespace': 'error',\n // // 'import/no-absolute-path': 'error',\n // // 'import/no-cycle': 'off',\n // // 'import/no-dynamic-require': 'off',\n // // 'import/no-internal-modules': 'off',\n // // 'import/no-relative-packages': 'off',\n // // 'import/no-relative-parent-imports': 'off',\n // // 'import/no-restricted-paths': 'off',\n // // 'import/no-self-import': 'off',\n // 'import/no-unresolved': 'error',\n // // 'import/no-useless-path-segments': 'error',\n // // 'import/no-webpack-loader-syntax': 'error',\n // // Style guide\n // // 'import/consistent-type-specifier-style': 'off',\n // // 'import/dynamic-import-chunkname': 'off',\n // // 'import/exports-last': 'off',\n // // 'import/extensions': 'off',\n 'import/first': 'error',\n // // 'import/group-exports': 'off',\n // // 'import/max-dependencies': 'off',\n 'import/newline-after-import': 'error',\n // // 'import/no-anonymous-default-export': 'off',\n // // 'import/no-default-export': 'off',\n // 'import/no-duplicates': 'error',\n // // 'import/no-named-default': 'off',\n // // 'import/no-named-export': 'off',\n // // 'import/no-namespace': 'off',\n // // 'import/no-unassigned-import': 'off',\n 'import/order': 'error',\n // // 'import/prefer-default-export': 'off',\n },\n settings: {\n // 'import-x/resolver': {\n // alias: {\n // map: [['@', './src']],\n // extensions: ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx', '.cjs', '.mjs', '.d.ts'],\n // },\n // node: true,\n // typescript: true,\n // },\n // 'import-x/parsers': {\n // '@typescript-eslint/parser': [],\n // },\n },\n },\n ]\n}\n","import js from '@eslint/js'\nimport globals from 'globals'\nimport type { OptionsOverrides, Rules, TypedFlatConfigItem } from '../types'\n\nexport async function javascript(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options\n return [\n {\n name: 'lntvow/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n parserOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n // ...globals.browser,\n // ...globals.node,\n },\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'warn',\n },\n },\n {\n name: 'lntvow/javascript/rules',\n rules: {\n ...js.configs.recommended.rules,\n\n // not in recommended\n ...notInRecommendedRules,\n\n // 禁止未使用过的变量\n 'no-unused-vars': 'warn',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n\nexport const notInRecommendedRules: Partial<Rules> = {\n 'array-callback-return': 'error', // 数组方法必须有返回值\n 'no-await-in-loop': 'off', // 禁止在循环中出现 await\n 'no-constructor-return': 'error', // 禁止构造函数返回值\n 'no-duplicate-imports': 'error', // 禁止重复导入\n 'no-inner-declarations': 'error', // 禁止在嵌套块中出现变量声明或 function 声明\n 'no-promise-executor-return': 'error', // 禁止在 Promise executor 中返回值\n 'no-self-compare': 'error', // 禁止自身比较\n 'no-template-curly-in-string': 'error', // 禁止在常规字符串中出现模板字面量占位符语法\n 'no-unmodified-loop-condition': 'error', // 禁用一成不变的循环条件\n 'no-unreachable-loop': 'error', // 禁止在循环中出现不可能到达的代码\n 'no-use-before-define': ['error', { functions: false, variables: false }], // 禁止定义前使用\n 'no-useless-assignment': 'off', // 禁止无用的分配 有时候需要置空变量时候需要用到\n 'require-atomic-updates': 'off', // 禁止使用 await 或 yield 导致竞争条件的分配\n 'accessor-pairs': 'error', // 强制 getter 和 setter 在对象中成对出现\n 'arrow-body-style': 'error', // 要求箭头函数体使用大括号\n 'block-scoped-var': 'error', // 强制把变量的使用限制在其定义的作用域范围内\n 'camelcase': 'warn', // 强制使用骆驼拼写法命名约定\n 'capitalized-comments': 'off', // 强制注释首字母大写 有时候不需要\n 'class-methods-use-this': 'error', // 强制类方法使用 this\n 'complexity': 'off', // 指定程序中允许的最大环路复杂度\n 'consistent-return': 'off', // 强制函数要么都有返回值或者没有返回值 有时候需要做短路处理\n 'consistent-this': 'off', // 当获取当前环境的 this 是用一样的风格\n 'curly': ['error', 'multi-line'], // 强制所有控制语句使用一致的括号风格\n 'default-case': 'error', // 要求 switch 语句中有 default 分支\n 'default-case-last': 'error', // 要求 switch 语句中有 default 分支放在最后\n 'default-param-last': 'error', // 要求默认参数放在最后\n 'dot-notation': 'error', // 强制尽可能使用点号\n 'eqeqeq': 'error', // 要求使用 === 和 !==\n 'func-name-matching': 'error', // 要求函数名与赋值给它们的变量名或属性名相匹配\n 'func-names': 'off', // 要求或禁止命名的 function 表达式 不需要\n 'func-style': 'off', // 强制一致地使用 function 声明或表达式 不需要\n 'grouped-accessor-pairs': 'error', // 强制 getter 和 setter 相邻出现\n 'guard-for-in': 'off', // 要求 for-in 循环中有一个 if 语句 不需要\n 'id-denylist': 'off', // 禁用指定的标识符\n 'id-length': 'off', // 强制标识符的最小和最大长度 不太好用\n 'id-match': 'off', // 要求标识符匹配一个指定的正则表达式\n 'init-declarations': 'off', // 要求或禁止在变量声明中进行初始化\n 'logical-assignment-operators': 'error', // 强制逻辑赋值操作符的使用\n 'max-classes-per-file': 'off', // 强制每个文件中包含的的类的最大数量\n 'max-depth': 'off', // 强制可嵌套的块的最大深度\n 'max-lines': 'off', // 强制最大行数\n 'max-lines-per-function': 'off', // 强制函数最大行数\n 'max-nested-callbacks': 'off', // 强制回调函数最大嵌套深度\n 'max-params': 'off', // 强制函数定义中最多允许的参数数量\n 'max-statements': 'off', // 强制函数块最多允许的的语句数量\n 'new-cap': ['error', { capIsNew: false }], // 要求构造函数首字母大写\n 'no-alert': 'error', // 禁用 alert、confirm 和 prompt\n 'no-array-constructor': 'error', // 禁用 Array 构造函数\n 'no-bitwise': 'off', // 禁止使用按位操作符\n 'no-caller': 'error', // 禁用 arguments.caller 或 arguments.callee\n 'no-console': 'warn', // 禁止使用 console\n 'no-continue': 'off', // 禁用 continue\n 'no-div-regex': 'error', // 禁止除法操作符显式的出现在正则表达式开始的位置\n 'no-else-return': 'error', // 禁止 if 语句中 return 语句之后有 else 块\n 'no-empty-function': 'error', // 禁止出现空函数\n 'no-eq-null': 'error', // 禁止在没有类型检查操作符的情况下与 null 进行比较\n 'no-eval': 'error', // 禁用 eval()\n 'no-extend-native': 'error', // 禁止扩展原生对象\n 'no-extra-bind': 'error', // 禁止不必要的 .bind() 调用\n 'no-extra-label': 'error', // 禁用不必要的标签\n 'no-implicit-coercion': 'error', // 禁止使用短符号进行类型转换\n 'no-implicit-globals': 'error', // 禁止在全局范围内使用变量声明和 function 声明\n 'no-implied-eval': 'error', // 禁止使用类似 eval() 的方法\n 'no-inline-comments': 'off', // 禁止在代码后使用内联注释\n 'no-invalid-this': 'error', // 禁止 this 关键字出现在类和类对象之外\n 'no-iterator': 'error', // 禁用 __iterator__ 属性\n 'no-label-var': 'error', // 禁用与变量同名的标签\n 'no-labels': 'error', // 禁用标签语句\n 'no-lone-blocks': 'error', // 禁用不必要的嵌套块\n 'no-lonely-if': 'error', // 禁止 if 作为唯一的语句出现在 else 语句中\n 'no-loop-func': 'error', // 禁止在循环中出现 function 声明和表达式\n 'no-magic-numbers': 'off', // 禁止使用魔术数字\n 'no-multi-assign': 'error', // 禁止连续赋值\n 'no-multi-str': 'error', // 禁止使用多行字符串\n 'no-negated-condition': 'off', // 禁用否定表达式\n 'no-nested-ternary': 'off', // 禁止使用嵌套的三元表达式\n 'no-new': 'off', // 禁止使用 new 操作符\n 'no-new-func': 'error', // 禁止对 Function 对象使用 new 操作符\n 'no-new-wrappers': 'error', // 禁止对 String,Number 和 Boolean 使用 new 操作符\n 'no-object-constructor': 'error', // 禁用 Object 的构造函数\n 'no-octal-escape': 'error', // 禁止在字符串中使用八进制转义序列\n 'no-param-reassign': 'off', // 禁止对 function 的参数进行重新赋值\n 'no-plusplus': 'off', // 禁用一元操作符 ++ 和 --\n 'no-proto': 'error', // 禁用 __proto__ 属性\n 'no-restricted-exports': 'off', // 禁用特定的导出\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ], // 禁用特定的全局变量\n 'no-restricted-imports': 'off', // 禁用特定的导入\n 'no-restricted-properties': [\n 'error',\n { message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.', property: '__proto__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineGetter__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineSetter__' },\n { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupGetter__' },\n { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupSetter__' },\n ], // 禁止使用对象的某些属性\n 'no-restricted-syntax': 'off', // 禁用特定的语法\n 'no-return-assign': 'error', // 禁止在返回语句中赋值\n 'no-script-url': 'error', // 禁用 Script URL\n 'no-sequences': 'error', // 禁用逗号操作符\n 'no-shadow': 0, // 禁止变量声明与外层作用域的变量同名\n 'no-ternary': 'off', // 禁用三元操作符\n 'no-throw-literal': 'off', // 禁止抛出异常字面量\n 'no-undef-init': 'error', // 禁止将变量初始化为 undefined\n 'no-undefined': 'off', // 禁用 undefined\n 'no-underscore-dangle': 'off', // 禁止标识符中有下划线\n 'no-unneeded-ternary': 'error', // 强制可以表达为更简单结构的三元操作符\n 'no-unused-expressions': ['error', { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true }], // 禁用无意义的表达式\n 'no-useless-call': 'error', // 禁止不必要的 .call() 和 .apply()\n 'no-useless-computed-key': 'error', // 禁止在对象中使用不必要的计算属性\n 'no-useless-concat': 'error', // 禁止不必要的字符串字面量或模板字面量的连接\n 'no-useless-constructor': 'error', // 禁用不必要的构造函数\n 'no-useless-rename': 'error', // 禁止在 import 和 export 和解构赋值时将引用重命名为相同的名字\n 'no-useless-return': 'error', // 禁止多余的 return 语句\n 'no-var': 'error', // 要求使用 let 或 const 而不是 var\n 'no-void': 'off', // 禁用 void 操作符\n 'no-warning-comments': 'off', // 禁止在注释中使用特定的警告术语\n 'object-shorthand': 'error', // 要求对象字面量简写语法\n 'one-var': 'off', // 强制函数中的变量在一起声明\n 'operator-assignment': 'error', // 要求或禁止尽可能地简化赋值操作\n 'prefer-arrow-callback': 'error', // 要求使用箭头函数作为回调\n 'prefer-const': 'error', // 要求使用 const 声明那些声明后不再被修改的变量\n 'prefer-destructuring': 'off', // 优先使用数组和对象解构\n 'prefer-exponentiation-operator': 'error', // 禁止使用 Math.pow 幂运算符\n 'prefer-named-capture-group': 'off', // 强制在正则表达式中使用命名捕获组\n 'prefer-numeric-literals': 'off', // 禁用 parseInt() 和 Number.parseInt(),使用二进制,八进制和十六进制字面量\n 'prefer-object-has-own': 'error', // 要求使用 Object.prototype.hasOwnProperty.call(foo, 'bar') 代替 foo.hasOwnProperty('bar')\n 'prefer-object-spread': 'error', // 要求使用对象扩展运算符而非 Object.assign\n 'prefer-promise-reject-errors': 'off', // 要求使用 Error 对象作为 Promise 拒绝的原因\n 'prefer-regex-literals': 'off', // 禁止使用 RegExp 构造函数\n 'prefer-rest-params': 'error', // 要求使用剩余参数而不是 arguments\n 'prefer-spread': 'error', // 要求使用扩展语法而非 .apply()\n 'prefer-template': 'error', // 要求使用模板字面量而非字符串连接\n 'radix': 'off', // 强制在parseInt()使用基数参数\n 'require-await': 'off', // 禁止使用不带 await 表达式的 async 函数\n 'require-unicode-regexp': 'off', // 强制在RegExp上使用u标志\n 'sort-imports': 'off', // imports排序 不好用\n 'sort-keys': 'off', // 要求对象属性按序排列 不好用\n 'sort-vars': 'off', // 要求同一个声明块中的变量按顺序排列 不好用\n 'strict': 'off', // 要求或禁止使用严格模式指令\n 'symbol-description': 'error', // 要求 symbol 描述\n 'vars-on-top': 'error', // 要求所有的 var 声明出现在它们所在的作用域顶部\n 'yoda': 'error', // 要求或禁止 “Yoda” 条件\n 'unicode-bom': 'error', // 要求或禁止 Unicode 字节顺序标记 (BOM)\n}\n","import pluginPrettier from 'eslint-plugin-prettier'\nimport prettierConfig from 'eslint-config-prettier'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/prettier/setup',\n plugins: {\n prettier: pluginPrettier,\n },\n },\n {\n name: 'lntvow/prettier/rules',\n rules: {\n ...prettierConfig.rules,\n 'prettier/prettier': 'warn',\n },\n },\n ]\n}\n","import { configs } from 'eslint-plugin-regexp'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\n\nexport async function regexp(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides } = options\n\n const pluginRegexp = configs['flat/recommended'].plugins.regexp\n const { rules } = configs['flat/recommended']\n\n return [\n {\n name: 'lntvow/regexp/setup',\n plugins: {\n regexp: pluginRegexp,\n },\n },\n {\n name: 'lntvow/regexp/rules',\n rules: {\n ...rules,\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import pluginStylistic from '@stylistic/eslint-plugin'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\n\nexport async function stylistic(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options\n\n return [\n {\n name: 'lntvow/stylistic/setup',\n plugins: {\n style: pluginStylistic,\n },\n },\n {\n name: 'lntvow/stylistic/rules',\n rules: {\n // Custom rules\n 'style/spaced-comment': 'error',\n 'style/padding-line-between-statements': [\n 'error',\n { blankLine: 'always', prev: '*', next: 'cjs-export' },\n { blankLine: 'always', prev: '*', next: 'export' },\n { blankLine: 'always', prev: '*', next: 'function' },\n { blankLine: 'always', prev: '*', next: ['interface', 'type'] },\n { blankLine: 'never', prev: 'function-overload', next: 'function' },\n ],\n 'style/lines-around-comment': [\n 2,\n {\n beforeBlockComment: true,\n allowBlockStart: true,\n allowObjectStart: true,\n allowInterfaceStart: true,\n allowTypeStart: true,\n allowArrayStart: true,\n allowClassStart: true,\n allowModuleStart: true,\n },\n ],\n\n // overrides\n ...overrides,\n },\n },\n ]\n}\n","import pluginVitest from 'eslint-plugin-vitest'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\nimport { GLOB_TESTS } from '../globs'\n\nexport async function test(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides } = options\n\n return [\n {\n name: 'lntvow/test/setup',\n plugins: {\n test: pluginVitest,\n },\n },\n {\n name: 'lntvow/test/rules',\n files: [...GLOB_TESTS],\n rules: {\n 'lntvow/newline-before-describe-test': 'error',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import { parser as parserTs, plugin as pluginTs, configs } from 'typescript-eslint'\nimport type { Linter } from 'eslint'\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport type { OptionsComponentExts, OptionsTypeScript, TypedFlatConfigItem } from '../types'\nimport { renameRules } from '../utils'\n\nexport async function typescript(\n options: OptionsTypeScript & OptionsComponentExts = {}\n): Promise<TypedFlatConfigItem[]> {\n const { componentExts = [], overrides = {}, parserOptions = {} } = options\n\n const files = [GLOB_TS, GLOB_TSX, ...componentExts.map(ext => `**/*.${ext}`)]\n\n // const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX]\n // const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : undefined\n // const isTypeAware = !!tsconfigPath\n\n return [\n {\n name: 'lntvow/typescript/setup',\n plugins: {\n ts: pluginTs,\n },\n },\n {\n name: 'lntvow/typescript/rules',\n languageOptions: {\n parser: parserTs as Linter.Parser,\n parserOptions: {\n sourceType: 'module',\n },\n },\n files,\n rules: {\n ...renameRules(\n configs.strict\n .map(item => item.rules)\n .filter(Boolean)\n .reduce((acc, cur) => ({ ...acc, ...cur }), {})!,\n { '@typescript-eslint': 'ts' }\n ),\n\n // Override default configuration\n // 禁止使用!断言\n 'ts/no-non-null-assertion': 'off',\n // 禁止使用any\n 'ts/no-explicit-any': 'off',\n // 禁止使用ts注释\n 'ts/ban-ts-comment': 'off',\n // 未使用的变量\n 'ts/no-unused-vars': 'warn',\n\n // Override javascript configuration\n 'no-use-before-define': 'off',\n 'ts/no-use-before-define': ['error', { functions: false, variables: false }],\n 'no-unused-expressions': 'off',\n 'ts/no-unused-expressions': [\n 'error',\n { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true },\n ],\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import { getPackageInfoSync } from 'local-pkg'\nimport { parser as parserTs } from 'typescript-eslint'\nimport parserVue from 'vue-eslint-parser'\nimport pluginVue from 'eslint-plugin-vue'\nimport { GLOB_VUE } from '../globs'\nimport type { OptionsVue, TypedFlatConfigItem } from '../types'\n\nconst vue3Rules: TypedFlatConfigItem['rules'] = {\n ...pluginVue.configs['vue3-essential'].rules,\n ...pluginVue.configs['vue3-strongly-recommended'].rules,\n ...pluginVue.configs['vue3-recommended'].rules,\n 'vue/block-lang': ['error', { script: { lang: ['ts', 'tsx'] } }],\n 'vue/block-order': ['error', { order: ['script[setup]', 'template', 'style[scoped]'] }],\n 'vue/component-api-style': 'error',\n 'vue/no-deprecated-model-definition': 'error',\n}\n\nconst vue2Rules: TypedFlatConfigItem['rules'] = {\n ...pluginVue.configs.essential.rules,\n ...pluginVue.configs['strongly-recommended'].rules,\n ...pluginVue.configs.recommended.rules,\n 'vue/block-lang': ['error', { script: { allowNoLang: true } }],\n 'vue/block-order': ['error', { order: [['script', 'template'], 'style[scoped]'] }],\n}\n\nexport async function vue(options: OptionsVue = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, vueVersion = getVueVersion() } = options\n\n return [\n {\n name: 'lntvow/vue/setup',\n plugins: {\n vue: pluginVue,\n },\n },\n {\n name: 'lntvow/vue/rules',\n languageOptions: {\n parser: parserVue,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n parser: {\n ts: parserTs,\n tsx: parserTs,\n },\n sourceType: 'module',\n },\n },\n processor: pluginVue.processors['.vue'],\n files: [GLOB_VUE],\n rules: {\n ...pluginVue.configs.base.rules,\n ...(vueVersion === 3 ? vue3Rules : vue2Rules),\n\n // Override default configuration\n // vue禁用多个单词组件名\n 'vue/multi-word-component-names': 'off',\n // vue禁用 属性-连接 个人喜欢驼峰\n 'vue/attribute-hyphenation': 'off',\n // vue禁用标签缩进\n 'vue/html-indent': 'off',\n // 标签自闭合\n 'vue/html-self-closing': [\n 'error',\n {\n html: { void: 'always', normal: 'always', component: 'always' },\n svg: 'always',\n math: 'always',\n },\n ],\n // vue禁用标签属性换行\n 'vue/max-attributes-per-line': 'off',\n // vue内容强制换行\n 'vue/singleline-html-element-content-newline': 'off',\n // 禁用事件驼峰 个人喜欢驼峰\n 'vue/v-on-event-hyphenation': 'off',\n\n // Custom rules\n // 标签换行\n 'vue/block-tag-newline': 'error',\n // 强制模板组件名称为PascalCase\n 'vue/component-name-in-template-casing': ['error', 'PascalCase', { ignores: ['/-/'] }],\n // 强制组件名大驼峰\n 'vue/component-options-name-casing': 'error',\n // 强制事件名小驼峰\n 'vue/custom-event-name-casing': 'error',\n // 强制定义emits\n 'vue/define-emits-declaration': 'error',\n // 强制定义宏defineProps defineEmits的顺序\n 'vue/define-macros-order': 'error',\n // 强制定义props\n 'vue/define-props-declaration': 'error',\n // 强制style属性\n 'vue/enforce-style-attribute': 'error',\n // 禁止button没有type\n 'vue/html-button-has-type': 'off',\n // 强制html注释换行\n 'vue/html-comment-content-newline': 'error',\n // 强制html注释空格\n 'vue/html-comment-content-spacing': 'error',\n // 强制html注释缩进\n 'vue/html-comment-indent': 'off',\n // 强制组件名和文件名一致\n 'vue/match-component-file-name': ['error', { extensions: ['jsx', 'tsx'], shouldMatchCase: true }],\n // 强制组件名导入名称一致\n 'vue/match-component-import-name': 'error',\n // 强制单个标签最大行数\n 'vue/max-lines-per-block': 'off',\n // 限制 props 属性的最大数量\n 'vue/max-props': 'off',\n // 强制模板最大深度\n 'vue/max-template-depth': 'off',\n // 强制多行属性空行\n 'vue/new-line-between-multi-line-property': 'off',\n // 强制nextTick风格\n 'vue/next-tick-style': 'off',\n // 禁止模板中出现未翻译的字符串\n 'vue/no-bare-strings-in-template': 'off',\n // 布尔类型默认值校验\n 'vue/no-boolean-default': 'off',\n // 禁止使用已弃用的v-model定义\n 'vue/no-deprecated-model-definition': 'error',\n // 禁止重复继承属性\n 'vue/no-duplicate-attr-inheritance': 'error',\n // 禁止空的标签\n 'vue/no-empty-component-block': 'off',\n // 禁止class 中出现多个对象\n 'vue/no-multiple-objects-in-class': 'error',\n // 禁止潜在的组件选项拼写错误\n 'vue/no-potential-component-option-typo': 'error',\n // 禁止ref对象丢失响应性\n 'vue/no-ref-object-reactivity-loss': 'error',\n // 禁止default和required同时存在\n 'vue/no-required-prop-with-default': 'error',\n // 禁止特定的模板语法\n 'vue/no-restricted-block': 'off',\n // 禁止await后调用特定的函数\n 'vue/no-restricted-call-after-await': 'off',\n // 禁止特定的class\n 'vue/no-restricted-class': 'off',\n // 禁止特定的组件名\n 'vue/no-restricted-component-names': 'off',\n // 禁止特定的组件选项\n 'vue/no-restricted-component-options': 'off',\n // 禁止特定的事件名\n 'vue/no-restricted-custom-event': 'off',\n // 禁止特定的html标签\n 'vue/no-restricted-html-elements': 'off',\n // 禁止特定的props\n 'vue/no-restricted-props': 'off',\n // 禁止特定的静态属性\n 'vue/no-restricted-static-attribute': 'off',\n // 禁止特定的v-bind\n 'vue/no-restricted-v-bind': 'off',\n // 禁止根元素使用v-if\n 'vue/no-root-v-if': 'off',\n // 禁止setup中props丢失响应性\n 'vue/no-setup-props-reactivity-loss': 'error',\n // 禁止内联样式\n 'vue/no-static-inline-styles': 'error',\n // 禁止target=\"_blank\"\n 'vue/no-template-target-blank': 'error',\n // 禁止在beforeRouteEnter中使用this\n 'vue/no-this-in-before-route-enter': 'error',\n // 禁止未定义的组件\n 'vue/no-undef-components': 'off',\n // 禁止未定义的属性 mixin vuex冲突\n 'vue/no-undef-properties': 'error',\n // 禁止不支持的特性\n 'vue/no-unsupported-features': 'off',\n // 禁止未使用的emits\n 'vue/no-unused-emit-declarations': 'error',\n // 未使用属性校验\n 'vue/no-unused-properties': ['warn', { groups: ['props', 'data', 'computed', 'methods', 'setup'] }],\n // 禁止未使用属性ref\n 'vue/no-unused-refs': 'error',\n // 禁止v-else和v-for同时使用\n 'vue/no-use-v-else-with-v-for': 'error',\n // 禁止使用无效的模板语法\n 'vue/no-useless-mustaches': 'error',\n // v-bind强制简写\n 'vue/no-useless-v-bind': 'error',\n // 禁止使用v-text\n 'vue/no-v-text': 'error',\n // 模板三标签之间强制空一行\n 'vue/padding-line-between-blocks': 'error',\n // 禁止模板空行\n 'vue/padding-line-between-tags': ['error', [{ blankLine: 'never', prev: '*', next: '*' }]],\n // 组件定义强制空行\n 'vue/padding-lines-in-component-definition': ['error', { betweenOptions: 'never' }],\n // 宏定义选项强制\n 'vue/prefer-define-options': 'error',\n // props强制boolean类型在前\n 'vue/prefer-prop-type-boolean-first': 'error',\n // 要求模板中的静态类名位于单独的class属性中\n 'vue/prefer-separate-static-class': 'error',\n // props 强制true简写\n 'vue/prefer-true-attribute-shorthand': 'error',\n // 要求组件默认导出\n 'vue/require-default-export': 'off',\n // 要求组件直接导出\n 'vue/require-direct-export': 'error',\n // 要求emit事件校验\n 'vue/require-emit-validator': 'off',\n // 要求明确的插槽\n 'vue/require-explicit-slots': 'off',\n // 强制expose\n 'vue/require-expose': 'error',\n // 宏定义变量名强制\n 'vue/require-macro-variable-name': 'error',\n // 强制name属性\n 'vue/require-name-property': 'off',\n // 强制prop注释\n 'vue/require-prop-comment': 'off',\n // 强制对象类型\n 'vue/require-typed-object-prop': 'error',\n // 强制ref类型\n 'vue/require-typed-ref': 'error',\n // script缩进\n 'vue/script-indent': 'off',\n // 强制属性排序\n 'vue/sort-keys': 'off',\n // class排序\n 'vue/static-class-names-order': 'error',\n // 强制v-for指令的分隔符样式\n 'vue/v-for-delimiter-style': 'error',\n // 强制v-on指令的风格\n 'vue/v-on-handler-style': 'off',\n // 宏定义选项校验\n 'vue/valid-define-options': 'error',\n\n // Stylistic\n 'vue/array-bracket-newline': 'off',\n 'vue/array-bracket-spacing': 'off',\n 'vue/array-element-newline': 'off',\n 'vue/arrow-spacing': 'off',\n 'vue/block-spacing': 'off',\n 'vue/brace-style': 'off',\n // 强制驼峰\n 'vue/camelcase': 'error',\n 'vue/comma-dangle': 'off',\n 'vue/comma-spacing': 'off',\n 'vue/comma-style': 'off',\n 'vue/dot-location': 'off',\n // 要求使用点号\n 'vue/dot-notation': 'error',\n // 要求使用 === 和 !==\n 'vue/eqeqeq': 'error',\n 'vue/func-call-spacing': 'off',\n 'vue/key-spacing': 'off',\n 'vue/keyword-spacing': 'off',\n 'vue/max-len': 'off',\n 'vue/multiline-ternary': 'off',\n 'vue/no-console': 'off',\n // 禁止在条件中使用常量表达式\n 'vue/no-constant-condition': 'error',\n 'vue/no-extra-parens': 'off',\n // 禁止使用空解构模式\n 'vue/no-empty-pattern': 'error',\n // 禁止不规则的空白\n 'vue/no-irregular-whitespace': 'error',\n 'vue/no-loss-of-precision': 'off',\n 'vue/no-restricted-syntax': 'off',\n // 禁用稀疏数组\n 'vue/no-sparse-arrays': 'error',\n // 禁止没有必要的字符拼接\n 'vue/no-useless-concat': 'error',\n 'vue/object-curly-newline': 'off',\n 'vue/object-curly-spacing': 'off',\n 'vue/object-property-newline': 'off',\n // 要求对象字面量简写语法\n 'vue/object-shorthand': 'error',\n 'vue/operator-linebreak': 'off',\n // 优先使用模板字符串\n 'vue/prefer-template': 'error',\n 'vue/quote-props': 'off',\n 'vue/space-in-parens': 'off',\n 'vue/space-infix-ops': 'off',\n 'vue/space-unary-ops': 'off',\n 'vue/template-curly-spacing': 'off',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n\nfunction getVueVersion() {\n const pkg = getPackageInfoSync('vue', { paths: [process.cwd()] })\n if (pkg && pkg.version) {\n return Number(pkg.version[0])\n }\n\n return 3\n}\n","import { FlatConfigComposer } from 'eslint-flat-config-utils'\nimport { isBoolean } from '@lntvow/utils'\nimport { isPackageExists } from 'local-pkg'\nimport {\n gitignore,\n ignores,\n javascript,\n typescript,\n vue,\n stylistic,\n imports,\n prettier,\n regexp,\n test,\n custom,\n disables,\n} from './configs'\nimport type { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from './types'\n\nconst flatConfigProps: (keyof TypedFlatConfigItem)[] = [\n 'name',\n 'languageOptions',\n 'linterOptions',\n 'processor',\n 'plugins',\n 'rules',\n 'settings',\n]\n\nconst defaultPluginRenaming = {\n '@typescript-eslint': 'ts',\n 'import-x': 'import',\n '@stylistic': 'style',\n 'vitest': 'test',\n}\n\nexport function lntvow(\n options: OptionsConfig & TypedFlatConfigItem = {},\n ...userConfigs: Awaitable<TypedFlatConfigItem>[]\n): FlatConfigComposer<TypedFlatConfigItem, ConfigNames> {\n if ('files' in options) {\n throw new Error(\n '[@lntvow/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.'\n )\n }\n\n const {\n autoRenamePlugins = true,\n componentExts = [],\n gitignore: enableGitignore = true,\n regexp: enableRegexp = true,\n typescript: enableTypeScript = isPackageExists('typescript'),\n vue: enableVue = ['vue', 'nuxt', 'vitepress'].some(item => isPackageExists(item)),\n test: enableTest = isPackageExists('vitest'),\n stylistic: enableStylistic = true,\n } = options\n\n const configs: Awaitable<TypedFlatConfigItem[]>[] = []\n\n // Base configs\n configs.push(\n ignores(options.ignores),\n custom(),\n javascript({\n ...resolveSubOptions(options, 'javascript'),\n }),\n imports({ typescript: Boolean(enableTypeScript) })\n // comments(),\n // node(),\n // jsdoc({\n // stylistic: stylisticOptions,\n // }),\n // unicorn(),\n // command(),\n\n // Optional plugins (installed but not enabled by default)\n // perfectionist(),\n )\n if (enableGitignore) {\n configs.push(gitignore({ ...resolveSubOptions(options, 'gitignore') }))\n }\n\n if (enableVue) {\n componentExts.push('vue')\n }\n\n if (enableTypeScript) {\n configs.push(typescript({ ...resolveSubOptions(options, 'typescript'), componentExts }))\n }\n\n if (enableVue) {\n configs.push(vue({ ...resolveSubOptions(options, 'vue') }))\n }\n\n if (enableRegexp) {\n configs.push(regexp({ ...resolveSubOptions(options, 'regexp') }))\n }\n\n if (enableTest) {\n configs.push(test({ ...resolveSubOptions(options, 'test') }))\n }\n\n if (enableStylistic) {\n configs.push(stylistic({ ...resolveSubOptions(options, 'stylistic') }))\n }\n\n // if (options.jsonc ?? true) {\n // configs.push(\n // jsonc({\n // overrides: getOverrides(options, 'jsonc'),\n // stylistic: stylisticOptions,\n // }),\n // sortPackageJson(),\n // sortTsconfig(),\n // )\n // }\n\n // if (options.yaml ?? true) {\n // configs.push(yaml({\n // overrides: getOverrides(options, 'yaml'),\n // stylistic: stylisticOptions,\n // }))\n // }\n\n // if (options.toml ?? true) {\n // configs.push(toml({\n // overrides: getOverrides(options, 'toml'),\n // stylistic: stylisticOptions,\n // }))\n // }\n\n // if (options.markdown ?? true) {\n // configs.push(\n // markdown(\n // {\n // componentExts,\n // overrides: getOverrides(options, 'markdown'),\n // },\n // ),\n // )\n // }\n\n // if (options.formatters) {\n // configs.push(formatters(\n // options.formatters,\n // typeof stylisticOptions === 'boolean' ? {} : stylisticOptions,\n // ))\n // }\n\n configs.push(prettier(), disables())\n\n // User can optionally pass a flat config item to the first argument\n const fusedConfig = flatConfigProps.reduce((acc, key) => {\n if (key in options) {\n acc[key] = options[key] as any\n }\n return acc\n }, {} as TypedFlatConfigItem)\n\n if (Object.keys(fusedConfig).length) {\n configs.push([fusedConfig])\n }\n\n // Merge all configs\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>()\n composer = composer.append(...configs, ...(userConfigs as any))\n if (autoRenamePlugins) {\n composer = composer.renamePlugins(defaultPluginRenaming)\n }\n\n return composer\n}\n\ntype ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>\n\nexport function resolveSubOptions<K extends keyof OptionsConfig>(\n options: OptionsConfig,\n key: K\n): ResolvedOptions<OptionsConfig[K]> {\n return isBoolean(options[key]) ? ({} as any) : options[key] || ({} as any)\n}\n"],"mappings":"skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,kBAAAE,GAAA,eAAAC,GAAA,aAAAC,GAAA,iBAAAC,EAAA,iBAAAC,GAAA,cAAAC,EAAA,YAAAC,GAAA,cAAAC,EAAA,eAAAC,EAAA,eAAAC,GAAA,aAAAC,GAAA,cAAAC,GAAA,kBAAAC,EAAA,uBAAAC,GAAA,8BAAAC,GAAA,iBAAAC,GAAA,cAAAC,GAAA,aAAAC,EAAA,iBAAAC,EAAA,eAAAC,EAAA,gBAAAC,EAAA,eAAAC,EAAA,cAAAC,GAAA,YAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,aAAAC,EAAA,cAAAC,EAAA,YAAAC,GAAA,WAAAC,EAAA,aAAAC,EAAA,cAAAC,EAAA,YAAAC,EAAA,YAAAC,EAAA,eAAAC,EAAA,WAAAC,GAAA,0BAAAC,GAAA,aAAAC,EAAA,WAAAC,EAAA,gBAAAC,EAAA,cAAAC,EAAA,SAAAC,EAAA,eAAAC,EAAA,QAAAC,IAAA,eAAAC,GAAA9C,ICqBO,SAAS+C,EAAYC,EAAkBC,EAA6B,CACzE,OAAO,OAAO,YACZ,OAAO,QAAQD,CAAK,EAAE,IAAI,CAAC,CAACE,EAAKC,CAAK,IAAM,CAC1C,OAAW,CAACC,EAAMC,CAAE,IAAK,OAAO,QAAQJ,CAAG,EACzC,GAAIC,EAAI,WAAW,GAAGE,CAAI,GAAG,EAAG,MAAO,CAACC,EAAKH,EAAI,MAAME,EAAK,MAAM,EAAGD,CAAK,EAE5E,MAAO,CAACD,EAAKC,CAAK,CACpB,CAAC,CACH,CACF,CAEA,eAAsBG,MACjBC,EAC6B,CAEhC,OADiB,MAAM,QAAQ,IAAIA,CAAO,GAC1B,KAAK,CACvB,CCrCA,IAAAC,EAAyB,sCAGz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_SRC_EXT","GLOB_STYLE","GLOB_SVELTE","GLOB_TESTS","GLOB_TOML","GLOB_TS","GLOB_TSX","GLOB_VUE","GLOB_XML","GLOB_YAML","combine","custom","disables","gitignore","ignores","imports","javascript","lntvow","notInRecommendedRules","prettier","regexp","renameRules","stylistic","test","typescript","vue","__toCommonJS","renameRules","rules","map","key","value","from","to","combine","configs","import_eslint_plugin","custom","lntvowPlugin","GLOB_SRC_EXT","GLOB_SRC","GLOB_JS","GLOB_JSX","GLOB_TS","GLOB_TSX","GLOB_STYLE","GLOB_CSS","GLOB_POSTCSS","GLOB_LESS","GLOB_SCSS","GLOB_JSON","GLOB_JSON5","GLOB_JSONC","GLOB_MARKDOWN","GLOB_MARKDOWN_IN_MARKDOWN","GLOB_SVELTE","GLOB_VUE","GLOB_YAML","GLOB_TOML","GLOB_XML","GLOB_HTML","GLOB_ASTRO","GLOB_GRAPHQL","GLOB_MARKDOWN_CODE","GLOB_TESTS","GLOB_ALL_SRC","GLOB_EXCLUDE","disables","GLOB_SRC","GLOB_SRC_EXT","import_fs","import_utils","import_compat","gitignore","options","findUpSync","name","root","_files","strict","files","ignores","file","ignoreFile","fs","error","lines","line","ignores","ignoresList","GLOB_EXCLUDE","import_eslint_plugin_import_x","imports","options","typescript","pluginImport","import_js","import_globals","javascript","options","overrides","js","notInRecommendedRules","import_eslint_plugin_prettier","import_eslint_config_prettier","prettier","pluginPrettier","prettierConfig","import_eslint_plugin_regexp","regexp","options","overrides","pluginRegexp","rules","import_eslint_plugin","stylistic","options","overrides","pluginStylistic","import_eslint_plugin_vitest","test","options","overrides","pluginVitest","GLOB_TESTS","import_typescript_eslint","typescript","options","componentExts","overrides","parserOptions","files","GLOB_TS","GLOB_TSX","ext","pluginTs","parserTs","renameRules","item","acc","cur","import_local_pkg","import_typescript_eslint","import_vue_eslint_parser","import_eslint_plugin_vue","vue3Rules","pluginVue","vue2Rules","vue","options","overrides","vueVersion","getVueVersion","parserVue","parserTs","GLOB_VUE","pkg","import_eslint_flat_config_utils","import_utils","import_local_pkg","flatConfigProps","defaultPluginRenaming","lntvow","options","userConfigs","autoRenamePlugins","componentExts","enableGitignore","enableRegexp","enableTypeScript","enableVue","item","enableTest","enableStylistic","configs","ignores","custom","javascript","resolveSubOptions","imports","gitignore","typescript","vue","regexp","test","stylistic","prettier","disables","fusedConfig","acc","key","composer"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/index.ts","../src/configs/custom.ts","../src/globs.ts","../src/configs/disables.ts","../src/configs/gitignore.ts","../src/configs/ignores.ts","../src/configs/imports.ts","../src/configs/javascript.ts","../src/configs/prettier.ts","../src/configs/regexp.ts","../src/configs/stylistic.ts","../src/configs/test.ts","../src/configs/typescript.ts","../src/configs/vue.ts","../src/factory.ts"],"sourcesContent":["import type { AnyObject } from '@lntvow/utils'\nimport type { Awaitable, TypedFlatConfigItem } from '../types'\n\n/**\n * Rename plugin prefixes in a rule object.\n * Accepts a map of prefixes to rename.\n *\n * @example\n * ```ts\n * import { renameRules } from '@lntvow/eslint-config'\n *\n * export default [{\n * rules: renameRules(\n * {\n * '@typescript-eslint/indent': 'error'\n * },\n * { '@typescript-eslint': 'ts' }\n * )\n * }]\n * ```\n */\nexport function renameRules(rules: AnyObject, map: Record<string, string>) {\n return Object.fromEntries(\n Object.entries(rules).map(([key, value]) => {\n for (const [from, to] of Object.entries(map)) {\n if (key.startsWith(`${from}/`)) return [to + key.slice(from.length), value]\n }\n return [key, value]\n })\n )\n}\n\nexport async function combine(\n ...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]\n): Promise<TypedFlatConfigItem[]> {\n const resolved = await Promise.all(configs)\n return resolved.flat()\n}\n","import lntvowPlugin from '@lntvow/eslint-plugin'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function custom(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/custom/setup',\n plugins: {\n lntvow: lntvowPlugin,\n },\n },\n ]\n}\n","/* eslint-disable style/padding-line-between-statements */\nexport 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_STYLE = '**/*.{c,le,sc}ss'\nexport const GLOB_CSS = '**/*.css'\nexport const GLOB_POSTCSS = '**/*.{p,post}css'\nexport const GLOB_LESS = '**/*.less'\nexport const GLOB_SCSS = '**/*.scss'\n\nexport const GLOB_JSON = '**/*.json'\nexport const GLOB_JSON5 = '**/*.json5'\nexport const GLOB_JSONC = '**/*.jsonc'\n\nexport const GLOB_MARKDOWN = '**/*.md'\nexport const GLOB_MARKDOWN_IN_MARKDOWN = '**/*.md/*.md'\nexport const GLOB_SVELTE = '**/*.svelte'\nexport const GLOB_VUE = '**/*.vue'\nexport const GLOB_YAML = '**/*.y?(a)ml'\nexport const GLOB_TOML = '**/*.toml'\nexport const GLOB_XML = '**/*.xml'\nexport const GLOB_HTML = '**/*.htm?(l)'\nexport const GLOB_ASTRO = '**/*.astro'\nexport const GLOB_GRAPHQL = '**/*.{g,graph}ql'\n\nexport const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`\n\nexport const GLOB_TESTS = [\n `**/__tests__/**/*.${GLOB_SRC_EXT}`,\n `**/*.spec.${GLOB_SRC_EXT}`,\n `**/*.test.${GLOB_SRC_EXT}`,\n `**/*.bench.${GLOB_SRC_EXT}`,\n `**/*.benchmark.${GLOB_SRC_EXT}`,\n]\n\nexport const GLOB_ALL_SRC = [\n GLOB_SRC,\n GLOB_STYLE,\n GLOB_JSON,\n GLOB_JSON5,\n GLOB_MARKDOWN,\n GLOB_SVELTE,\n GLOB_VUE,\n GLOB_YAML,\n GLOB_XML,\n GLOB_HTML,\n]\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\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 { GLOB_SRC, GLOB_SRC_EXT } from '../globs'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function disables(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n files: [`scripts/${GLOB_SRC}`],\n name: 'lntvow/disables/scripts',\n rules: {\n 'no-console': 'off',\n // 'ts/explicit-function-return-type': 'off',\n // 'unicorn/consistent-function-scoping': 'off',\n },\n },\n {\n files: [`cli/${GLOB_SRC}`, `cli.${GLOB_SRC_EXT}`],\n name: 'lntvow/disables/cli',\n rules: {\n 'no-console': 'off',\n },\n },\n {\n files: ['**/*.d.?([cm])ts'],\n name: 'lntvow/disables/dts',\n rules: {\n // 'eslint-comments/no-unlimited-disable': 'off',\n // 'import/no-duplicates': 'off',\n // 'no-restricted-syntax': 'off',\n // 'unused-imports/no-unused-vars': 'off',\n },\n },\n {\n files: ['**/*.{test,spec}.([tj])s?(x)'],\n name: 'lntvow/disables/test',\n rules: {\n 'no-unused-expressions': 'off',\n },\n },\n {\n files: ['**/*.js', '**/*.cjs'],\n name: 'lntvow/disables/cjs',\n rules: {\n 'ts/no-require-imports': 'off',\n },\n },\n ]\n}\n","import fs from 'fs'\nimport { castArray } from '@lntvow/utils'\nimport { convertIgnorePatternToMinimatch } from '@eslint/compat'\nimport type { FlatGitignoreOptions, TypedFlatConfigItem } from '../types'\n\nexport async function gitignore(options: FlatGitignoreOptions): Promise<TypedFlatConfigItem[]> {\n const { findUpSync } = await import('find-up-simple')\n\n const {\n name = '.gitignore',\n root = false,\n files: _files = root ? name : findUpSync(name) || [],\n strict = false,\n } = options\n\n const files = castArray(_files)\n\n const ignores = []\n for (const file of files) {\n let ignoreFile\n try {\n ignoreFile = fs.readFileSync(file, 'utf8')\n } catch (error) {\n if (strict) throw error\n continue\n }\n const lines = ignoreFile.split(/\\r?\\n/u)\n\n ignores.push(\n ...lines\n .map(line => line.trim())\n .filter(line => line && !line.startsWith('#'))\n .map(convertIgnorePatternToMinimatch)\n )\n }\n if (strict && files.length === 0) throw new Error('No .gitignore file found')\n\n return [\n {\n name: 'lntvow/gitignore',\n ignores,\n },\n ]\n}\n","import { GLOB_EXCLUDE } from '../globs'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function ignores(ignoresList: string[] = []): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/ignores',\n ignores: [...GLOB_EXCLUDE, ...ignoresList],\n },\n ]\n}\n","import pluginImport from 'eslint-plugin-import-x'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function imports(options: { typescript?: boolean } = {}): Promise<TypedFlatConfigItem[]> {\n const { typescript = false } = options\n\n return [\n {\n name: 'lntvow/imports/setup',\n plugins: {\n import: pluginImport,\n },\n },\n {\n name: 'lntvow/imports/rules',\n rules: {\n // Helpful warnings\n // 禁止重复导入\n // 'import/export': 'error',\n // 禁止导入废弃的内容\n // 'import/no-deprecated': 'warn',\n // 禁止空的导入\n // 'import/no-empty-named-blocks': 'error',\n // 幽灵依赖\n // 'import/no-extraneous-dependencies': 'error',\n // 禁止使用var或let进行可变导出\n // 'import/no-mutable-exports': 'error',\n // // 'import/no-named-as-default': 'error',\n // // 'import/no-named-as-default-member': 'error',\n // // 'import/no-unused-modules': 'error',\n // // Module systems\n // // 'import/no-amd': 'off',\n // // 'import/no-commonjs': 'off',\n // // 'import/no-import-module-exports': 'off',\n // // 'import/no-nodejs-modules': 'off',\n // // 'import/unambiguous': 'off',\n // // Static analysis\n // // 'import/default': 'error',\n // // 'import/named': 'error',\n // // 'import/namespace': 'error',\n // // 'import/no-absolute-path': 'error',\n // // 'import/no-cycle': 'off',\n // // 'import/no-dynamic-require': 'off',\n // // 'import/no-internal-modules': 'off',\n // // 'import/no-relative-packages': 'off',\n // // 'import/no-relative-parent-imports': 'off',\n // // 'import/no-restricted-paths': 'off',\n // // 'import/no-self-import': 'off',\n // 'import/no-unresolved': 'error',\n // // 'import/no-useless-path-segments': 'error',\n // // 'import/no-webpack-loader-syntax': 'error',\n // // Style guide\n // // 'import/consistent-type-specifier-style': 'off',\n // // 'import/dynamic-import-chunkname': 'off',\n // // 'import/exports-last': 'off',\n // // 'import/extensions': 'off',\n 'import/first': 'error',\n // // 'import/group-exports': 'off',\n // // 'import/max-dependencies': 'off',\n 'import/newline-after-import': 'error',\n // // 'import/no-anonymous-default-export': 'off',\n // // 'import/no-default-export': 'off',\n // 'import/no-duplicates': 'error',\n // // 'import/no-named-default': 'off',\n // // 'import/no-named-export': 'off',\n // // 'import/no-namespace': 'off',\n // // 'import/no-unassigned-import': 'off',\n 'import/order': 'error',\n // // 'import/prefer-default-export': 'off',\n },\n settings: {\n // 'import-x/resolver': {\n // alias: {\n // map: [['@', './src']],\n // extensions: ['.ts', '.tsx', '.cts', '.mts', '.js', '.jsx', '.cjs', '.mjs', '.d.ts'],\n // },\n // node: true,\n // typescript: true,\n // },\n // 'import-x/parsers': {\n // '@typescript-eslint/parser': [],\n // },\n },\n },\n ]\n}\n","import js from '@eslint/js'\nimport globals from 'globals'\nimport type { OptionsOverrides, Rules, TypedFlatConfigItem } from '../types'\n\nexport async function javascript(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options\n return [\n {\n name: 'lntvow/javascript/setup',\n languageOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n parserOptions: {\n ecmaVersion: 2022,\n sourceType: 'module',\n ecmaFeatures: {\n jsx: true,\n },\n },\n globals: {\n // ...globals.browser,\n // ...globals.node,\n },\n },\n linterOptions: {\n reportUnusedDisableDirectives: 'warn',\n },\n },\n {\n name: 'lntvow/javascript/rules',\n rules: {\n ...js.configs.recommended.rules,\n\n // not in recommended\n ...notInRecommendedRules,\n\n // 禁止未使用过的变量\n 'no-unused-vars': 'warn',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n\nexport const notInRecommendedRules: Partial<Rules> = {\n 'array-callback-return': 'error', // 数组方法必须有返回值\n 'no-await-in-loop': 'off', // 禁止在循环中出现 await\n 'no-constructor-return': 'error', // 禁止构造函数返回值\n 'no-duplicate-imports': 'error', // 禁止重复导入\n 'no-inner-declarations': 'error', // 禁止在嵌套块中出现变量声明或 function 声明\n 'no-promise-executor-return': 'error', // 禁止在 Promise executor 中返回值\n 'no-self-compare': 'error', // 禁止自身比较\n 'no-template-curly-in-string': 'error', // 禁止在常规字符串中出现模板字面量占位符语法\n 'no-unmodified-loop-condition': 'error', // 禁用一成不变的循环条件\n 'no-unreachable-loop': 'error', // 禁止在循环中出现不可能到达的代码\n 'no-use-before-define': ['error', { functions: false, variables: false }], // 禁止定义前使用\n 'no-useless-assignment': 'off', // 禁止无用的分配 有时候需要置空变量时候需要用到\n 'require-atomic-updates': 'off', // 禁止使用 await 或 yield 导致竞争条件的分配\n 'accessor-pairs': 'error', // 强制 getter 和 setter 在对象中成对出现\n 'arrow-body-style': 'error', // 要求箭头函数体使用大括号\n 'block-scoped-var': 'error', // 强制把变量的使用限制在其定义的作用域范围内\n 'camelcase': 'warn', // 强制使用骆驼拼写法命名约定\n 'capitalized-comments': 'off', // 强制注释首字母大写 有时候不需要\n 'class-methods-use-this': 'error', // 强制类方法使用 this\n 'complexity': 'off', // 指定程序中允许的最大环路复杂度\n 'consistent-return': 'off', // 强制函数要么都有返回值或者没有返回值 有时候需要做短路处理\n 'consistent-this': 'off', // 当获取当前环境的 this 是用一样的风格\n 'curly': ['error', 'multi-line'], // 强制所有控制语句使用一致的括号风格\n 'default-case': 'error', // 要求 switch 语句中有 default 分支\n 'default-case-last': 'error', // 要求 switch 语句中有 default 分支放在最后\n 'default-param-last': 'error', // 要求默认参数放在最后\n 'dot-notation': 'error', // 强制尽可能使用点号\n 'eqeqeq': 'error', // 要求使用 === 和 !==\n 'func-name-matching': 'error', // 要求函数名与赋值给它们的变量名或属性名相匹配\n 'func-names': 'off', // 要求或禁止命名的 function 表达式 不需要\n 'func-style': 'off', // 强制一致地使用 function 声明或表达式 不需要\n 'grouped-accessor-pairs': 'error', // 强制 getter 和 setter 相邻出现\n 'guard-for-in': 'off', // 要求 for-in 循环中有一个 if 语句 不需要\n 'id-denylist': 'off', // 禁用指定的标识符\n 'id-length': 'off', // 强制标识符的最小和最大长度 不太好用\n 'id-match': 'off', // 要求标识符匹配一个指定的正则表达式\n 'init-declarations': 'off', // 要求或禁止在变量声明中进行初始化\n 'logical-assignment-operators': 'error', // 强制逻辑赋值操作符的使用\n 'max-classes-per-file': 'off', // 强制每个文件中包含的的类的最大数量\n 'max-depth': 'off', // 强制可嵌套的块的最大深度\n 'max-lines': 'off', // 强制最大行数\n 'max-lines-per-function': 'off', // 强制函数最大行数\n 'max-nested-callbacks': 'off', // 强制回调函数最大嵌套深度\n 'max-params': 'off', // 强制函数定义中最多允许的参数数量\n 'max-statements': 'off', // 强制函数块最多允许的的语句数量\n 'new-cap': ['error', { capIsNew: false }], // 要求构造函数首字母大写\n 'no-alert': 'error', // 禁用 alert、confirm 和 prompt\n 'no-array-constructor': 'error', // 禁用 Array 构造函数\n 'no-bitwise': 'off', // 禁止使用按位操作符\n 'no-caller': 'error', // 禁用 arguments.caller 或 arguments.callee\n 'no-console': 'warn', // 禁止使用 console\n 'no-continue': 'off', // 禁用 continue\n 'no-div-regex': 'error', // 禁止除法操作符显式的出现在正则表达式开始的位置\n 'no-else-return': 'error', // 禁止 if 语句中 return 语句之后有 else 块\n 'no-empty-function': 'error', // 禁止出现空函数\n 'no-eq-null': 'error', // 禁止在没有类型检查操作符的情况下与 null 进行比较\n 'no-eval': 'error', // 禁用 eval()\n 'no-extend-native': 'error', // 禁止扩展原生对象\n 'no-extra-bind': 'error', // 禁止不必要的 .bind() 调用\n 'no-extra-label': 'error', // 禁用不必要的标签\n 'no-implicit-coercion': 'error', // 禁止使用短符号进行类型转换\n 'no-implicit-globals': 'error', // 禁止在全局范围内使用变量声明和 function 声明\n 'no-implied-eval': 'error', // 禁止使用类似 eval() 的方法\n 'no-inline-comments': 'off', // 禁止在代码后使用内联注释\n 'no-invalid-this': 'error', // 禁止 this 关键字出现在类和类对象之外\n 'no-iterator': 'error', // 禁用 __iterator__ 属性\n 'no-label-var': 'error', // 禁用与变量同名的标签\n 'no-labels': 'error', // 禁用标签语句\n 'no-lone-blocks': 'error', // 禁用不必要的嵌套块\n 'no-lonely-if': 'error', // 禁止 if 作为唯一的语句出现在 else 语句中\n 'no-loop-func': 'error', // 禁止在循环中出现 function 声明和表达式\n 'no-magic-numbers': 'off', // 禁止使用魔术数字\n 'no-multi-assign': 'error', // 禁止连续赋值\n 'no-multi-str': 'error', // 禁止使用多行字符串\n 'no-negated-condition': 'off', // 禁用否定表达式\n 'no-nested-ternary': 'off', // 禁止使用嵌套的三元表达式\n 'no-new': 'off', // 禁止使用 new 操作符\n 'no-new-func': 'error', // 禁止对 Function 对象使用 new 操作符\n 'no-new-wrappers': 'error', // 禁止对 String,Number 和 Boolean 使用 new 操作符\n 'no-object-constructor': 'error', // 禁用 Object 的构造函数\n 'no-octal-escape': 'error', // 禁止在字符串中使用八进制转义序列\n 'no-param-reassign': 'off', // 禁止对 function 的参数进行重新赋值\n 'no-plusplus': 'off', // 禁用一元操作符 ++ 和 --\n 'no-proto': 'error', // 禁用 __proto__ 属性\n 'no-restricted-exports': 'off', // 禁用特定的导出\n 'no-restricted-globals': [\n 'error',\n { message: 'Use `globalThis` instead.', name: 'global' },\n { message: 'Use `globalThis` instead.', name: 'self' },\n ], // 禁用特定的全局变量\n 'no-restricted-imports': 'off', // 禁用特定的导入\n 'no-restricted-properties': [\n 'error',\n { message: 'Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.', property: '__proto__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineGetter__' },\n { message: 'Use `Object.defineProperty` instead.', property: '__defineSetter__' },\n { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupGetter__' },\n { message: 'Use `Object.getOwnPropertyDescriptor` instead.', property: '__lookupSetter__' },\n ], // 禁止使用对象的某些属性\n 'no-restricted-syntax': 'off', // 禁用特定的语法\n 'no-return-assign': 'error', // 禁止在返回语句中赋值\n 'no-script-url': 'error', // 禁用 Script URL\n 'no-sequences': 'error', // 禁用逗号操作符\n 'no-shadow': 0, // 禁止变量声明与外层作用域的变量同名\n 'no-ternary': 'off', // 禁用三元操作符\n 'no-throw-literal': 'off', // 禁止抛出异常字面量\n 'no-undef-init': 'error', // 禁止将变量初始化为 undefined\n 'no-undefined': 'off', // 禁用 undefined\n 'no-underscore-dangle': 'off', // 禁止标识符中有下划线\n 'no-unneeded-ternary': 'error', // 强制可以表达为更简单结构的三元操作符\n 'no-unused-expressions': ['error', { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true }], // 禁用无意义的表达式\n 'no-useless-call': 'error', // 禁止不必要的 .call() 和 .apply()\n 'no-useless-computed-key': 'error', // 禁止在对象中使用不必要的计算属性\n 'no-useless-concat': 'error', // 禁止不必要的字符串字面量或模板字面量的连接\n 'no-useless-constructor': 'error', // 禁用不必要的构造函数\n 'no-useless-rename': 'error', // 禁止在 import 和 export 和解构赋值时将引用重命名为相同的名字\n 'no-useless-return': 'error', // 禁止多余的 return 语句\n 'no-var': 'error', // 要求使用 let 或 const 而不是 var\n 'no-void': 'off', // 禁用 void 操作符\n 'no-warning-comments': 'off', // 禁止在注释中使用特定的警告术语\n 'object-shorthand': 'error', // 要求对象字面量简写语法\n 'one-var': 'off', // 强制函数中的变量在一起声明\n 'operator-assignment': 'error', // 要求或禁止尽可能地简化赋值操作\n 'prefer-arrow-callback': 'error', // 要求使用箭头函数作为回调\n 'prefer-const': 'error', // 要求使用 const 声明那些声明后不再被修改的变量\n 'prefer-destructuring': 'off', // 优先使用数组和对象解构\n 'prefer-exponentiation-operator': 'error', // 禁止使用 Math.pow 幂运算符\n 'prefer-named-capture-group': 'off', // 强制在正则表达式中使用命名捕获组\n 'prefer-numeric-literals': 'off', // 禁用 parseInt() 和 Number.parseInt(),使用二进制,八进制和十六进制字面量\n 'prefer-object-has-own': 'error', // 要求使用 Object.prototype.hasOwnProperty.call(foo, 'bar') 代替 foo.hasOwnProperty('bar')\n 'prefer-object-spread': 'error', // 要求使用对象扩展运算符而非 Object.assign\n 'prefer-promise-reject-errors': 'off', // 要求使用 Error 对象作为 Promise 拒绝的原因\n 'prefer-regex-literals': 'off', // 禁止使用 RegExp 构造函数\n 'prefer-rest-params': 'error', // 要求使用剩余参数而不是 arguments\n 'prefer-spread': 'error', // 要求使用扩展语法而非 .apply()\n 'prefer-template': 'error', // 要求使用模板字面量而非字符串连接\n 'radix': 'off', // 强制在parseInt()使用基数参数\n 'require-await': 'off', // 禁止使用不带 await 表达式的 async 函数\n 'require-unicode-regexp': 'off', // 强制在RegExp上使用u标志\n 'sort-imports': 'off', // imports排序 不好用\n 'sort-keys': 'off', // 要求对象属性按序排列 不好用\n 'sort-vars': 'off', // 要求同一个声明块中的变量按顺序排列 不好用\n 'strict': 'off', // 要求或禁止使用严格模式指令\n 'symbol-description': 'error', // 要求 symbol 描述\n 'vars-on-top': 'error', // 要求所有的 var 声明出现在它们所在的作用域顶部\n 'yoda': 'error', // 要求或禁止 “Yoda” 条件\n 'unicode-bom': 'error', // 要求或禁止 Unicode 字节顺序标记 (BOM)\n}\n","import pluginPrettier from 'eslint-plugin-prettier'\nimport prettierConfig from 'eslint-config-prettier'\nimport type { TypedFlatConfigItem } from '../types'\n\nexport async function prettier(): Promise<TypedFlatConfigItem[]> {\n return [\n {\n name: 'lntvow/prettier/setup',\n plugins: {\n prettier: pluginPrettier,\n },\n },\n {\n name: 'lntvow/prettier/rules',\n rules: {\n ...prettierConfig.rules,\n 'prettier/prettier': 'warn',\n },\n },\n ]\n}\n","import { configs } from 'eslint-plugin-regexp'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\n\nexport async function regexp(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides } = options\n\n const pluginRegexp = configs['flat/recommended'].plugins.regexp\n const { rules } = configs['flat/recommended']\n\n return [\n {\n name: 'lntvow/regexp/setup',\n plugins: {\n regexp: pluginRegexp,\n },\n },\n {\n name: 'lntvow/regexp/rules',\n rules: {\n ...rules,\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import pluginStylistic from '@stylistic/eslint-plugin'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\n\nexport async function stylistic(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {} } = options\n\n return [\n {\n name: 'lntvow/stylistic/setup',\n plugins: {\n style: pluginStylistic,\n },\n },\n {\n name: 'lntvow/stylistic/rules',\n rules: {\n // Custom rules\n 'style/spaced-comment': 'error',\n 'style/padding-line-between-statements': [\n 'error',\n { blankLine: 'always', prev: '*', next: 'cjs-export' },\n { blankLine: 'always', prev: '*', next: 'export' },\n { blankLine: 'always', prev: '*', next: 'function' },\n { blankLine: 'always', prev: '*', next: ['interface', 'type'] },\n { blankLine: 'never', prev: 'function-overload', next: 'function' },\n ],\n 'style/lines-around-comment': [\n 2,\n {\n beforeBlockComment: true,\n allowBlockStart: true,\n allowObjectStart: true,\n allowInterfaceStart: true,\n allowTypeStart: true,\n allowArrayStart: true,\n allowClassStart: true,\n allowModuleStart: true,\n },\n ],\n\n // overrides\n ...overrides,\n },\n },\n ]\n}\n","import pluginVitest from 'eslint-plugin-vitest'\nimport type { OptionsOverrides, TypedFlatConfigItem } from '../types'\nimport { GLOB_TESTS } from '../globs'\n\nexport async function test(options: OptionsOverrides = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides } = options\n\n return [\n {\n name: 'lntvow/test/setup',\n plugins: {\n test: pluginVitest,\n },\n },\n {\n name: 'lntvow/test/rules',\n files: [...GLOB_TESTS],\n rules: {\n 'lntvow/newline-before-describe-test': 'error',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import { parser as parserTs, plugin as pluginTs, configs } from 'typescript-eslint'\nimport type { Linter } from 'eslint'\nimport { GLOB_TS, GLOB_TSX } from '../globs'\nimport type { OptionsComponentExts, OptionsTypeScript, TypedFlatConfigItem } from '../types'\nimport { renameRules } from '../utils'\n\nexport async function typescript(\n options: OptionsTypeScript & OptionsComponentExts = {}\n): Promise<TypedFlatConfigItem[]> {\n const { componentExts = [], overrides = {}, parserOptions = {} } = options\n\n const files = [GLOB_TS, GLOB_TSX, ...componentExts.map(ext => `**/*.${ext}`)]\n\n // const filesTypeAware = options.filesTypeAware ?? [GLOB_TS, GLOB_TSX]\n // const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : undefined\n // const isTypeAware = !!tsconfigPath\n\n return [\n {\n name: 'lntvow/typescript/setup',\n plugins: {\n ts: pluginTs,\n },\n },\n {\n name: 'lntvow/typescript/rules',\n languageOptions: {\n parser: parserTs as Linter.Parser,\n parserOptions: {\n sourceType: 'module',\n },\n },\n files,\n rules: {\n ...renameRules(\n configs.strict\n .map(item => item.rules)\n .filter(Boolean)\n .reduce((acc, cur) => ({ ...acc, ...cur }), {})!,\n { '@typescript-eslint': 'ts' }\n ),\n\n // Override default configuration\n // 禁止使用!断言\n 'ts/no-non-null-assertion': 'off',\n // 禁止使用any\n 'ts/no-explicit-any': 'off',\n // 禁止使用ts注释\n 'ts/ban-ts-comment': 'off',\n // 未使用的变量\n 'ts/no-unused-vars': 'warn',\n\n // Override javascript configuration\n 'no-use-before-define': 'off',\n 'ts/no-use-before-define': ['error', { functions: false, variables: false }],\n 'no-unused-expressions': 'off',\n 'ts/no-unused-expressions': [\n 'error',\n { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true },\n ],\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n","import { getPackageInfoSync } from 'local-pkg'\nimport { parser as parserTs } from 'typescript-eslint'\nimport parserVue from 'vue-eslint-parser'\nimport pluginVue from 'eslint-plugin-vue'\nimport { GLOB_VUE } from '../globs'\nimport type { OptionsVue, TypedFlatConfigItem } from '../types'\n\nconst vue3Rules: TypedFlatConfigItem['rules'] = {\n ...pluginVue.configs['vue3-essential'].rules,\n ...pluginVue.configs['vue3-strongly-recommended'].rules,\n ...pluginVue.configs['vue3-recommended'].rules,\n 'vue/block-lang': ['error', { script: { lang: ['ts', 'tsx'] } }],\n 'vue/block-order': ['error', { order: ['script[setup]', 'template', 'style[scoped]'] }],\n 'vue/component-api-style': 'error',\n 'vue/no-deprecated-model-definition': 'error',\n}\n\nconst vue2Rules: TypedFlatConfigItem['rules'] = {\n ...pluginVue.configs.essential.rules,\n ...pluginVue.configs['strongly-recommended'].rules,\n ...pluginVue.configs.recommended.rules,\n 'vue/block-lang': ['error', { script: { allowNoLang: true } }],\n 'vue/block-order': ['error', { order: [['script', 'template'], 'style[scoped]'] }],\n}\n\nexport async function vue(options: OptionsVue = {}): Promise<TypedFlatConfigItem[]> {\n const { overrides = {}, vueVersion = getVueVersion() } = options\n\n return [\n {\n name: 'lntvow/vue/setup',\n plugins: {\n vue: pluginVue,\n },\n },\n {\n name: 'lntvow/vue/rules',\n languageOptions: {\n parser: parserVue,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n parser: {\n ts: parserTs,\n tsx: parserTs,\n },\n sourceType: 'module',\n },\n },\n processor: pluginVue.processors['.vue'],\n files: [GLOB_VUE],\n rules: {\n ...pluginVue.configs.base.rules,\n ...(vueVersion === 3 ? vue3Rules : vue2Rules),\n\n // Override default configuration\n // vue禁用多个单词组件名\n 'vue/multi-word-component-names': 'off',\n // vue禁用 属性-连接 个人喜欢驼峰\n 'vue/attribute-hyphenation': 'off',\n // vue禁用标签缩进\n 'vue/html-indent': 'off',\n // 标签自闭合\n 'vue/html-self-closing': [\n 'error',\n {\n html: { void: 'always', normal: 'always', component: 'always' },\n svg: 'always',\n math: 'always',\n },\n ],\n // vue禁用标签属性换行\n 'vue/max-attributes-per-line': 'off',\n // vue内容强制换行\n 'vue/singleline-html-element-content-newline': 'off',\n // 禁用事件驼峰 个人喜欢驼峰\n 'vue/v-on-event-hyphenation': 'off',\n\n // Custom rules\n // 标签换行\n 'vue/block-tag-newline': 'error',\n // 强制模板组件名称为PascalCase\n 'vue/component-name-in-template-casing': ['error', 'PascalCase', { ignores: ['/-/'] }],\n // 强制组件名大驼峰\n 'vue/component-options-name-casing': 'error',\n // 强制事件名小驼峰\n 'vue/custom-event-name-casing': 'error',\n // 强制定义emits\n 'vue/define-emits-declaration': 'error',\n // 强制定义宏defineProps defineEmits的顺序\n 'vue/define-macros-order': 'error',\n // 强制定义props\n 'vue/define-props-declaration': 'error',\n // 强制style属性\n 'vue/enforce-style-attribute': 'error',\n // 禁止button没有type\n 'vue/html-button-has-type': 'off',\n // 强制html注释换行\n 'vue/html-comment-content-newline': 'error',\n // 强制html注释空格\n 'vue/html-comment-content-spacing': 'error',\n // 强制html注释缩进\n 'vue/html-comment-indent': 'off',\n // 强制组件名和文件名一致\n 'vue/match-component-file-name': ['error', { extensions: ['jsx', 'tsx'], shouldMatchCase: true }],\n // 强制组件名导入名称一致\n 'vue/match-component-import-name': 'error',\n // 强制单个标签最大行数\n 'vue/max-lines-per-block': 'off',\n // 限制 props 属性的最大数量\n 'vue/max-props': 'off',\n // 强制模板最大深度\n 'vue/max-template-depth': 'off',\n // 强制多行属性空行\n 'vue/new-line-between-multi-line-property': 'off',\n // 强制nextTick风格\n 'vue/next-tick-style': 'off',\n // 禁止模板中出现未翻译的字符串\n 'vue/no-bare-strings-in-template': 'off',\n // 布尔类型默认值校验\n 'vue/no-boolean-default': 'off',\n // 禁止使用已弃用的v-model定义\n 'vue/no-deprecated-model-definition': 'error',\n // 禁止重复继承属性\n 'vue/no-duplicate-attr-inheritance': 'error',\n // 禁止空的标签\n 'vue/no-empty-component-block': 'off',\n // 禁止class 中出现多个对象\n 'vue/no-multiple-objects-in-class': 'error',\n // 禁止潜在的组件选项拼写错误\n 'vue/no-potential-component-option-typo': 'error',\n // 禁止ref对象丢失响应性\n 'vue/no-ref-object-reactivity-loss': 'error',\n // 禁止default和required同时存在\n 'vue/no-required-prop-with-default': 'error',\n // 禁止特定的模板语法\n 'vue/no-restricted-block': 'off',\n // 禁止await后调用特定的函数\n 'vue/no-restricted-call-after-await': 'off',\n // 禁止特定的class\n 'vue/no-restricted-class': 'off',\n // 禁止特定的组件名\n 'vue/no-restricted-component-names': 'off',\n // 禁止特定的组件选项\n 'vue/no-restricted-component-options': 'off',\n // 禁止特定的事件名\n 'vue/no-restricted-custom-event': 'off',\n // 禁止特定的html标签\n 'vue/no-restricted-html-elements': 'off',\n // 禁止特定的props\n 'vue/no-restricted-props': 'off',\n // 禁止特定的静态属性\n 'vue/no-restricted-static-attribute': 'off',\n // 禁止特定的v-bind\n 'vue/no-restricted-v-bind': 'off',\n // 禁止根元素使用v-if\n 'vue/no-root-v-if': 'off',\n // 禁止setup中props丢失响应性\n 'vue/no-setup-props-reactivity-loss': 'error',\n // 禁止内联样式\n 'vue/no-static-inline-styles': 'error',\n // 禁止target=\"_blank\"\n 'vue/no-template-target-blank': 'error',\n // 禁止在beforeRouteEnter中使用this\n 'vue/no-this-in-before-route-enter': 'error',\n // 禁止未定义的组件\n 'vue/no-undef-components': 'off',\n // 禁止未定义的属性 mixin vuex冲突\n 'vue/no-undef-properties': 'error',\n // 禁止不支持的特性\n 'vue/no-unsupported-features': 'off',\n // 禁止未使用的emits\n 'vue/no-unused-emit-declarations': 'error',\n // 未使用属性校验\n 'vue/no-unused-properties': ['warn', { groups: ['props', 'data', 'computed', 'methods', 'setup'] }],\n // 禁止未使用属性ref\n 'vue/no-unused-refs': 'error',\n // 禁止v-else和v-for同时使用\n 'vue/no-use-v-else-with-v-for': 'error',\n // 禁止使用无效的模板语法\n 'vue/no-useless-mustaches': 'error',\n // v-bind强制简写\n 'vue/no-useless-v-bind': 'error',\n // 禁止使用v-text\n 'vue/no-v-text': 'error',\n // 模板三标签之间强制空一行\n 'vue/padding-line-between-blocks': 'error',\n // 禁止模板空行\n 'vue/padding-line-between-tags': ['error', [{ blankLine: 'never', prev: '*', next: '*' }]],\n // 组件定义强制空行\n 'vue/padding-lines-in-component-definition': ['error', { betweenOptions: 'never' }],\n // 宏定义选项强制\n 'vue/prefer-define-options': 'error',\n // props强制boolean类型在前\n 'vue/prefer-prop-type-boolean-first': 'error',\n // 要求模板中的静态类名位于单独的class属性中\n 'vue/prefer-separate-static-class': 'error',\n // props 强制true简写\n 'vue/prefer-true-attribute-shorthand': 'error',\n // 要求组件默认导出\n 'vue/require-default-export': 'off',\n // 要求组件直接导出\n 'vue/require-direct-export': 'error',\n // 要求emit事件校验\n 'vue/require-emit-validator': 'off',\n // 要求明确的插槽\n 'vue/require-explicit-slots': 'off',\n // 强制expose\n 'vue/require-expose': 'error',\n // 宏定义变量名强制\n 'vue/require-macro-variable-name': 'error',\n // 强制name属性\n 'vue/require-name-property': 'off',\n // 强制prop注释\n 'vue/require-prop-comment': 'off',\n // 强制对象类型\n 'vue/require-typed-object-prop': 'error',\n // 强制ref类型\n 'vue/require-typed-ref': 'error',\n // script缩进\n 'vue/script-indent': 'off',\n // 强制属性排序\n 'vue/sort-keys': 'off',\n // class排序\n 'vue/static-class-names-order': 'error',\n // 强制v-for指令的分隔符样式\n 'vue/v-for-delimiter-style': 'error',\n // 强制v-on指令的风格\n 'vue/v-on-handler-style': 'off',\n // 宏定义选项校验\n 'vue/valid-define-options': 'error',\n\n // Stylistic\n 'vue/array-bracket-newline': 'off',\n 'vue/array-bracket-spacing': 'off',\n 'vue/array-element-newline': 'off',\n 'vue/arrow-spacing': 'off',\n 'vue/block-spacing': 'off',\n 'vue/brace-style': 'off',\n // 强制驼峰\n 'vue/camelcase': 'error',\n 'vue/comma-dangle': 'off',\n 'vue/comma-spacing': 'off',\n 'vue/comma-style': 'off',\n 'vue/dot-location': 'off',\n // 要求使用点号\n 'vue/dot-notation': 'error',\n // 要求使用 === 和 !==\n 'vue/eqeqeq': 'error',\n 'vue/func-call-spacing': 'off',\n 'vue/key-spacing': 'off',\n 'vue/keyword-spacing': 'off',\n 'vue/max-len': 'off',\n 'vue/multiline-ternary': 'off',\n 'vue/no-console': 'off',\n // 禁止在条件中使用常量表达式\n 'vue/no-constant-condition': 'error',\n 'vue/no-extra-parens': 'off',\n // 禁止使用空解构模式\n 'vue/no-empty-pattern': 'error',\n // 禁止不规则的空白\n 'vue/no-irregular-whitespace': 'error',\n 'vue/no-loss-of-precision': 'off',\n 'vue/no-restricted-syntax': 'off',\n // 禁用稀疏数组\n 'vue/no-sparse-arrays': 'error',\n // 禁止没有必要的字符拼接\n 'vue/no-useless-concat': 'error',\n 'vue/object-curly-newline': 'off',\n 'vue/object-curly-spacing': 'off',\n 'vue/object-property-newline': 'off',\n // 要求对象字面量简写语法\n 'vue/object-shorthand': 'error',\n 'vue/operator-linebreak': 'off',\n // 优先使用模板字符串\n 'vue/prefer-template': 'error',\n 'vue/quote-props': 'off',\n 'vue/space-in-parens': 'off',\n 'vue/space-infix-ops': 'off',\n 'vue/space-unary-ops': 'off',\n 'vue/template-curly-spacing': 'off',\n\n // Overrides\n ...overrides,\n },\n },\n ]\n}\n\nfunction getVueVersion() {\n const pkg = getPackageInfoSync('vue', { paths: [process.cwd()] })\n if (pkg && pkg.version) {\n return Number(pkg.version[0])\n }\n\n return 3\n}\n","import { FlatConfigComposer } from 'eslint-flat-config-utils'\nimport { isBoolean } from '@lntvow/utils'\nimport { isPackageExists } from 'local-pkg'\nimport {\n gitignore,\n ignores,\n javascript,\n typescript,\n vue,\n stylistic,\n imports,\n prettier,\n regexp,\n test,\n custom,\n disables,\n} from './configs'\nimport type { Awaitable, ConfigNames, OptionsConfig, TypedFlatConfigItem } from './types'\n\nconst flatConfigProps: (keyof TypedFlatConfigItem)[] = [\n 'name',\n 'languageOptions',\n 'linterOptions',\n 'processor',\n 'plugins',\n 'rules',\n 'settings',\n]\n\nconst defaultPluginRenaming = {\n '@typescript-eslint': 'ts',\n 'import-x': 'import',\n '@stylistic': 'style',\n 'vitest': 'test',\n}\n\nexport function lntvow(\n options: OptionsConfig & TypedFlatConfigItem = {},\n ...userConfigs: Awaitable<TypedFlatConfigItem>[]\n): FlatConfigComposer<TypedFlatConfigItem, ConfigNames> {\n if ('files' in options) {\n throw new Error(\n '[@lntvow/eslint-config] The first argument should not contain the \"files\" property as the options are supposed to be global. Place it in the second or later config instead.'\n )\n }\n\n const {\n autoRenamePlugins = true,\n componentExts = [],\n gitignore: enableGitignore = true,\n regexp: enableRegexp = true,\n typescript: enableTypeScript = isPackageExists('typescript'),\n vue: enableVue = ['vue', 'nuxt', 'vitepress'].some(item => isPackageExists(item)),\n test: enableTest = isPackageExists('vitest'),\n stylistic: enableStylistic = true,\n } = options\n\n const configs: Awaitable<TypedFlatConfigItem[]>[] = []\n\n // Base configs\n configs.push(\n ignores(options.ignores),\n custom(),\n javascript({\n ...resolveSubOptions(options, 'javascript'),\n }),\n imports({ typescript: Boolean(enableTypeScript) })\n // comments(),\n // node(),\n // jsdoc({\n // stylistic: stylisticOptions,\n // }),\n // unicorn(),\n // command(),\n\n // Optional plugins (installed but not enabled by default)\n // perfectionist(),\n )\n if (enableGitignore) {\n configs.push(gitignore({ ...resolveSubOptions(options, 'gitignore') }))\n }\n\n if (enableVue) {\n componentExts.push('vue')\n }\n\n if (enableTypeScript) {\n configs.push(typescript({ ...resolveSubOptions(options, 'typescript'), componentExts }))\n }\n\n if (enableVue) {\n configs.push(vue({ ...resolveSubOptions(options, 'vue') }))\n }\n\n if (enableRegexp) {\n configs.push(regexp({ ...resolveSubOptions(options, 'regexp') }))\n }\n\n if (enableTest) {\n configs.push(test({ ...resolveSubOptions(options, 'test') }))\n }\n\n if (enableStylistic) {\n configs.push(stylistic({ ...resolveSubOptions(options, 'stylistic') }))\n }\n\n // if (options.jsonc ?? true) {\n // configs.push(\n // jsonc({\n // overrides: getOverrides(options, 'jsonc'),\n // stylistic: stylisticOptions,\n // }),\n // sortPackageJson(),\n // sortTsconfig(),\n // )\n // }\n\n // if (options.yaml ?? true) {\n // configs.push(yaml({\n // overrides: getOverrides(options, 'yaml'),\n // stylistic: stylisticOptions,\n // }))\n // }\n\n // if (options.toml ?? true) {\n // configs.push(toml({\n // overrides: getOverrides(options, 'toml'),\n // stylistic: stylisticOptions,\n // }))\n // }\n\n // if (options.markdown ?? true) {\n // configs.push(\n // markdown(\n // {\n // componentExts,\n // overrides: getOverrides(options, 'markdown'),\n // },\n // ),\n // )\n // }\n\n // if (options.formatters) {\n // configs.push(formatters(\n // options.formatters,\n // typeof stylisticOptions === 'boolean' ? {} : stylisticOptions,\n // ))\n // }\n\n configs.push(prettier(), disables())\n\n // User can optionally pass a flat config item to the first argument\n const fusedConfig = flatConfigProps.reduce((acc, key) => {\n if (key in options) {\n acc[key] = options[key] as any\n }\n return acc\n }, {} as TypedFlatConfigItem)\n\n if (Object.keys(fusedConfig).length) {\n configs.push([fusedConfig])\n }\n\n // Merge all configs\n let composer = new FlatConfigComposer<TypedFlatConfigItem, ConfigNames>()\n composer = composer.append(...configs, ...(userConfigs as any))\n if (autoRenamePlugins) {\n composer = composer.renamePlugins(defaultPluginRenaming)\n }\n\n return composer\n}\n\ntype ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>\n\nexport function resolveSubOptions<K extends keyof OptionsConfig>(\n options: OptionsConfig,\n key: K\n): ResolvedOptions<OptionsConfig[K]> {\n return isBoolean(options[key]) ? ({} as any) : options[key] || ({} as any)\n}\n"],"mappings":"AAqBO,SAASA,EAAYC,EAAkBC,EAA6B,CACzE,OAAO,OAAO,YACZ,OAAO,QAAQD,CAAK,EAAE,IAAI,CAAC,CAACE,EAAK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/B,EAAQ4B,CAAG,CAAC,EAAK,CAAC,EAAY5B,EAAQ4B,CAAG,GAAM,CAAC,CACnE","names":["renameRules","rules","map","key","value","from","to","combine","configs","lntvowPlugin","custom","GLOB_SRC_EXT","GLOB_SRC","GLOB_JS","GLOB_JSX","GLOB_TS","GLOB_TSX","GLOB_STYLE","GLOB_CSS","GLOB_POSTCSS","GLOB_LESS","GLOB_SCSS","GLOB_JSON","GLOB_JSON5","GLOB_JSONC","GLOB_MARKDOWN","GLOB_MARKDOWN_IN_MARKDOWN","GLOB_SVELTE","GLOB_VUE","GLOB_YAML","GLOB_TOML","GLOB_XML","GLOB_HTML","GLOB_ASTRO","GLOB_GRAPHQL","GLOB_MARKDOWN_CODE","GLOB_TESTS","GLOB_ALL_SRC","GLOB_EXCLUDE","disables","GLOB_SRC","GLOB_SRC_EXT","fs","castArray","convertIgnorePatternToMinimatch","gitignore","options","findUpSync","name","root","_files","strict","files","ignores","file","ignoreFile","error","lines","line","ignores","ignoresList","GLOB_EXCLUDE","pluginImport","imports","options","typescript","js","javascript","options","overrides","notInRecommendedRules","pluginPrettier","prettierConfig","prettier","configs","regexp","options","overrides","pluginRegexp","rules","pluginStylistic","stylistic","options","overrides","pluginVitest","test","options","overrides","pluginVitest","GLOB_TESTS","parserTs","pluginTs","configs","typescript","options","componentExts","overrides","parserOptions","files","GLOB_TS","GLOB_TSX","ext","pluginTs","parserTs","renameRules","configs","item","acc","cur","getPackageInfoSync","parserTs","parserVue","pluginVue","vue3Rules","pluginVue","vue2Rules","vue","options","overrides","vueVersion","getVueVersion","parserVue","parserTs","GLOB_VUE","pkg","getPackageInfoSync","FlatConfigComposer","isBoolean","isPackageExists","flatConfigProps","defaultPluginRenaming","lntvow","options","userConfigs","autoRenamePlugins","componentExts","enableGitignore","enableRegexp","enableTypeScript","isPackageExists","enableVue","item","enableTest","enableStylistic","configs","ignores","custom","javascript","resolveSubOptions","imports","gitignore","typescript","vue","regexp","test","stylistic","prettier","disables","fusedConfig","acc","key","composer","FlatConfigComposer","isBoolean"]}