@lntvow/eslint-config 9.32.1 → 9.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +48 -55
- package/dist/index.mjs +1 -1
- package/package.json +8 -7
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var xe=Object.create;var b=Object.defineProperty;var we=Object.getOwnPropertyDescriptor;var be=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var Te=(e,r)=>{for(var o in r)b(e,o,{get:r[o],enumerable:!0})},W=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of be(r))!he.call(e,n)&&n!==o&&b(e,n,{get:()=>r[n],enumerable:!(s=we(r,n))||s.enumerable});return e};var p=(e,r,o)=>(o=e!=null?xe(Oe(e)):{},W(r||!e||!e.__esModule?b(o,"default",{value:e,enumerable:!0}):o,e)),Ce=e=>W(b({},"__esModule",{value:!0}),e);var De={};Te(De,{GLOB_ALL_SRC:()=>Ae,GLOB_ASTRO:()=>Pe,GLOB_CSS:()=>je,GLOB_EXCLUDE:()=>k,GLOB_GRAPHQL:()=>qe,GLOB_HTML:()=>re,GLOB_JS:()=>Le,GLOB_JSON:()=>Y,GLOB_JSON5:()=>z,GLOB_JSONC:()=>Ge,GLOB_JSX:()=>Se,GLOB_LESS:()=>Fe,GLOB_MARKDOWN:()=>I,GLOB_MARKDOWN_CODE:()=>Re,GLOB_MARKDOWN_IN_MARKDOWN:()=>Be,GLOB_POSTCSS:()=>Ie,GLOB_SCSS:()=>ke,GLOB_SRC:()=>d,GLOB_SRC_EXT:()=>u,GLOB_STYLE:()=>H,GLOB_SVELTE:()=>Q,GLOB_TESTS:()=>F,GLOB_TOML:()=>Ee,GLOB_TS:()=>S,GLOB_TSX:()=>j,GLOB_VUE:()=>O,GLOB_XML:()=>ee,GLOB_YAML:()=>Z,combine:()=>_e,custom:()=>L,disables:()=>G,gitignore:()=>B,ignores:()=>E,imports:()=>P,javascript:()=>R,lntvow:()=>ye,notInRecommendedRules:()=>ae,prettier:()=>A,regexp:()=>U,renameRules:()=>_,stylistic:()=>V,test:()=>M,typescript:()=>$,unicorn:()=>D,vue:()=>K});module.exports=Ce(De);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 _e(...e){return(await Promise.all(e)).flat()}var J=p(require("@lntvow/eslint-plugin"),1);async function L(){return[{name:"lntvow/custom/setup",plugins:{lntvow:J.default}}]}var u="?([cm])[jt]s?(x)",d="**/*.?([cm])[jt]s?(x)",Le="**/*.?([cm])js",Se="**/*.?([cm])jsx",S="**/*.?([cm])ts",j="**/*.?([cm])tsx",H="**/*.{c,le,sc}ss",je="**/*.css",Ie="**/*.{p,post}css",Fe="**/*.less",ke="**/*.scss",Y="**/*.json",z="**/*.json5",Ge="**/*.jsonc",I="**/*.md",Be="**/*.md/*.md",Q="**/*.svelte",O="**/*.vue",Z="**/*.y?(a)ml",Ee="**/*.toml",ee="**/*.xml",re="**/*.htm?(l)",Pe="**/*.astro",qe="**/*.{g,graph}ql",Re=`${I}/${d}`,F=[`**/__tests__/**/*.${u}`,`**/*.spec.${u}`,`**/*.test.${u}`,`**/*.bench.${u}`,`**/*.benchmark.${u}`],Ae=[d,H,Y,z,I,Q,O,Z,ee,re],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 oe=require("fs"),te=require("@lntvow/utils"),ne=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,te.castArray)(n),g=[];for(let T of c){let x;try{x=(0,oe.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(ne.convertIgnorePatternToMinimatch))}if(i&&c.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:g}]}async function E(e=[]){return[{name:"lntvow/ignores",ignores:[...k,...e]}]}var se=p(require("eslint-plugin-import-x"),1);async function P(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:se.default}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}var ie=p(require("@eslint/js"),1),q=p(require("globals"),1);async function R(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:"latest",sourceType:"module",parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{...q.default.browser,...q.default.node}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...ie.default.configs.recommended.rules,...ae,"no-unused-vars":"warn",...r}}]}var ae={"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":"off","no-self-compare":"error","no-template-curly-in-string":"error","no-unassigned-vars":"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 pe=p(require("eslint-plugin-prettier"),1),le=p(require("eslint-config-prettier"),1);async function A(){return[{name:"lntvow/prettier/setup",plugins:{prettier:pe.default}},{name:"lntvow/prettier/rules",rules:{...le.default.rules,"prettier/prettier":"warn"}}]}var N=require("eslint-plugin-regexp");async function U(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 fe=p(require("@stylistic/eslint-plugin"),1);async function V(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:fe.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":["error",{beforeBlockComment:!0,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowModuleStart:!0,allowModuleEnd:!0,allowTypeStart:!0,allowTypeEnd:!0}],...r}}]}var ue=p(require("eslint-plugin-vitest"),1);async function M(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:ue.default}},{name:"lntvow/test/rules",files:[...F],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 ce=p(require("eslint-plugin-unicorn"),1);async function D(){return[{name:"lntvow/unicorn/setup",plugins:{unicorn:ce.default}},{name:"lntvow/unicorn/rules",rules:{"unicorn/catch-error-name":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/error-message":"error","unicorn/new-for-builtins":"error","unicorn/no-accessor-recursion":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-switch-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-string-raw":"error","unicorn/throw-new-error":"error"}}]}var me=require("local-pkg"),X=require("typescript-eslint"),de=p(require("vue-eslint-parser"),1),l=p(require("eslint-plugin-vue"),1);var Ne={...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"},Ue={...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 K(e={}){let{overrides:r={},vueVersion:o=Ve()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l.default}},{name:"lntvow/vue/rules",languageOptions:{parser:de.default,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:X.parser,tsx:X.parser},sourceType:"module"}},processor:l.default.processors[".vue"],files:[O],rules:{...l.default.configs.base.rules,...o===3?Ne:Ue,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":["error","never"],"vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/v-on-event-hyphenation":["error","never"],"vue/html-indent":"off","vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"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 Ve(){let e=(0,me.getPackageInfoSync)("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}var ve=require("eslint-flat-config-utils"),ge=require("@lntvow/utils"),h=require("local-pkg");var Me=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],$e={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function ye(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(w=>(0,h.isPackageExists)(w)),test:T=(0,h.isPackageExists)("vitest"),stylistic:x=!0}=e,a=[];a.push(E(e.ignores),L(),R({...m(e,"javascript")}),P({typescript:!!c}),D()),n&&a.push(B({...m(e,"gitignore")})),g&&s.push("vue"),c&&a.push($({...m(e,"typescript"),componentExts:s})),g&&a.push(K({...m(e,"vue")})),i&&a.push(U({...m(e,"regexp")})),T&&a.push(M({...m(e,"test")})),a.push(A(),G()),x&&a.push(V({...m(e,"stylistic")}));let f=Me.reduce((w,C)=>(C in e&&(w[C]=e[C]),w),{});Object.keys(f).length&&a.push([f]);let y=new ve.FlatConfigComposer;return y=y.append(...a,...r),o&&(y=y.renamePlugins($e)),y}function m(e,r){return(0,ge.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,unicorn,vue});
|
|
1
|
+
"use strict";var Oe=Object.create;var O=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var Te=Object.getOwnPropertyNames;var Ce=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var Le=(e,r)=>{for(var o in r)O(e,o,{get:r[o],enumerable:!0})},J=(e,r,o,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Te(r))!_e.call(e,n)&&n!==o&&O(e,n,{get:()=>r[n],enumerable:!(s=he(r,n))||s.enumerable});return e};var p=(e,r,o)=>(o=e!=null?Oe(Ce(e)):{},J(r||!e||!e.__esModule?O(o,"default",{value:e,enumerable:!0}):o,e)),Se=e=>J(O({},"__esModule",{value:!0}),e);var Xe={};Le(Xe,{GLOB_ALL_SRC:()=>Ve,GLOB_ASTRO:()=>Ae,GLOB_CSS:()=>Ie,GLOB_EXCLUDE:()=>G,GLOB_GRAPHQL:()=>Ne,GLOB_HTML:()=>oe,GLOB_JS:()=>ke,GLOB_JSON:()=>Y,GLOB_JSON5:()=>Q,GLOB_JSONC:()=>Ee,GLOB_JSX:()=>Fe,GLOB_LESS:()=>Be,GLOB_MARKDOWN:()=>F,GLOB_MARKDOWN_CODE:()=>Ue,GLOB_MARKDOWN_IN_MARKDOWN:()=>Re,GLOB_POSTCSS:()=>Ge,GLOB_SCSS:()=>Pe,GLOB_SRC:()=>m,GLOB_SRC_EXT:()=>f,GLOB_STYLE:()=>z,GLOB_SVELTE:()=>Z,GLOB_TESTS:()=>I,GLOB_TOML:()=>qe,GLOB_TS:()=>j,GLOB_TSX:()=>k,GLOB_VUE:()=>T,GLOB_XML:()=>re,GLOB_YAML:()=>ee,combine:()=>je,custom:()=>S,disables:()=>B,getRulesFromConfig:()=>h,gitignore:()=>P,ignores:()=>E,imports:()=>R,javascript:()=>A,lntvow:()=>be,notInRecommendedRules:()=>pe,prettier:()=>N,regexp:()=>V,renameRules:()=>L,stylistic:()=>M,test:()=>$,typescript:()=>D,unicorn:()=>X,vue:()=>W,vueExtensionRules:()=>ye,vueUncategorizedRules:()=>ge});module.exports=Se(Xe);function L(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 je(...e){return(await Promise.all(e)).flat()}function h(e){return e.map(r=>r.rules).reduce((r,o)=>({...r,...o}),{})}var H=p(require("@lntvow/eslint-plugin"),1);async function S(){return[{name:"lntvow/custom/setup",plugins:{lntvow:H.default}}]}var f="?([cm])[jt]s?(x)",m="**/*.?([cm])[jt]s?(x)",ke="**/*.?([cm])js",Fe="**/*.?([cm])jsx",j="**/*.?([cm])ts",k="**/*.?([cm])tsx",z="**/*.{c,le,sc}ss",Ie="**/*.css",Ge="**/*.{p,post}css",Be="**/*.less",Pe="**/*.scss",Y="**/*.json",Q="**/*.json5",Ee="**/*.jsonc",F="**/*.md",Re="**/*.md/*.md",Z="**/*.svelte",T="**/*.vue",ee="**/*.y?(a)ml",qe="**/*.toml",re="**/*.xml",oe="**/*.htm?(l)",Ae="**/*.astro",Ne="**/*.{g,graph}ql",Ue=`${F}/${m}`,I=[`**/__tests__/**/*.${f}`,`**/*.spec.${f}`,`**/*.test.${f}`,`**/*.bench.${f}`,`**/*.benchmark.${f}`],Ve=[m,z,Y,Q,F,Z,T,ee,re,oe],G=["**/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 B(){return[{files:[`scripts/${m}`],name:"lntvow/disables/scripts",rules:{"no-console":"off"}},{files:[`cli/${m}`,`cli.${f}`],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 te=require("fs"),ne=require("@lntvow/utils"),se=require("@eslint/compat");async function P(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,u=(0,ne.castArray)(n),v=[];for(let g of u){let w;try{w=(0,te.readFileSync)(g,"utf8")}catch(l){if(i)throw l;continue}let a=w.split(/\r?\n/u);v.push(...a.map(l=>l.trim()).filter(l=>l&&!l.startsWith("#")).map(se.convertIgnorePatternToMinimatch))}if(i&&u.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:v}]}async function E(e=[]){return[{name:"lntvow/ignores",ignores:[...G,...e]}]}var ie=p(require("eslint-plugin-import-x"),1);async function R(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:ie.default}},{name:"lntvow/imports/rules",rules:{"import/no-mutable-exports":"error","import/first":"error","import/newline-after-import":"error","import/no-duplicates":"error","import/order":"error"}}]}var ae=p(require("@eslint/js"),1),q=p(require("globals"),1);async function A(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:"latest",sourceType:"module",parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{...q.default.browser,...q.default.node}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...ae.default.configs.recommended.rules,...pe,"no-unused-vars":"warn",...r}}]}var pe={"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":"off","no-self-compare":"error","no-template-curly-in-string":"error","no-unassigned-vars":"error","no-unexpected-multiline":"off","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:"off","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 le=p(require("eslint-plugin-prettier"),1),fe=p(require("eslint-config-prettier"),1);async function N(e={}){let{vue:r=!1}=e;return[{name:"lntvow/prettier/setup",plugins:{prettier:le.default}},{name:"lntvow/prettier/rules",rules:{...fe.default.rules,"prettier/prettier":"warn",curly:["error","multi-line"],...r?{"vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}]}:{}}}]}var U=require("eslint-plugin-regexp");async function V(e={}){let{overrides:r}=e,o=U.configs["flat/recommended"].plugins.regexp,{rules:s}=U.configs["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:o}},{name:"lntvow/regexp/rules",rules:{...s,...r}}]}var ue=p(require("@stylistic/eslint-plugin"),1);async function M(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:ue.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":["error",{beforeBlockComment:!0,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowModuleStart:!0,allowModuleEnd:!0,allowTypeStart:!0,allowTypeEnd:!0}],...r}}]}var ce=p(require("eslint-plugin-vitest"),1);async function $(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:ce.default}},{name:"lntvow/test/rules",files:[...I],rules:{"lntvow/newline-before-specified-function-call":"error",...r}}]}var d=require("typescript-eslint");async function D(e={}){let{componentExts:r=[],overrides:o={},parserOptions:s={}}=e,n=[j,k,...r.map(i=>`**/*.${i}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:d.plugin}},{name:"lntvow/typescript/rules",languageOptions:{parser:d.parser,parserOptions:{sourceType:"module"}},files:n,rules:{...L(d.configs.strict.map(i=>i.rules).filter(Boolean).reduce((i,u)=>({...i,...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}],...o}}]}var me=p(require("eslint-plugin-unicorn"),1);async function X(){return[{name:"lntvow/unicorn/setup",plugins:{unicorn:me.default}},{name:"lntvow/unicorn/rules",rules:{"unicorn/catch-error-name":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/error-message":"error","unicorn/new-for-builtins":"error","unicorn/no-accessor-recursion":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-switch-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-string-raw":"error","unicorn/throw-new-error":"error"}}]}var de=require("local-pkg"),K=require("typescript-eslint"),ve=p(require("vue-eslint-parser"),1),x=p(require("eslint-plugin-vue"),1);async function W(e={}){let{overrides:r={},vueVersion:o=Me()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:x.default}},{name:"lntvow/vue/rules",languageOptions:{parser:ve.default,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:K.parser,tsx:K.parser},sourceType:"module"}},processor:x.default.processors[".vue"],files:[T],rules:{...o===3?{...h(x.default.configs["flat/recommended"]),"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/no-deprecated-model-definition":"error"}:{...h(x.default.configs["flat/vue2-recommended"]),"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}],"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/component-api-style":"off"},"vue/multi-word-component-names":"off","vue/attribute-hyphenation":["error","never"],"vue/v-on-event-hyphenation":["error","never"],"vue/html-self-closing":"off","vue/html-closing-bracket-newline":"off","vue/html-closing-bracket-spacing":"off","vue/html-end-tags":"off","vue/html-indent":"off","vue/html-quotes":"off","vue/max-attributes-per-line":"off","vue/multiline-html-element-content-newline":"off","vue/mustache-interpolation-spacing":"off","vue/no-multi-spaces":"off","vue/no-spaces-around-equal-signs-in-attribute":"off","vue/singleline-html-element-content-newline":"off",...ge,...ye,...r}}]}var ge={"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-tag-newline":"off","vue/component-api-style":"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/define-props-destructuring":"off","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-import-compiler-macros":"error","vue/no-multiple-objects-in-class":"error","vue/no-negated-v-if-condition":"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-restricted-v-on":"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/prefer-use-template-ref":"off","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/restricted-component-names":"off","vue/script-indent":"off","vue/slot-name-casing":"error","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-if-else-key":"off","vue/v-on-handler-style":"off","vue/valid-define-options":"error"},ye={"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-empty-pattern":"error","vue/no-extra-parens":"off","vue/no-implicit-coercion":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-negated-condition":"error","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"};function Me(){let e=(0,de.getPackageInfoSync)("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}var xe=require("eslint-flat-config-utils"),we=require("@lntvow/utils"),C=require("local-pkg");var $e=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],De={"@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:o=!0,gitignore:s=!0,stylistic:n=!0,regexp:i=!0,componentExts:u=[],typescript:v=(0,C.isPackageExists)("typescript"),vue:g=["vue","nuxt","vitepress"].some(b=>(0,C.isPackageExists)(b)),test:w=(0,C.isPackageExists)("vitest")}=e,a=[];a.push(E(e.ignores),S(),A({...c(e,"javascript")}),R({typescript:!!v}),X()),s&&a.push(P({...c(e,"gitignore")})),g&&u.push("vue"),v&&a.push(D({...c(e,"typescript"),componentExts:u})),g&&a.push(W({...c(e,"vue")})),i&&a.push(V({...c(e,"regexp")})),w&&a.push($({...c(e,"test")})),a.push(N({vue:!!g}),B()),n&&a.push(M({...c(e,"stylistic")}));let l=$e.reduce((b,_)=>(_ in e&&(b[_]=e[_]),b),{});Object.keys(l).length&&a.push([l]);let y=new xe.FlatConfigComposer;return y=y.append(...a,...r),o&&(y=y.renamePlugins(De)),y}function c(e,r){return(0,we.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,getRulesFromConfig,gitignore,ignores,imports,javascript,lntvow,notInRecommendedRules,prettier,regexp,renameRules,stylistic,test,typescript,unicorn,vue,vueExtensionRules,vueUncategorizedRules});
|
package/dist/index.d.ts
CHANGED
|
@@ -4355,12 +4355,6 @@ interface RuleOptions {
|
|
|
4355
4355
|
* @see https://eslint.vuejs.org/rules/component-options-name-casing.html
|
|
4356
4356
|
*/
|
|
4357
4357
|
'vue/component-options-name-casing'?: Linter.RuleEntry<VueComponentOptionsNameCasing>
|
|
4358
|
-
/**
|
|
4359
|
-
* enforce order of component top-level elements
|
|
4360
|
-
* @see https://eslint.vuejs.org/rules/component-tags-order.html
|
|
4361
|
-
* @deprecated
|
|
4362
|
-
*/
|
|
4363
|
-
'vue/component-tags-order'?: Linter.RuleEntry<VueComponentTagsOrder>
|
|
4364
4358
|
/**
|
|
4365
4359
|
* enforce specific casing for custom event name
|
|
4366
4360
|
* @see https://eslint.vuejs.org/rules/custom-event-name-casing.html
|
|
@@ -4381,6 +4375,11 @@ interface RuleOptions {
|
|
|
4381
4375
|
* @see https://eslint.vuejs.org/rules/define-props-declaration.html
|
|
4382
4376
|
*/
|
|
4383
4377
|
'vue/define-props-declaration'?: Linter.RuleEntry<VueDefinePropsDeclaration>
|
|
4378
|
+
/**
|
|
4379
|
+
* enforce consistent style for props destructuring
|
|
4380
|
+
* @see https://eslint.vuejs.org/rules/define-props-destructuring.html
|
|
4381
|
+
*/
|
|
4382
|
+
'vue/define-props-destructuring'?: Linter.RuleEntry<VueDefinePropsDestructuring>
|
|
4384
4383
|
/**
|
|
4385
4384
|
* Enforce consistent newlines before and after dots in `<template>`
|
|
4386
4385
|
* @see https://eslint.vuejs.org/rules/dot-location.html
|
|
@@ -4742,11 +4741,10 @@ interface RuleOptions {
|
|
|
4742
4741
|
*/
|
|
4743
4742
|
'vue/no-implicit-coercion'?: Linter.RuleEntry<VueNoImplicitCoercion>
|
|
4744
4743
|
/**
|
|
4745
|
-
*
|
|
4746
|
-
* @see https://eslint.vuejs.org/rules/no-
|
|
4747
|
-
* @deprecated
|
|
4744
|
+
* disallow importing Vue compiler macros
|
|
4745
|
+
* @see https://eslint.vuejs.org/rules/no-import-compiler-macros.html
|
|
4748
4746
|
*/
|
|
4749
|
-
'vue/no-
|
|
4747
|
+
'vue/no-import-compiler-macros'?: Linter.RuleEntry<[]>
|
|
4750
4748
|
/**
|
|
4751
4749
|
* disallow irregular whitespace in `.vue` files
|
|
4752
4750
|
* @see https://eslint.vuejs.org/rules/no-irregular-whitespace.html
|
|
@@ -4786,12 +4784,22 @@ interface RuleOptions {
|
|
|
4786
4784
|
* disallow adding multiple root nodes to the template
|
|
4787
4785
|
* @see https://eslint.vuejs.org/rules/no-multiple-template-root.html
|
|
4788
4786
|
*/
|
|
4789
|
-
'vue/no-multiple-template-root'?: Linter.RuleEntry<
|
|
4787
|
+
'vue/no-multiple-template-root'?: Linter.RuleEntry<VueNoMultipleTemplateRoot>
|
|
4790
4788
|
/**
|
|
4791
4789
|
* disallow mutation of component props
|
|
4792
4790
|
* @see https://eslint.vuejs.org/rules/no-mutating-props.html
|
|
4793
4791
|
*/
|
|
4794
4792
|
'vue/no-mutating-props'?: Linter.RuleEntry<VueNoMutatingProps>
|
|
4793
|
+
/**
|
|
4794
|
+
* Disallow negated conditions in `<template>`
|
|
4795
|
+
* @see https://eslint.vuejs.org/rules/no-negated-condition.html
|
|
4796
|
+
*/
|
|
4797
|
+
'vue/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
4798
|
+
/**
|
|
4799
|
+
* disallow negated conditions in v-if/v-else
|
|
4800
|
+
* @see https://eslint.vuejs.org/rules/no-negated-v-if-condition.html
|
|
4801
|
+
*/
|
|
4802
|
+
'vue/no-negated-v-if-condition'?: Linter.RuleEntry<[]>
|
|
4795
4803
|
/**
|
|
4796
4804
|
* disallow parsing errors in `<template>`
|
|
4797
4805
|
* @see https://eslint.vuejs.org/rules/no-parsing-error.html
|
|
@@ -4807,12 +4815,6 @@ interface RuleOptions {
|
|
|
4807
4815
|
* @see https://eslint.vuejs.org/rules/no-ref-as-operand.html
|
|
4808
4816
|
*/
|
|
4809
4817
|
'vue/no-ref-as-operand'?: Linter.RuleEntry<[]>
|
|
4810
|
-
/**
|
|
4811
|
-
* disallow usages of ref objects that can lead to loss of reactivity
|
|
4812
|
-
* @see https://eslint.vuejs.org/rules/no-ref-object-destructure.html
|
|
4813
|
-
* @deprecated
|
|
4814
|
-
*/
|
|
4815
|
-
'vue/no-ref-object-destructure'?: Linter.RuleEntry<[]>
|
|
4816
4818
|
/**
|
|
4817
4819
|
* disallow usages of ref objects that can lead to loss of reactivity
|
|
4818
4820
|
* @see https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html
|
|
@@ -4869,7 +4871,7 @@ interface RuleOptions {
|
|
|
4869
4871
|
*/
|
|
4870
4872
|
'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>
|
|
4871
4873
|
/**
|
|
4872
|
-
* disallow specific
|
|
4874
|
+
* disallow specific elements
|
|
4873
4875
|
* @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
|
|
4874
4876
|
*/
|
|
4875
4877
|
'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>
|
|
@@ -4903,12 +4905,6 @@ interface RuleOptions {
|
|
|
4903
4905
|
* @see https://eslint.vuejs.org/rules/no-root-v-if.html
|
|
4904
4906
|
*/
|
|
4905
4907
|
'vue/no-root-v-if'?: Linter.RuleEntry<[]>
|
|
4906
|
-
/**
|
|
4907
|
-
* disallow usages that lose the reactivity of `props` passed to `setup`
|
|
4908
|
-
* @see https://eslint.vuejs.org/rules/no-setup-props-destructure.html
|
|
4909
|
-
* @deprecated
|
|
4910
|
-
*/
|
|
4911
|
-
'vue/no-setup-props-destructure'?: Linter.RuleEntry<[]>
|
|
4912
4908
|
/**
|
|
4913
4909
|
* disallow usages that lose the reactivity of `props` passed to `setup`
|
|
4914
4910
|
* @see https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html
|
|
@@ -5042,6 +5038,7 @@ interface RuleOptions {
|
|
|
5042
5038
|
/**
|
|
5043
5039
|
* disallow `key` attribute on `<template v-for>`
|
|
5044
5040
|
* @see https://eslint.vuejs.org/rules/no-v-for-template-key.html
|
|
5041
|
+
* @deprecated
|
|
5045
5042
|
*/
|
|
5046
5043
|
'vue/no-v-for-template-key'?: Linter.RuleEntry<[]>
|
|
5047
5044
|
/**
|
|
@@ -5057,6 +5054,7 @@ interface RuleOptions {
|
|
|
5057
5054
|
/**
|
|
5058
5055
|
* disallow adding an argument to `v-model` used in custom component
|
|
5059
5056
|
* @see https://eslint.vuejs.org/rules/no-v-model-argument.html
|
|
5057
|
+
* @deprecated
|
|
5060
5058
|
*/
|
|
5061
5059
|
'vue/no-v-model-argument'?: Linter.RuleEntry<[]>
|
|
5062
5060
|
/**
|
|
@@ -5289,12 +5287,6 @@ interface RuleOptions {
|
|
|
5289
5287
|
* @see https://eslint.vuejs.org/rules/script-indent.html
|
|
5290
5288
|
*/
|
|
5291
5289
|
'vue/script-indent'?: Linter.RuleEntry<VueScriptIndent>
|
|
5292
|
-
/**
|
|
5293
|
-
* prevent `<script setup>` variables used in `<template>` to be marked as unused
|
|
5294
|
-
* @see https://eslint.vuejs.org/rules/script-setup-uses-vars.html
|
|
5295
|
-
* @deprecated
|
|
5296
|
-
*/
|
|
5297
|
-
'vue/script-setup-uses-vars'?: Linter.RuleEntry<[]>
|
|
5298
5290
|
/**
|
|
5299
5291
|
* require a line break before and after the contents of a singleline element
|
|
5300
5292
|
* @see https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html
|
|
@@ -5365,12 +5357,6 @@ interface RuleOptions {
|
|
|
5365
5357
|
* @see https://eslint.vuejs.org/rules/v-on-event-hyphenation.html
|
|
5366
5358
|
*/
|
|
5367
5359
|
'vue/v-on-event-hyphenation'?: Linter.RuleEntry<VueVOnEventHyphenation>
|
|
5368
|
-
/**
|
|
5369
|
-
* enforce or forbid parentheses after method calls without arguments in `v-on` directives
|
|
5370
|
-
* @see https://eslint.vuejs.org/rules/v-on-function-call.html
|
|
5371
|
-
* @deprecated
|
|
5372
|
-
*/
|
|
5373
|
-
'vue/v-on-function-call'?: Linter.RuleEntry<VueVOnFunctionCall>
|
|
5374
5360
|
/**
|
|
5375
5361
|
* enforce writing style for handlers in `v-on` directives
|
|
5376
5362
|
* @see https://eslint.vuejs.org/rules/v-on-handler-style.html
|
|
@@ -5409,6 +5395,7 @@ interface RuleOptions {
|
|
|
5409
5395
|
/**
|
|
5410
5396
|
* require valid keys in model option
|
|
5411
5397
|
* @see https://eslint.vuejs.org/rules/valid-model-definition.html
|
|
5398
|
+
* @deprecated
|
|
5412
5399
|
*/
|
|
5413
5400
|
'vue/valid-model-definition'?: Linter.RuleEntry<[]>
|
|
5414
5401
|
/**
|
|
@@ -5429,6 +5416,7 @@ interface RuleOptions {
|
|
|
5429
5416
|
/**
|
|
5430
5417
|
* enforce valid `.sync` modifier on `v-bind` directives
|
|
5431
5418
|
* @see https://eslint.vuejs.org/rules/valid-v-bind-sync.html
|
|
5419
|
+
* @deprecated
|
|
5432
5420
|
*/
|
|
5433
5421
|
'vue/valid-v-bind-sync'?: Linter.RuleEntry<[]>
|
|
5434
5422
|
/**
|
|
@@ -10167,16 +10155,10 @@ type VueComponentNameInTemplateCasing = []|[("PascalCase" | "kebab-case")]|[("Pa
|
|
|
10167
10155
|
}]
|
|
10168
10156
|
// ----- vue/component-options-name-casing -----
|
|
10169
10157
|
type VueComponentOptionsNameCasing = []|[("camelCase" | "kebab-case" | "PascalCase")]
|
|
10170
|
-
// ----- vue/component-tags-order -----
|
|
10171
|
-
type VueComponentTagsOrder = []|[{
|
|
10172
|
-
order?: (string | string[])[]
|
|
10173
|
-
}]
|
|
10174
10158
|
// ----- vue/custom-event-name-casing -----
|
|
10175
|
-
type VueCustomEventNameCasing =
|
|
10159
|
+
type VueCustomEventNameCasing = []|[("kebab-case" | "camelCase")]|[("kebab-case" | "camelCase"), {
|
|
10176
10160
|
ignores?: string[]
|
|
10177
|
-
}]
|
|
10178
|
-
ignores?: string[]
|
|
10179
|
-
}])
|
|
10161
|
+
}]
|
|
10180
10162
|
// ----- vue/define-emits-declaration -----
|
|
10181
10163
|
type VueDefineEmitsDeclaration = []|[("type-based" | "type-literal" | "runtime")]
|
|
10182
10164
|
// ----- vue/define-macros-order -----
|
|
@@ -10186,6 +10168,10 @@ type VueDefineMacrosOrder = []|[{
|
|
|
10186
10168
|
}]
|
|
10187
10169
|
// ----- vue/define-props-declaration -----
|
|
10188
10170
|
type VueDefinePropsDeclaration = []|[("type-based" | "runtime")]
|
|
10171
|
+
// ----- vue/define-props-destructuring -----
|
|
10172
|
+
type VueDefinePropsDestructuring = []|[{
|
|
10173
|
+
destructure?: ("always" | "never")
|
|
10174
|
+
}]
|
|
10189
10175
|
// ----- vue/dot-location -----
|
|
10190
10176
|
type VueDotLocation = []|[("object" | "property")]
|
|
10191
10177
|
// ----- vue/dot-notation -----
|
|
@@ -10776,6 +10762,7 @@ type VueNoDeprecatedRouterLinkTagProp = []|[{
|
|
|
10776
10762
|
// ----- vue/no-deprecated-slot-attribute -----
|
|
10777
10763
|
type VueNoDeprecatedSlotAttribute = []|[{
|
|
10778
10764
|
ignore?: string[]
|
|
10765
|
+
ignoreParents?: string[]
|
|
10779
10766
|
}]
|
|
10780
10767
|
// ----- vue/no-dupe-keys -----
|
|
10781
10768
|
type VueNoDupeKeys = []|[{
|
|
@@ -10832,6 +10819,10 @@ type VueNoLoneTemplate = []|[{
|
|
|
10832
10819
|
type VueNoMultiSpaces = []|[{
|
|
10833
10820
|
ignoreProperties?: boolean
|
|
10834
10821
|
}]
|
|
10822
|
+
// ----- vue/no-multiple-template-root -----
|
|
10823
|
+
type VueNoMultipleTemplateRoot = []|[{
|
|
10824
|
+
disallowComments?: boolean
|
|
10825
|
+
}]
|
|
10835
10826
|
// ----- vue/no-mutating-props -----
|
|
10836
10827
|
type VueNoMutatingProps = []|[{
|
|
10837
10828
|
shallowOnly?: boolean
|
|
@@ -10934,7 +10925,7 @@ type VueNoRestrictedCustomEvent = (string | {
|
|
|
10934
10925
|
})[]
|
|
10935
10926
|
// ----- vue/no-restricted-html-elements -----
|
|
10936
10927
|
type VueNoRestrictedHtmlElements = (string | {
|
|
10937
|
-
element: string
|
|
10928
|
+
element: (string | string[])
|
|
10938
10929
|
message?: string
|
|
10939
10930
|
})[]
|
|
10940
10931
|
// ----- vue/no-restricted-props -----
|
|
@@ -11106,7 +11097,9 @@ type VuePaddingLinesInComponentDefinition = []|[(("always" | "never") | {
|
|
|
11106
11097
|
groupSingleLineProperties?: boolean
|
|
11107
11098
|
})]
|
|
11108
11099
|
// ----- vue/prefer-true-attribute-shorthand -----
|
|
11109
|
-
type VuePreferTrueAttributeShorthand = []|[("always" | "never")]
|
|
11100
|
+
type VuePreferTrueAttributeShorthand = []|[("always" | "never")]|[("always" | "never"), {
|
|
11101
|
+
except?: string[]
|
|
11102
|
+
}]
|
|
11110
11103
|
// ----- vue/prop-name-casing -----
|
|
11111
11104
|
type VuePropNameCasing = []|[("camelCase" | "snake_case")]|[("camelCase" | "snake_case"), {
|
|
11112
11105
|
ignoreProps?: string[]
|
|
@@ -11175,7 +11168,6 @@ type VueSortKeys = []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
|
11175
11168
|
ignoreGrandchildrenOf?: unknown[]
|
|
11176
11169
|
minKeys?: number
|
|
11177
11170
|
natural?: boolean
|
|
11178
|
-
runOutsideVue?: boolean
|
|
11179
11171
|
}]
|
|
11180
11172
|
// ----- vue/space-in-parens -----
|
|
11181
11173
|
type VueSpaceInParens = []|[("always" | "never")]|[("always" | "never"), {
|
|
@@ -11213,10 +11205,6 @@ type VueVOnEventHyphenation = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
11213
11205
|
})[]
|
|
11214
11206
|
ignoreTags?: string[]
|
|
11215
11207
|
}]
|
|
11216
|
-
// ----- vue/v-on-function-call -----
|
|
11217
|
-
type VueVOnFunctionCall = []|[("always" | "never")]|[("always" | "never"), {
|
|
11218
|
-
ignoreIncludesComment?: boolean
|
|
11219
|
-
}]
|
|
11220
11208
|
// ----- vue/v-on-handler-style -----
|
|
11221
11209
|
type VueVOnHandlerStyle = []|[(("inline" | "inline-function") | ["method", ("inline" | "inline-function")])]|[(("inline" | "inline-function") | ["method", ("inline" | "inline-function")]), {
|
|
11222
11210
|
ignoreIncludesComment?: boolean
|
|
@@ -11252,7 +11240,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
11252
11240
|
onlyEquality?: boolean
|
|
11253
11241
|
}]
|
|
11254
11242
|
// Names of all the configs
|
|
11255
|
-
type ConfigNames = 'lntvow/
|
|
11243
|
+
type ConfigNames = 'lntvow/ignores' | 'lntvow/custom/setup' | 'lntvow/javascript/setup' | 'lntvow/javascript/rules' | 'lntvow/imports/setup' | 'lntvow/imports/rules' | 'lntvow/unicorn/setup' | 'lntvow/unicorn/rules' | 'lntvow/gitignore' | 'lntvow/typescript/setup' | 'lntvow/typescript/rules' | 'lntvow/vue/setup' | 'lntvow/vue/rules' | 'lntvow/regexp/setup' | 'lntvow/regexp/rules' | 'lntvow/test/setup' | 'lntvow/test/rules' | 'lntvow/prettier/setup' | 'lntvow/prettier/rules' | 'lntvow/disables/scripts' | 'lntvow/disables/cli' | 'lntvow/disables/dts' | 'lntvow/disables/test' | 'lntvow/disables/cjs' | 'lntvow/stylistic/setup' | 'lntvow/stylistic/rules'
|
|
11256
11244
|
|
|
11257
11245
|
type Awaitable<T> = T | Promise<T>;
|
|
11258
11246
|
type Rules = RuleOptions;
|
|
@@ -11402,12 +11390,13 @@ declare function renameRules(rules: AnyObject, map: Record<string, string>): {
|
|
|
11402
11390
|
[k: string]: any;
|
|
11403
11391
|
};
|
|
11404
11392
|
declare function combine(...configs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>[]): Promise<TypedFlatConfigItem[]>;
|
|
11393
|
+
declare function getRulesFromConfig(config: Linter.Config[]): any;
|
|
11405
11394
|
|
|
11406
11395
|
declare function custom(): Promise<TypedFlatConfigItem[]>;
|
|
11407
11396
|
|
|
11408
11397
|
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
11409
11398
|
|
|
11410
|
-
declare function gitignore(options
|
|
11399
|
+
declare function gitignore(options?: FlatGitignoreOptions): Promise<TypedFlatConfigItem[]>;
|
|
11411
11400
|
|
|
11412
11401
|
declare function ignores(ignoresList?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
11413
11402
|
|
|
@@ -11418,7 +11407,9 @@ declare function imports(options?: {
|
|
|
11418
11407
|
declare function javascript(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
11419
11408
|
declare const notInRecommendedRules: Partial<Rules>;
|
|
11420
11409
|
|
|
11421
|
-
declare function prettier(
|
|
11410
|
+
declare function prettier(options?: {
|
|
11411
|
+
vue?: boolean;
|
|
11412
|
+
}): Promise<TypedFlatConfigItem[]>;
|
|
11422
11413
|
|
|
11423
11414
|
declare function regexp(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
11424
11415
|
|
|
@@ -11431,6 +11422,8 @@ declare function typescript(options?: OptionsTypeScript & OptionsComponentExts):
|
|
|
11431
11422
|
declare function unicorn(): Promise<TypedFlatConfigItem[]>;
|
|
11432
11423
|
|
|
11433
11424
|
declare function vue(options?: OptionsVue): Promise<TypedFlatConfigItem[]>;
|
|
11425
|
+
declare const vueUncategorizedRules: Partial<Rules>;
|
|
11426
|
+
declare const vueExtensionRules: Partial<Rules>;
|
|
11434
11427
|
|
|
11435
11428
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
11436
11429
|
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
@@ -11463,4 +11456,4 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
11463
11456
|
|
|
11464
11457
|
declare function lntvow(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
|
|
11465
11458
|
|
|
11466
|
-
export { 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, unicorn, vue };
|
|
11459
|
+
export { 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, getRulesFromConfig, gitignore, ignores, imports, javascript, lntvow, notInRecommendedRules, prettier, regexp, renameRules, stylistic, test, typescript, unicorn, vue, vueExtensionRules, vueUncategorizedRules };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +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 Te(...e){return(await Promise.all(e)).flat()}import X from"@lntvow/eslint-plugin";async function C(){return[{name:"lntvow/custom/setup",plugins:{lntvow:X}}]}var c="?([cm])[jt]s?(x)",g="**/*.?([cm])[jt]s?(x)",Ie="**/*.?([cm])js",Fe="**/*.?([cm])jsx",_="**/*.?([cm])ts",L="**/*.?([cm])tsx",K="**/*.{c,le,sc}ss",ke="**/*.css",Ge="**/*.{p,post}css",Be="**/*.less",Ee="**/*.scss",W="**/*.json",J="**/*.json5",Pe="**/*.jsonc",S="**/*.md",qe="**/*.md/*.md",H="**/*.svelte",O="**/*.vue",Y="**/*.y?(a)ml",Re="**/*.toml",z="**/*.xml",Q="**/*.htm?(l)",Ae="**/*.astro",Ne="**/*.{g,graph}ql",Ue=`${S}/${g}`,j=[`**/__tests__/**/*.${c}`,`**/*.spec.${c}`,`**/*.test.${c}`,`**/*.bench.${c}`,`**/*.benchmark.${c}`],Ve=[g,K,W,J,S,H,O,Y,z,Q],I=["**/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 F(){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{readFileSync as Z}from"fs";import{castArray as ee}from"@lntvow/utils";import{convertIgnorePatternToMinimatch as re}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=ee(f),d=[];for(let w of u){let y;try{y=Z(w,"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(re))}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:[...I,...e]}]}import oe from"eslint-plugin-import-x";async function B(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:oe}},{name:"lntvow/imports/rules",rules:{"import/first":"error","import/newline-after-import":"error","import/order":"error"},settings:{}}]}import te from"@eslint/js";import E from"globals";async function P(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:"latest",sourceType:"module",parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{...E.browser,...E.node}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...te.configs.recommended.rules,...ne,"no-unused-vars":"warn",...r}}]}var ne={"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":"off","no-self-compare":"error","no-template-curly-in-string":"error","no-unassigned-vars":"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 se from"eslint-plugin-prettier";import ie from"eslint-config-prettier";async function q(){return[{name:"lntvow/prettier/setup",plugins:{prettier:se}},{name:"lntvow/prettier/rules",rules:{...ie.rules,"prettier/prettier":"warn"}}]}import{configs as R}from"eslint-plugin-regexp";async function A(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 ae from"@stylistic/eslint-plugin";async function N(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:ae}},{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":["error",{beforeBlockComment:!0,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowModuleStart:!0,allowModuleEnd:!0,allowTypeStart:!0,allowTypeEnd:!0}],...r}}]}import pe from"eslint-plugin-vitest";async function U(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:pe}},{name:"lntvow/test/rules",files:[...j],rules:{"lntvow/newline-before-specified-function-call":"error",...r}}]}import{parser as le,plugin as fe,configs as ue}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:fe}},{name:"lntvow/typescript/rules",languageOptions:{parser:le,parserOptions:{sourceType:"module"}},files:f,rules:{...T(ue.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 ce from"eslint-plugin-unicorn";async function M(){return[{name:"lntvow/unicorn/setup",plugins:{unicorn:ce}},{name:"lntvow/unicorn/rules",rules:{"unicorn/catch-error-name":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/error-message":"error","unicorn/new-for-builtins":"error","unicorn/no-accessor-recursion":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-switch-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-string-raw":"error","unicorn/throw-new-error":"error"}}]}import{getPackageInfoSync as me}from"local-pkg";import{parser as $}from"typescript-eslint";import de from"vue-eslint-parser";import l from"eslint-plugin-vue";var ve={...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"},ge={...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 D(e={}){let{overrides:r={},vueVersion:n=ye()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:l}},{name:"lntvow/vue/rules",languageOptions:{parser:de,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:$,tsx:$},sourceType:"module"}},processor:l.processors[".vue"],files:[O],rules:{...l.configs.base.rules,...n===3?ve:ge,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":["error","never"],"vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/v-on-event-hyphenation":["error","never"],"vue/html-indent":"off","vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"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 ye(){let e=me("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}import{FlatConfigComposer as xe}from"eslint-flat-config-utils";import{isBoolean as we}from"@lntvow/utils";import{isPackageExists as h}from"local-pkg";var be=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],Oe={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function he(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:w=h("vitest"),stylistic:y=!0}=e,i=[];i.push(G(e.ignores),C(),P({...m(e,"javascript")}),B({typescript:!!u}),M()),f&&i.push(k({...m(e,"gitignore")})),d&&a.push("vue"),u&&i.push(V({...m(e,"typescript"),componentExts:a})),d&&i.push(D({...m(e,"vue")})),s&&i.push(A({...m(e,"regexp")})),w&&i.push(U({...m(e,"test")})),i.push(q(),F()),y&&i.push(N({...m(e,"stylistic")}));let p=be.reduce((x,b)=>(b in e&&(x[b]=e[b]),x),{});Object.keys(p).length&&i.push([p]);let v=new xe;return v=v.append(...i,...r),n&&(v=v.renamePlugins(Oe)),v}function m(e,r){return we(e[r])?{}:e[r]||{}}export{Ve as GLOB_ALL_SRC,Ae as GLOB_ASTRO,ke as GLOB_CSS,I as GLOB_EXCLUDE,Ne as GLOB_GRAPHQL,Q as GLOB_HTML,Ie as GLOB_JS,W as GLOB_JSON,J as GLOB_JSON5,Pe as GLOB_JSONC,Fe as GLOB_JSX,Be as GLOB_LESS,S as GLOB_MARKDOWN,Ue as GLOB_MARKDOWN_CODE,qe as GLOB_MARKDOWN_IN_MARKDOWN,Ge as GLOB_POSTCSS,Ee as GLOB_SCSS,g as GLOB_SRC,c as GLOB_SRC_EXT,K as GLOB_STYLE,H as GLOB_SVELTE,j as GLOB_TESTS,Re as GLOB_TOML,_ as GLOB_TS,L as GLOB_TSX,O as GLOB_VUE,z as GLOB_XML,Y as GLOB_YAML,Te as combine,C as custom,F as disables,k as gitignore,G as ignores,B as imports,P as javascript,he as lntvow,ne as notInRecommendedRules,q as prettier,A as regexp,T as renameRules,N as stylistic,U as test,V as typescript,M as unicorn,D as vue};
|
|
1
|
+
function C(e,r){return Object.fromEntries(Object.entries(e).map(([n,a])=>{for(let[l,s]of Object.entries(r))if(n.startsWith(`${l}/`))return[s+n.slice(l.length),a];return[n,a]}))}async function Ce(...e){return(await Promise.all(e)).flat()}function O(e){return e.map(r=>r.rules).reduce((r,n)=>({...r,...n}),{})}import K from"@lntvow/eslint-plugin";async function _(){return[{name:"lntvow/custom/setup",plugins:{lntvow:K}}]}var u="?([cm])[jt]s?(x)",g="**/*.?([cm])[jt]s?(x)",Fe="**/*.?([cm])js",Ie="**/*.?([cm])jsx",L="**/*.?([cm])ts",S="**/*.?([cm])tsx",W="**/*.{c,le,sc}ss",Ge="**/*.css",Be="**/*.{p,post}css",Pe="**/*.less",Ee="**/*.scss",J="**/*.json",H="**/*.json5",Re="**/*.jsonc",j="**/*.md",qe="**/*.md/*.md",z="**/*.svelte",h="**/*.vue",Y="**/*.y?(a)ml",Ae="**/*.toml",Q="**/*.xml",Z="**/*.htm?(l)",Ne="**/*.astro",Ue="**/*.{g,graph}ql",Ve=`${j}/${g}`,k=[`**/__tests__/**/*.${u}`,`**/*.spec.${u}`,`**/*.test.${u}`,`**/*.bench.${u}`,`**/*.benchmark.${u}`],Me=[g,W,J,H,j,z,h,Y,Q,Z],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.${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"}}]}import{readFileSync as ee}from"fs";import{castArray as re}from"@lntvow/utils";import{convertIgnorePatternToMinimatch as oe}from"@eslint/compat";async function G(e={}){let{findUpSync:r}=await import("find-up-simple"),{name:n=".gitignore",root:a=!1,files:l=a?n:r(n)||[],strict:s=!1}=e,f=re(l),m=[];for(let d of f){let y;try{y=ee(d,"utf8")}catch(p){if(s)throw p;continue}let i=y.split(/\r?\n/u);m.push(...i.map(p=>p.trim()).filter(p=>p&&!p.startsWith("#")).map(oe))}if(s&&f.length===0)throw new Error("No .gitignore file found");return[{name:"lntvow/gitignore",ignores:m}]}async function B(e=[]){return[{name:"lntvow/ignores",ignores:[...F,...e]}]}import te from"eslint-plugin-import-x";async function P(e={}){let{typescript:r=!1}=e;return[{name:"lntvow/imports/setup",plugins:{import:te}},{name:"lntvow/imports/rules",rules:{"import/no-mutable-exports":"error","import/first":"error","import/newline-after-import":"error","import/no-duplicates":"error","import/order":"error"}}]}import ne from"@eslint/js";import E from"globals";async function R(e={}){let{overrides:r={}}=e;return[{name:"lntvow/javascript/setup",languageOptions:{ecmaVersion:"latest",sourceType:"module",parserOptions:{ecmaVersion:"latest",sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{...E.browser,...E.node}},linterOptions:{reportUnusedDisableDirectives:"warn"}},{name:"lntvow/javascript/rules",rules:{...ne.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":"off","no-self-compare":"error","no-template-curly-in-string":"error","no-unassigned-vars":"error","no-unexpected-multiline":"off","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:"off","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 ie from"eslint-plugin-prettier";import ae from"eslint-config-prettier";async function q(e={}){let{vue:r=!1}=e;return[{name:"lntvow/prettier/setup",plugins:{prettier:ie}},{name:"lntvow/prettier/rules",rules:{...ae.rules,"prettier/prettier":"warn",curly:["error","multi-line"],...r?{"vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}]}:{}}}]}import{configs as A}from"eslint-plugin-regexp";async function N(e={}){let{overrides:r}=e,n=A["flat/recommended"].plugins.regexp,{rules:a}=A["flat/recommended"];return[{name:"lntvow/regexp/setup",plugins:{regexp:n}},{name:"lntvow/regexp/rules",rules:{...a,...r}}]}import pe from"@stylistic/eslint-plugin";async function U(e={}){let{overrides:r={}}=e;return[{name:"lntvow/stylistic/setup",plugins:{style:pe}},{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":["error",{beforeBlockComment:!0,allowBlockStart:!0,allowBlockEnd:!0,allowObjectStart:!0,allowObjectEnd:!0,allowArrayStart:!0,allowArrayEnd:!0,allowClassStart:!0,allowClassEnd:!0,allowEnumStart:!0,allowEnumEnd:!0,allowInterfaceStart:!0,allowInterfaceEnd:!0,allowModuleStart:!0,allowModuleEnd:!0,allowTypeStart:!0,allowTypeEnd:!0}],...r}}]}import le from"eslint-plugin-vitest";async function V(e={}){let{overrides:r}=e;return[{name:"lntvow/test/setup",plugins:{test:le}},{name:"lntvow/test/rules",files:[...k],rules:{"lntvow/newline-before-specified-function-call":"error",...r}}]}import{parser as fe,plugin as ue,configs as ce}from"typescript-eslint";async function M(e={}){let{componentExts:r=[],overrides:n={},parserOptions:a={}}=e,l=[L,S,...r.map(s=>`**/*.${s}`)];return[{name:"lntvow/typescript/setup",plugins:{ts:ue}},{name:"lntvow/typescript/rules",languageOptions:{parser:fe,parserOptions:{sourceType:"module"}},files:l,rules:{...C(ce.strict.map(s=>s.rules).filter(Boolean).reduce((s,f)=>({...s,...f}),{}),{"@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 me from"eslint-plugin-unicorn";async function $(){return[{name:"lntvow/unicorn/setup",plugins:{unicorn:me}},{name:"lntvow/unicorn/rules",rules:{"unicorn/catch-error-name":"error","unicorn/consistent-empty-array-spread":"error","unicorn/consistent-existence-index-check":"error","unicorn/error-message":"error","unicorn/new-for-builtins":"error","unicorn/no-accessor-recursion":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-await-in-promise-methods":"error","unicorn/no-negated-condition":"error","unicorn/no-negation-in-equality-check":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-useless-promise-resolve-reject":"error","unicorn/no-useless-switch-case":"error","unicorn/numeric-separators-style":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-min-max":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-string-raw":"error","unicorn/throw-new-error":"error"}}]}import{getPackageInfoSync as de}from"local-pkg";import{parser as D}from"typescript-eslint";import ve from"vue-eslint-parser";import w from"eslint-plugin-vue";async function X(e={}){let{overrides:r={},vueVersion:n=xe()}=e;return[{name:"lntvow/vue/setup",plugins:{vue:w}},{name:"lntvow/vue/rules",languageOptions:{parser:ve,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:D,tsx:D},sourceType:"module"}},processor:w.processors[".vue"],files:[h],rules:{...n===3?{...O(w.configs["flat/recommended"]),"vue/block-order":["error",{order:["script[setup]","template","style[scoped]"]}],"vue/no-deprecated-model-definition":"error"}:{...O(w.configs["flat/vue2-recommended"]),"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}],"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/component-api-style":"off"},"vue/multi-word-component-names":"off","vue/attribute-hyphenation":["error","never"],"vue/v-on-event-hyphenation":["error","never"],"vue/html-self-closing":"off","vue/html-closing-bracket-newline":"off","vue/html-closing-bracket-spacing":"off","vue/html-end-tags":"off","vue/html-indent":"off","vue/html-quotes":"off","vue/max-attributes-per-line":"off","vue/multiline-html-element-content-newline":"off","vue/mustache-interpolation-spacing":"off","vue/no-multi-spaces":"off","vue/no-spaces-around-equal-signs-in-attribute":"off","vue/singleline-html-element-content-newline":"off",...ge,...ye,...r}}]}var ge={"vue/block-lang":["error",{script:{lang:["ts","tsx"]}}],"vue/block-tag-newline":"off","vue/component-api-style":"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/define-props-destructuring":"off","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-import-compiler-macros":"error","vue/no-multiple-objects-in-class":"error","vue/no-negated-v-if-condition":"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-restricted-v-on":"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/prefer-use-template-ref":"off","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/restricted-component-names":"off","vue/script-indent":"off","vue/slot-name-casing":"error","vue/sort-keys":"off","vue/static-class-names-order":"error","vue/v-for-delimiter-style":"error","vue/v-if-else-key":"off","vue/v-on-handler-style":"off","vue/valid-define-options":"error"},ye={"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-empty-pattern":"error","vue/no-extra-parens":"off","vue/no-implicit-coercion":"error","vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"off","vue/no-negated-condition":"error","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"};function xe(){let e=de("vue",{paths:[process.cwd()]});return e&&e.version?Number(e.version[0]):3}import{FlatConfigComposer as we}from"eslint-flat-config-utils";import{isBoolean as be}from"@lntvow/utils";import{isPackageExists as T}from"local-pkg";var Oe=["name","languageOptions","linterOptions","processor","plugins","rules","settings"],he={"@typescript-eslint":"ts","import-x":"import","@stylistic":"style",vitest:"test"};function Te(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,gitignore:a=!0,stylistic:l=!0,regexp:s=!0,componentExts:f=[],typescript:m=T("typescript"),vue:d=["vue","nuxt","vitepress"].some(x=>T(x)),test:y=T("vitest")}=e,i=[];i.push(B(e.ignores),_(),R({...c(e,"javascript")}),P({typescript:!!m}),$()),a&&i.push(G({...c(e,"gitignore")})),d&&f.push("vue"),m&&i.push(M({...c(e,"typescript"),componentExts:f})),d&&i.push(X({...c(e,"vue")})),s&&i.push(N({...c(e,"regexp")})),y&&i.push(V({...c(e,"test")})),i.push(q({vue:!!d}),I()),l&&i.push(U({...c(e,"stylistic")}));let p=Oe.reduce((x,b)=>(b in e&&(x[b]=e[b]),x),{});Object.keys(p).length&&i.push([p]);let v=new we;return v=v.append(...i,...r),n&&(v=v.renamePlugins(he)),v}function c(e,r){return be(e[r])?{}:e[r]||{}}export{Me as GLOB_ALL_SRC,Ne as GLOB_ASTRO,Ge as GLOB_CSS,F as GLOB_EXCLUDE,Ue as GLOB_GRAPHQL,Z as GLOB_HTML,Fe as GLOB_JS,J as GLOB_JSON,H as GLOB_JSON5,Re as GLOB_JSONC,Ie as GLOB_JSX,Pe as GLOB_LESS,j as GLOB_MARKDOWN,Ve as GLOB_MARKDOWN_CODE,qe as GLOB_MARKDOWN_IN_MARKDOWN,Be as GLOB_POSTCSS,Ee as GLOB_SCSS,g as GLOB_SRC,u as GLOB_SRC_EXT,W as GLOB_STYLE,z as GLOB_SVELTE,k as GLOB_TESTS,Ae as GLOB_TOML,L as GLOB_TS,S as GLOB_TSX,h as GLOB_VUE,Q as GLOB_XML,Y as GLOB_YAML,Ce as combine,_ as custom,I as disables,O as getRulesFromConfig,G as gitignore,B as ignores,P as imports,R as javascript,Te as lntvow,se as notInRecommendedRules,q as prettier,N as regexp,C as renameRules,U as stylistic,V as test,M as typescript,$ as unicorn,X as vue,ye as vueExtensionRules,ge as vueUncategorizedRules};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/eslint-config",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.33.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Customizable eslint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"eslint-plugin-regexp": "^2.10.0",
|
|
41
41
|
"eslint-plugin-unicorn": "^59.0.0",
|
|
42
42
|
"eslint-plugin-vitest": "^0.5.4",
|
|
43
|
-
"eslint-plugin-vue": "^
|
|
43
|
+
"eslint-plugin-vue": "^10.4.0",
|
|
44
44
|
"find-up-simple": "^1.0.1",
|
|
45
45
|
"globals": "^16.3.0",
|
|
46
46
|
"local-pkg": "^1.1.2",
|
|
47
|
-
"typescript-eslint": "^8.
|
|
48
|
-
"vue-eslint-parser": "^
|
|
49
|
-
"@lntvow/eslint-plugin": "^9.
|
|
47
|
+
"typescript-eslint": "^8.42.0",
|
|
48
|
+
"vue-eslint-parser": "^10.2.0",
|
|
49
|
+
"@lntvow/eslint-plugin": "^9.33.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@commitlint/cli": "^19.8.1",
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"simple-git-hooks": "^2.13.1",
|
|
68
68
|
"tsup": "^8.5.0",
|
|
69
69
|
"tsx": "^4.20.5",
|
|
70
|
-
"typescript": "^5.9.2"
|
|
70
|
+
"typescript": "^5.9.2",
|
|
71
|
+
"vue": "^3.5.21"
|
|
71
72
|
},
|
|
72
73
|
"scripts": {
|
|
73
74
|
"rimraf": "rimraf ./node_modules/ && pnpm -r rimraf",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"lint:eslint": "eslint --fix --cache",
|
|
78
79
|
"lint:tsc": "tsc --noEmit",
|
|
79
80
|
"lint": "run-p lint:eslint lint:tsc",
|
|
80
|
-
"dev": "tsup --
|
|
81
|
+
"dev": "tsup --watch",
|
|
81
82
|
"typegen": "pnpm -r build && tsx scripts/typegen.ts",
|
|
82
83
|
"build": "pnpm typegen && tsup",
|
|
83
84
|
"inspect": "pnpm eslint --inspect-config"
|