@lntvow/eslint-config 9.1.2 → 9.2.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.
Files changed (49) hide show
  1. package/dist/index.cjs +1 -0
  2. package/{src/typegen.d.ts → dist/index.d.cts} +186 -28
  3. package/dist/index.d.ts +15281 -0
  4. package/dist/index.js +1 -0
  5. package/package.json +5 -2
  6. package/.czrc +0 -3
  7. package/.editorconfig +0 -14
  8. package/.env.development +0 -1
  9. package/.env.production +0 -1
  10. package/.env.uat +0 -1
  11. package/.github/workflows/publish-npm.yml +0 -44
  12. package/.husky/commit-msg +0 -4
  13. package/.husky/pre-commit +0 -4
  14. package/.lintstagedrc +0 -4
  15. package/.prettierrc +0 -10
  16. package/.vscode/settings.json +0 -14
  17. package/api/basic.js +0 -22
  18. package/api/vue.js +0 -34
  19. package/commitlint.config.cjs +0 -4
  20. package/eslint.config.js +0 -21
  21. package/packages/eslint-config-ts/index.js +0 -85
  22. package/packages/eslint-config-ts/package.json +0 -18
  23. package/packages/eslint-plugin/index.js +0 -5
  24. package/packages/eslint-plugin/package.json +0 -16
  25. package/packages/eslint-plugin/rules/get.js +0 -18
  26. package/packages/eslint-plugin/test/get.test.js +0 -39
  27. package/src/configs/gitignore.ts +0 -34
  28. package/src/configs/ignores.ts +0 -10
  29. package/src/configs/imports.ts +0 -17
  30. package/src/configs/index.ts +0 -8
  31. package/src/configs/javascript.ts +0 -161
  32. package/src/configs/prettier.ts +0 -18
  33. package/src/configs/stylistic.ts +0 -59
  34. package/src/configs/typescript.ts +0 -63
  35. package/src/configs/vue.ts +0 -316
  36. package/src/factory.ts +0 -167
  37. package/src/globs.ts +0 -86
  38. package/src/index.ts +0 -7
  39. package/src/types.ts +0 -127
  40. package/src/typings/index.d.ts +0 -3
  41. package/src/utils/index.ts +0 -30
  42. package/test/js.vue +0 -28
  43. package/test/jsx.vue +0 -27
  44. package/test/test.js +0 -11
  45. package/test/test.ts +0 -18
  46. package/test/ts.vue +0 -26
  47. package/test/tsx.vue +0 -23
  48. package/tsconfig.json +0 -20
  49. package/tsup.config.ts +0 -10
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var ie=Object.create;var y=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var ae=Object.getPrototypeOf,ce=Object.prototype.hasOwnProperty;var ue=(e,o)=>{for(var r in o)y(e,r,{get:o[r],enumerable:!0})},N=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of fe(o))!ce.call(e,t)&&t!==r&&y(e,t,{get:()=>o[t],enumerable:!(n=pe(o,t))||n.enumerable});return e};var s=(e,o,r)=>(r=e!=null?ie(ae(e)):{},N(o||!e||!e.__esModule?y(r,"default",{value:e,enumerable:!0}):r,e)),le=e=>N(y({},"__esModule",{value:!0}),e);var Be={};ue(Be,{GLOB_ALL_SRC:()=>je,GLOB_ASTRO:()=>Ce,GLOB_CSS:()=>ge,GLOB_EXCLUDE:()=>T,GLOB_GRAPHQL:()=>Le,GLOB_HTML:()=>W,GLOB_JS:()=>me,GLOB_JSON:()=>$,GLOB_JSON5:()=>M,GLOB_JSONC:()=>he,GLOB_JSX:()=>ve,GLOB_LESS:()=>Oe,GLOB_MARKDOWN:()=>L,GLOB_MARKDOWN_CODE:()=>Te,GLOB_MARKDOWN_IN_MARKDOWN:()=>we,GLOB_POSTCSS:()=>xe,GLOB_SCSS:()=>be,GLOB_SRC:()=>v,GLOB_SRC_EXT:()=>m,GLOB_STYLE:()=>U,GLOB_SVELTE:()=>K,GLOB_TESTS:()=>Se,GLOB_TOML:()=>_e,GLOB_TS:()=>de,GLOB_TSX:()=>ye,GLOB_VUE:()=>g,GLOB_XML:()=>J,GLOB_YAML:()=>X,StylisticConfigDefaults:()=>Z,default:()=>Fe,getVueVersion:()=>te,gitignore:()=>C,ignores:()=>S,imports:()=>j,javascript:()=>G,lntvow:()=>w,prettier:()=>F,renameRules:()=>O,stylistic:()=>k,typescript:()=>I,vue:()=>P});module.exports=le(Be);var ne=require("eslint-flat-config-utils"),se=require("@lntvow/utils"),q=require("local-pkg");var R=s(require("fs"),1),A=require("find-up"),V=require("@lntvow/utils"),D=s(require("parse-gitignore"),1);async function C(e){let{name:o=".gitignore",root:r=!1,files:n=r?o:(0,A.findUpSync)(o)||[]}=e,t=(0,V.castArray)(n),i=[];for(let u of t)try{let f=R.default.readFileSync(u,"utf8"),d=(0,D.default)(f).globs();for(let c of d)c.type==="ignore"?i.push(...c.patterns):c.type==="unignore"&&i.push(...c.patterns.map(l=>`!${l}`))}catch{throw new Error(`Failed to read file: ${u}`)}return[{ignores:i}]}var m="?([cm])[jt]s?(x)",v="**/*.?([cm])[jt]s?(x)",me="**/*.?([cm])js",ve="**/*.?([cm])jsx",de="**/*.?([cm])ts",ye="**/*.?([cm])tsx",U="**/*.{c,le,sc}ss",ge="**/*.css",xe="**/*.{p,post}css",Oe="**/*.less",be="**/*.scss",$="**/*.json",M="**/*.json5",he="**/*.jsonc",L="**/*.md",we="**/*.md/*.md",K="**/*.svelte",g="**/*.vue",X="**/*.y?(a)ml",_e="**/*.toml",J="**/*.xml",W="**/*.htm?(l)",Ce="**/*.astro",Le="**/*.{g,graph}ql",Te=`${L}/${v}`,Se=[`**/__tests__/**/*.${m}`,`**/*.spec.${m}`,`**/*.test.${m}`,`**/*.bench.${m}`,`**/*.benchmark.${m}`],je=[v,U,$,M,L,K,g,X,J,W],T=["**/node_modules","**/dist","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/bun.lockb","**/output","**/coverage","**/temp","**/.temp","**/tmp","**/.tmp","**/.history","**/.vitepress/cache","**/.nuxt","**/.next","**/.vercel","**/.changeset","**/.idea","**/.cache","**/.output","**/.vite-inspect","**/.yarn","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];async function S(){return[{ignores:[...T]}]}var H=s(require("eslint-plugin-import-x"),1);async function j(){return[{name:"lntvow/imports/rules",plugins:{import:H.default},rules:{"import/order":"error","import/newline-after-import":"error"}}]}var z=s(require("@eslint/js"),1),x=s(require("globals"),1);async function G(e={}){let{overrides:o={}}=e;return[{name:"lntvow/javascript/rules",languageOptions:{ecmaVersion:2022,sourceType:"module",parserOptions:{ecmaVersion:2022,sourceType:"module",ecmaFeatures:{jsx:!0}},globals:{...x.default.browser,...x.default.es2021,...x.default.node,document:"readonly",navigator:"readonly",window:"readonly"}},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...z.default.configs.all.rules,"no-unused-vars":"warn","no-use-before-define":["error",{functions:!1}],camelcase:"warn","capitalized-comments":"off","class-methods-use-this":"off",complexity:"off",curly:["error","multi-line"],"func-names":"off","func-style":"off","guard-for-in":"off","id-denylist":"off","id-length":"off","id-match":"off","init-declarations":"off","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-bitwise":"off","no-case-declarations":"off","no-console":"warn","no-continue":"off","no-empty":["error",{allowEmptyCatch:!0}],"no-implicit-coercion":"off","no-implicit-globals":"off","no-magic-numbers":["warn",{ignoreArrayIndexes:!0,ignoreDefaultValues:!0}],"no-nested-ternary":"off","no-new":"off","no-param-reassign":"off","no-plusplus":"off","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-shadow":"off","no-ternary":"off","no-throw-literal":"off","no-underscore-dangle":"off","no-void":"off","no-warning-comments":"off","one-var":"off","prefer-exponentiation-operator":"off","prefer-promise-reject-errors":"off",radix:"off","require-await":"off","require-unicode-regexp":"off","sort-imports":"off","sort-keys":"off","sort-vars":"off",strict:"off",...o}}]}var Y=s(require("eslint-plugin-prettier"),1),Q=s(require("eslint-config-prettier"),1);async function F(){return[{name:"lntvow/prettier/rules",plugins:{prettier:Y.default},rules:{...Q.default.rules,"prettier/prettier":"warn"}}]}var B=s(require("@stylistic/eslint-plugin"),1),Z={indent:2,jsx:!0,quotes:"single",semi:!1};async function k(e={}){let{indent:o,jsx:r,overrides:n={},quotes:t,semi:i}={...Z,...e},u=B.default.configs.customize({flat:!0,indent:o,jsx:r,pluginName:"style",quotes:t,semi:i});return[{name:"lntvow/stylistic/rules",plugins:{style:B.default},rules:{"style/spaced-comment":"error","style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:"function"}],...n}}]}var b=s(require("@typescript-eslint/eslint-plugin"),1),ee=s(require("@typescript-eslint/parser"),1);function O(e,o){return Object.fromEntries(Object.entries(e).map(([r,n])=>{for(let[t,i]of Object.entries(o))if(r.startsWith(`${t}/`))return[i+r.slice(t.length),n];return[r,n]}))}async function I(e={}){let{componentExts:o=[],overrides:r={},parserOptions:n={}}=e,t=[v,...o.map(i=>`**/*.${i}`)];return[{name:"lntvow/typescript/rules",plugins:{typescript:b.default},languageOptions:{parser:ee.default,parserOptions:{sourceType:"module"}},files:t,rules:{...O(b.default.configs["eslint-recommended"].overrides[0].rules,{"@typescript-eslint":"typescript"}),...O(b.default.configs.strict.rules,{"@typescript-eslint":"typescript"}),"typescript/no-non-null-assertion":"off","typescript/no-explicit-any":"off","typescript/ban-ts-comment":"off","typescript/no-unused-vars":"warn","no-use-before-define":"off","typescript/no-use-before-define":["error",{functions:!1}],...r}}]}var oe=require("local-pkg"),E=s(require("@typescript-eslint/parser"),1),re=s(require("vue-eslint-parser"),1),a=s(require("eslint-plugin-vue"),1);async function P(e={}){let{overrides:o={},vueVersion:r=te()}=e,n={...a.default.configs["vue3-essential"].rules,...a.default.configs["vue3-strongly-recommended"].rules,...a.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"},t={...a.default.configs.essential.rules,...a.default.configs["strongly-recommended"].rules,...a.default.configs.recommended.rules,"vue/block-lang":["error",{script:{allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style[scoped]"]}]};return[{name:"lntvow/vue/rules",plugins:{vue:a.default},languageOptions:{parser:re.default,parserOptions:{ecmaFeatures:{jsx:!0},parser:{ts:E.default,tsx:E.default},sourceType:"module"}},processor:a.default.processors[".vue"],files:[g],rules:{...a.default.configs.base.rules,...r===3?n:t,"vue/multi-word-component-names":"off","vue/attribute-hyphenation":["error","never"],"vue/html-indent":"off","vue/html-self-closing":["error",{html:{void:"always",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/max-attributes-per-line":"off","vue/singleline-html-element-content-newline":"off","vue/v-on-event-hyphenation":["error","never"],"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/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-direct-export":"error","vue/require-emit-validator":"off","vue/require-explicit-slots":"error","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":"error","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",...o}}]}function te(){let e=(0,oe.getPackageInfoSync)("vue",{paths:[process.cwd()]});return e&&e.version?+e.version[0]:3}var Ge=["name","files","ignores","languageOptions","linterOptions","processor","plugins","rules","settings"];function w(e={},...o){let{componentExts:r=[],gitignore:n=!0,typescript:t=(0,q.isPackageExists)("typescript"),vue:i=["vue","nuxt","vitepress"].some(l=>(0,q.isPackageExists)(l))}=e,u=e.stylistic===!1?!1:typeof e.stylistic=="object"?e.stylistic:{},f=[];f.push(S(),G({...h(e,"javascript")}),j()),n&&f.push(C(h(e,"gitignore"))),i&&r.push("vue"),t&&f.push(I({...h(e,"typescript"),componentExts:r})),u&&f.push(k({...u})),i&&f.push(P({...h(e,"vue")})),f.push(F());let d=Ge.reduce((l,_)=>(_ in e&&(l[_]=e[_]),l),{});Object.keys(d).length&&f.push([d]);let c=new ne.FlatConfigComposer;return c=c.append(...f,...o),c}function h(e,o){return(0,se.isBoolean)(e[o])?{}:e[o]||{}}var Fe=w;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,StylisticConfigDefaults,getVueVersion,gitignore,ignores,imports,javascript,lntvow,prettier,renameRules,stylistic,typescript,vue});
@@ -1,8 +1,14 @@
1
+ import { FlatConfigComposer } from 'eslint-flat-config-utils';
2
+ import { Linter } from 'eslint';
3
+ import { ParserOptions } from '@typescript-eslint/parser';
4
+ import { StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
5
+ import { AnyObject } from '@lntvow/utils';
6
+
1
7
  /* eslint-disable */
2
8
  /* prettier-ignore */
3
- import type { Linter } from 'eslint'
4
9
 
5
- export interface RuleOptions {
10
+
11
+ interface RuleOptions {
6
12
  /**
7
13
  * Enforce getter and setter pairs in objects and classes
8
14
  * @see https://eslint.org/docs/latest/rules/accessor-pairs
@@ -7654,31 +7660,6 @@ type AccessorPairs = []|[{
7654
7660
  setWithoutGet?: boolean
7655
7661
  enforceForClassMembers?: boolean
7656
7662
  }]
7657
- // ----- antfu/consistent-list-newline -----
7658
- type AntfuConsistentListNewline = []|[{
7659
- ArrayExpression?: boolean
7660
- ArrowFunctionExpression?: boolean
7661
- CallExpression?: boolean
7662
- ExportNamedDeclaration?: boolean
7663
- FunctionDeclaration?: boolean
7664
- FunctionExpression?: boolean
7665
- ImportDeclaration?: boolean
7666
- NewExpression?: boolean
7667
- ObjectExpression?: boolean
7668
- TSInterfaceDeclaration?: boolean
7669
- TSTupleType?: boolean
7670
- TSTypeLiteral?: boolean
7671
- TSTypeParameterDeclaration?: boolean
7672
- TSTypeParameterInstantiation?: boolean
7673
- ObjectPattern?: boolean
7674
- ArrayPattern?: boolean
7675
- JSXOpeningElement?: boolean
7676
- }]
7677
- // ----- antfu/indent-unindent -----
7678
- type AntfuIndentUnindent = []|[{
7679
- indent?: number
7680
- tags?: string[]
7681
- }]
7682
7663
  // ----- array-bracket-newline -----
7683
7664
  type ArrayBracketNewline = []|[(("always" | "never" | "consistent") | {
7684
7665
  multiline?: boolean
@@ -15120,4 +15101,181 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
15120
15101
  onlyEquality?: boolean
15121
15102
  }]
15122
15103
  // Names of all the configs
15123
- export type ConfigNames = 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/eslint-comments/rules' | 'antfu/formatter/setup' | 'antfu/imports/rules' | 'antfu/imports/disables/bin' | 'antfu/javascript/rules' | 'antfu/javascript/disables/cli' | 'antfu/jsdoc/rules' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/disables' | 'antfu/node/rules' | 'antfu/perfectionist/setup' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/sort/package-json' | 'antfu/stylistic/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/regexp/rules' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/rules' | 'antfu/typescript/disables/dts' | 'antfu/typescript/disables/test' | 'antfu/typescript/disables/cjs' | 'antfu/unicorn/rules' | 'antfu/unocss' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/yaml/setup' | 'antfu/yaml/rules'
15104
+ type ConfigNames = 'antfu/astro/setup' | 'antfu/astro/rules' | 'antfu/eslint-comments/rules' | 'antfu/formatter/setup' | 'antfu/imports/rules' | 'antfu/imports/disables/bin' | 'antfu/javascript/rules' | 'antfu/javascript/disables/cli' | 'antfu/jsdoc/rules' | 'antfu/jsonc/setup' | 'antfu/jsonc/rules' | 'antfu/markdown/setup' | 'antfu/markdown/processor' | 'antfu/markdown/parser' | 'antfu/markdown/disables' | 'antfu/node/rules' | 'antfu/perfectionist/setup' | 'antfu/react/setup' | 'antfu/react/rules' | 'antfu/solid/setup' | 'antfu/solid/rules' | 'antfu/sort/package-json' | 'antfu/stylistic/rules' | 'antfu/svelte/setup' | 'antfu/svelte/rules' | 'antfu/test/setup' | 'antfu/test/rules' | 'antfu/toml/setup' | 'antfu/toml/rules' | 'antfu/regexp/rules' | 'antfu/typescript/setup' | 'antfu/typescript/parser' | 'antfu/typescript/rules' | 'antfu/typescript/disables/dts' | 'antfu/typescript/disables/test' | 'antfu/typescript/disables/cjs' | 'antfu/unicorn/rules' | 'antfu/unocss' | 'antfu/vue/setup' | 'antfu/vue/rules' | 'antfu/yaml/setup' | 'antfu/yaml/rules'
15105
+
15106
+ type Awaitable<T> = T | Promise<T>;
15107
+ type Rules = RuleOptions;
15108
+
15109
+ type TypedFlatConfigItem = Omit<Linter.FlatConfig<Linter.RulesRecord & Rules>, 'plugins'> & {
15110
+ /**
15111
+ * An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
15112
+ *
15113
+ * @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
15114
+ */
15115
+ plugins?: Record<string, any>;
15116
+ };
15117
+ interface OptionsVue extends OptionsOverrides {
15118
+ /**
15119
+ * Vue version. Apply different rules set from `eslint-plugin-vue`.
15120
+ *
15121
+ * @default auto-detect based on the dependencies
15122
+ */
15123
+ vueVersion?: 2 | 3;
15124
+ }
15125
+ interface OptionsComponentExts {
15126
+ /**
15127
+ * Additional extensions for components.
15128
+ *
15129
+ * @example ['vue']
15130
+ * @default []
15131
+ */
15132
+ componentExts?: string[];
15133
+ }
15134
+ interface OptionsTypeScript extends OptionsOverrides {
15135
+ /**
15136
+ * When this options is provided, type aware rules will be enabled.
15137
+ * @see https://typescript-eslint.io/linting/typed-linting/
15138
+ */
15139
+ tsconfigPath?: string | string[];
15140
+ /**
15141
+ * Additional parser options for TypeScript.
15142
+ */
15143
+ parserOptions?: Partial<ParserOptions>;
15144
+ /**
15145
+ * Glob patterns for files that should be type aware.
15146
+ * @default ['**\/*.{ts,tsx}']
15147
+ */
15148
+ filesTypeAware?: string[];
15149
+ }
15150
+ interface StylisticConfig extends Pick<StylisticCustomizeOptions, 'indent' | 'quotes' | 'jsx' | 'semi'>, OptionsOverrides {
15151
+ }
15152
+ interface OptionsOverrides {
15153
+ overrides?: TypedFlatConfigItem['rules'];
15154
+ }
15155
+ interface FlatGitignoreOptions {
15156
+ /**
15157
+ * Name of the configuration.
15158
+ * @default 'gitignore'
15159
+ */
15160
+ name?: string;
15161
+ /**
15162
+ * Path to `.gitignore` files, or files with compatible formats like `.eslintignore`.
15163
+ */
15164
+ files?: string | string[];
15165
+ /**
15166
+ * Mark the current working directory as the root directory,
15167
+ * disable searching for `.gitignore` files in parent directories.
15168
+ *
15169
+ * This option is not effective when `files` is explicitly specified.
15170
+ * @default false
15171
+ */
15172
+ root?: boolean;
15173
+ }
15174
+ interface OptionsConfig extends OptionsComponentExts {
15175
+ /**
15176
+ * Core rules. Can't be disabled.
15177
+ */
15178
+ javascript?: OptionsOverrides;
15179
+ /**
15180
+ * Enable TypeScript support.
15181
+ *
15182
+ * Passing an object to enable TypeScript Language Server support.
15183
+ *
15184
+ * @default auto-detect based on the dependencies
15185
+ */
15186
+ typescript?: boolean | OptionsTypeScript;
15187
+ /**
15188
+ * Enable Vue support.
15189
+ *
15190
+ * @default auto-detect based on the dependencies
15191
+ */
15192
+ vue?: boolean | OptionsVue;
15193
+ /**
15194
+ * Enable stylistic rules.
15195
+ *
15196
+ * @see https://eslint.style/
15197
+ * @default true
15198
+ */
15199
+ stylistic?: boolean | StylisticConfig;
15200
+ /**
15201
+ * Enable gitignore support.
15202
+ *
15203
+ * Passing an object to configure the options.
15204
+ *
15205
+ * @default true
15206
+ */
15207
+ gitignore?: boolean | FlatGitignoreOptions;
15208
+ }
15209
+
15210
+ declare function lntvow(options?: OptionsConfig & TypedFlatConfigItem, ...userConfigs: Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer | Linter.FlatConfig[]>[]): FlatConfigComposer<TypedFlatConfigItem, ConfigNames>;
15211
+
15212
+ /**
15213
+ * Rename plugin prefixes in a rule object.
15214
+ * Accepts a map of prefixes to rename.
15215
+ *
15216
+ * @example
15217
+ * ```ts
15218
+ * import { renameRules } from '@lntvow/eslint-config'
15219
+ *
15220
+ * export default [{
15221
+ * rules: renameRules(
15222
+ * {
15223
+ * '@typescript-eslint/indent': 'error'
15224
+ * },
15225
+ * { '@typescript-eslint': 'ts' }
15226
+ * )
15227
+ * }]
15228
+ * ```
15229
+ */
15230
+ declare function renameRules(rules: AnyObject, map: Record<string, string>): {
15231
+ [k: string]: any;
15232
+ };
15233
+
15234
+ declare function gitignore(options: FlatGitignoreOptions): Promise<TypedFlatConfigItem[]>;
15235
+
15236
+ declare function ignores(): Promise<TypedFlatConfigItem[]>;
15237
+
15238
+ declare function imports(): Promise<TypedFlatConfigItem[]>;
15239
+
15240
+ declare function javascript(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
15241
+
15242
+ declare function prettier(): Promise<TypedFlatConfigItem[]>;
15243
+
15244
+ declare const StylisticConfigDefaults: StylisticConfig;
15245
+ declare function stylistic(options?: StylisticConfig): Promise<TypedFlatConfigItem[]>;
15246
+
15247
+ declare function typescript(options?: OptionsTypeScript & OptionsComponentExts): Promise<TypedFlatConfigItem[]>;
15248
+
15249
+ declare function vue(options?: OptionsVue): Promise<TypedFlatConfigItem[]>;
15250
+ declare function getVueVersion(): number;
15251
+
15252
+ declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
15253
+ declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
15254
+ declare const GLOB_JS = "**/*.?([cm])js";
15255
+ declare const GLOB_JSX = "**/*.?([cm])jsx";
15256
+ declare const GLOB_TS = "**/*.?([cm])ts";
15257
+ declare const GLOB_TSX = "**/*.?([cm])tsx";
15258
+ declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
15259
+ declare const GLOB_CSS = "**/*.css";
15260
+ declare const GLOB_POSTCSS = "**/*.{p,post}css";
15261
+ declare const GLOB_LESS = "**/*.less";
15262
+ declare const GLOB_SCSS = "**/*.scss";
15263
+ declare const GLOB_JSON = "**/*.json";
15264
+ declare const GLOB_JSON5 = "**/*.json5";
15265
+ declare const GLOB_JSONC = "**/*.jsonc";
15266
+ declare const GLOB_MARKDOWN = "**/*.md";
15267
+ declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
15268
+ declare const GLOB_SVELTE = "**/*.svelte";
15269
+ declare const GLOB_VUE = "**/*.vue";
15270
+ declare const GLOB_YAML = "**/*.y?(a)ml";
15271
+ declare const GLOB_TOML = "**/*.toml";
15272
+ declare const GLOB_XML = "**/*.xml";
15273
+ declare const GLOB_HTML = "**/*.htm?(l)";
15274
+ declare const GLOB_ASTRO = "**/*.astro";
15275
+ declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
15276
+ declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
15277
+ declare const GLOB_TESTS: string[];
15278
+ declare const GLOB_ALL_SRC: string[];
15279
+ declare const GLOB_EXCLUDE: string[];
15280
+
15281
+ 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, StylisticConfigDefaults, lntvow as default, getVueVersion, gitignore, ignores, imports, javascript, lntvow, prettier, renameRules, stylistic, typescript, vue };