productive-eslint
Version:
Mildly strict and sufficiently practical ESLint config based on Evgeny Orekhov's eslint-config-hardcore
1 lines • 30.9 kB
JavaScript
import{a as e,c as t,d as n,f as r,g as i,h as a,l as o,m as s,n as c,o as l,p as u,s as d,u as f,v as p}from"./model-DGP73Lve.js";import m from"@typescript-eslint/eslint-plugin";import h from"@typescript-eslint/parser";import g from"eslint-plugin-import";import _ from"@smarttools/eslint-plugin-rxjs";import{FlatConfigComposer as v}from"eslint-flat-config-utils";import y from"eslint-plugin-prettier";import b from"eslint-plugin-vue";import x from"globals";import{isPackageExists as S}from"local-pkg";import C from"vue-eslint-parser";import ee from"@eslint/css";import te from"@eslint-community/eslint-plugin-eslint-comments";import w from"eslint-plugin-prefer-arrow-functions";import T from"eslint-plugin-unused-imports";import E from"eslint-plugin-jsonc";import{meta as D,parseForESLint as O}from"jsonc-eslint-parser";import k from"eslint-plugin-n";import A from"eslint-plugin-perfectionist";import{AST_NODE_TYPES as j,ESLintUtils as M}from"@typescript-eslint/utils";import N from"eslint-plugin-promise";import P from"eslint-plugin-regexp";import F from"eslint-plugin-sonarjs";import I from"eslint-plugin-toml";import{meta as L,parseForESLint as R}from"toml-eslint-parser";import z from"eslint-plugin-unicorn";import B from"eslint-plugin-yml";import{meta as V,parseForESLint as H}from"yaml-eslint-parser";let U=function(e){return e.AUTO_FIXABLE=`autoFixable`,e.RECOMMENDED=`recommended`,e}({});const W=[`autoFixable`,`recommended`],G=(e,t)=>{let n=W.indexOf(t),r=W.slice(0,n+1),[i]=r,a=i?e[i]:null,o=a?(()=>{let{rules:e,...t}=a;return t})():{},s={};for(let t of r){let n=e[t];n.rules&&Object.keys(n.rules).length>0&&Object.assign(s,n.rules)}return Object.keys(s).length>0?{...o,rules:s}:o},K={autoFixable:{...c},recommended:{}},q={plugins:{css:ee}},J={"css/no-duplicate-imports":`error`,"css/no-duplicate-keyframe-selectors":`error`,"css/no-empty-blocks":`error`,"css/no-invalid-at-rule-placement":`error`,"css/no-invalid-at-rules":`error`,"css/no-invalid-named-grid-areas":`error`,"css/no-invalid-properties":`error`},Y={autoFixable:{...q},recommended:{rules:J}},X=[{files:[`**/scripts/${f}`],name:`disables/scripts`,rules:{"@typescript-eslint/explicit-function-return-type":`off`,"no-console":`off`}},{files:[`**/cli/${f}`,`**/cli.${n}`],name:`disables/cli`,rules:{"no-console":`off`}},{files:[`**/*.d.?([cm])ts`],name:`disables/dts`,rules:{"eslint-comments/no-unlimited-disable":`off`,"import/no-default-export":`off`,"no-restricted-syntax":`off`,"unused-imports/no-unused-vars":`off`}},{files:[`**/*.config.${n}`,`**/*.config.*.${n}`,`**/*.plugin.${n}`],name:`disables/config-files`,rules:{"@typescript-eslint/explicit-function-return-type":`off`,"@typescript-eslint/naming-convention":`off`,"@typescript-eslint/no-magic-numbers":`off`,"no-console":`off`,"no-template-curly-in-string":`off`}}],Z={plugins:{"eslint-comments":te}},Q={"eslint-comments/no-aggregating-enable":`error`,"eslint-comments/no-duplicate-disable":`error`,"eslint-comments/no-unlimited-disable":`error`,"eslint-comments/no-unused-enable":`error`},ne={autoFixable:{...Z},recommended:{rules:Q}},re={name:`imports`,plugins:{import:g},settings:{"import/resolver":{typescript:!0}}},ie={"import/first":`error`,"import/newline-after-import":[`error`,{count:1}],"import/no-empty-named-blocks":`error`},ae={"import/consistent-type-specifier-style":[`error`,`prefer-top-level`],"import/extensions":[`error`,`ignorePackages`,{js:`never`,jsx:`never`,mts:`never`,ts:`never`,tsx:`never`}],"import/no-commonjs":`error`,"import/no-duplicates":`error`,"import/no-mutable-exports":`error`,"import/no-named-default":`error`,"import/no-namespace":`error`,"import/no-relative-packages":`error`,"import/no-self-import":`error`,"import/no-useless-path-segments":`error`},oe={autoFixable:{...re,rules:ie},recommended:{rules:ae}},se={plugins:{"prefer-arrow-functions":w,"unused-imports":T}},ce={"arrow-body-style":[`error`,`as-needed`],curly:[`error`,`all`],"dot-notation":`off`,"no-array-constructor":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-regex-spaces":`error`,"no-restricted-syntax":`off`,"no-throw-literal":`off`,"no-undef-init":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-useless-computed-key":`error`,"no-useless-rename":`error`,"no-useless-return":`error`,"no-var":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"operator-assignment":`error`,"prefer-arrow-callback":[`error`,{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-exponentiation-operator":`error`,"prefer-object-spread":`error`,"prefer-promise-reject-errors":`off`,"prefer-template":`error`,"unicode-bom":[`error`,`never`],"unused-imports/no-unused-imports":`error`,"unused-imports/no-unused-vars":`off`,yoda:[`error`,`never`]},le={"array-callback-return":`error`,"constructor-super":`error`,"default-case-last":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-empty-static-block":`error`,"no-ex-assign":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-object-constructor":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"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-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-unexpected-multiline":`error`,"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-concat":`error`,"no-useless-constructor":`error`,"no-useless-escape":`error`,"no-with":`error`,"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"symbol-description":`error`,"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}]},ue={autoFixable:{...se,rules:ce},recommended:{rules:le}},de={files:[d,t,o],languageOptions:{parser:{meta:D,parseForESLint:O}},name:`jsonc`,plugins:{jsonc:E}},fe={"jsonc/array-bracket-spacing":[`error`,`never`],"jsonc/comma-dangle":[`error`,`never`],"jsonc/comma-style":[`error`,`last`],"jsonc/indent":[`error`,2],"jsonc/key-spacing":[`error`,{afterColon:!0,beforeColon:!1}],"jsonc/no-binary-expression":`error`,"jsonc/no-binary-numeric-literals":`error`,"jsonc/no-escape-sequence-in-identifier":`error`,"jsonc/no-floating-decimal":`error`,"jsonc/no-hexadecimal-numeric-literals":`error`,"jsonc/no-number-props":`error`,"jsonc/no-numeric-separators":`error`,"jsonc/no-octal-numeric-literals":`error`,"jsonc/no-parenthesized":`error`,"jsonc/no-plus-sign":`error`,"jsonc/no-template-literals":`error`,"jsonc/no-unicode-codepoint-escapes":`error`,"jsonc/object-curly-newline":[`error`,{consistent:!0,multiline:!0}],"jsonc/object-curly-spacing":[`error`,`always`],"jsonc/object-property-newline":[`error`,{allowAllPropertiesOnSameLine:!0}],"jsonc/quote-props":`error`,"jsonc/quotes":`error`,"jsonc/space-unary-ops":`error`,"jsonc/valid-json-number":`error`},pe={"jsonc/no-bigint-literals":`error`,"jsonc/no-dupe-keys":`error`,"jsonc/no-infinity":`error`,"jsonc/no-multi-str":`error`,"jsonc/no-nan":`error`,"jsonc/no-octal":`error`,"jsonc/no-octal-escape":`error`,"jsonc/no-regexp-literals":`error`,"jsonc/no-sparse-arrays":`error`,"jsonc/no-undefined-value":`error`,"jsonc/no-useless-escape":`error`,"jsonc/vue-custom-block/no-parsing-error":`error`},me={autoFixable:{...de,rules:fe},recommended:{rules:pe}},he={files:[f],plugins:{n:k}},ge={"n/no-exports-assign":`error`,"n/no-new-require":`error`,"n/no-path-concat":`error`,"n/prefer-global/buffer":[`error`,`never`],"n/prefer-global/process":[`error`,`never`]},_e={autoFixable:{...he},recommended:{rules:ge}},ve={autoFixable:{plugins:{perfectionist:A},rules:{"perfectionist/sort-array-includes":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-classes":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-decorators":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-enums":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-export-attributes":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-exports":[`error`,{customGroups:[{elementNamePattern:`/lib/`,groupName:`lib`},{elementNamePattern:`/model/`,groupName:`model`},{elementNamePattern:`/ui/`,groupName:`ui`}],groups:[`lib`,`model`,`ui`],type:`natural`}],"perfectionist/sort-heritage-clauses":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-import-attributes":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-imports":[`error`,{customGroups:[{elementNamePattern:`/shared/`,groupName:`shared`},{elementNamePattern:`/entities/`,groupName:`entities`},{elementNamePattern:`/features/`,groupName:`features`},{elementNamePattern:`/widgets/`,groupName:`widgets`},{elementNamePattern:`/pages/`,groupName:`pages`}],groups:[`shared`,`entities`,`features`,`widgets`,`pages`,`type-import`,[`value-builtin`,`value-external`],`type-internal`,`value-internal`,[`type-parent`,`type-sibling`,`type-index`],[`value-parent`,`value-sibling`,`value-index`],`ts-equals-import`,`unknown`],type:`natural`}],"perfectionist/sort-interfaces":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-intersection-types":[`error`,{groups:[`conditional`,`function`,`import`,`intersection`,`keyword`,`literal`,`named`,`object`,`operator`,`tuple`,`union`,`nullish`]}],"perfectionist/sort-jsx-props":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-maps":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-modules":[`error`,{type:`unsorted`}],"perfectionist/sort-named-exports":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-named-imports":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-object-types":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-objects":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-sets":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-switch-case":[`error`,{order:`asc`,type:`natural`}],"perfectionist/sort-union-types":[`error`,{groups:[`conditional`,`function`,`import`,`intersection`,`keyword`,`literal`,`named`,`object`,`operator`,`tuple`,`union`,`nullish`]}],"perfectionist/sort-variable-declarations":[`error`,{order:`asc`,type:`natural`}]}},recommended:{}},ye={autoFixable:{name:`productive`,plugins:{productive:{rules:{"no-abusive-nested-if":M.RuleCreator.withoutDocs({create:e=>({IfStatement:t=>{let{options:[n]}=e;if(n<2)throw Error(`Depth should be 2 or above`);let r=0,{parent:i}=t;for(;i.type===j.BlockStatement&&i.parent.type===j.IfStatement&&r!==n-1;)r+=1,i=i.parent;r===n-1&&e.report({data:{depth:n},messageId:`tooManyNestedIfStatements`,node:t})}}),defaultOptions:[3],meta:{docs:{description:`Prevent excessive use of nested if statements`},messages:{tooManyNestedIfStatements:`Too many nested if statements, maximum allowed is {{ depth }}`},schema:{description:`Allowed number of nested if statements`,items:{type:`integer`},type:`array`},type:`problem`}}),"no-else":M.RuleCreator.withoutDocs({create:e=>({IfStatement:t=>{t.alternate&&e.report({messageId:`noElse`,node:t.alternate})}}),defaultOptions:[],meta:{docs:{description:`Prevent use of else statements`},messages:{noElse:`else/elseIf statements make code harder to read and are better replaced with an early return or omitting the else block entirely`},schema:[],type:`problem`}}),"prefer-const-enum":M.RuleCreator.withoutDocs({create:e=>({TSEnumDeclaration:t=>{t.const||e.report({messageId:`preferConstEnum`,node:t})}}),defaultOptions:[],meta:{docs:{description:`Prefer const enums over regular ones`},messages:{preferConstEnum:`Regular enums are compiled into functions, which is a redundant runtime overhead. Use const enums, as they are ignored during compilation, and their member accesses are compiled into plain strings`},schema:[],type:`problem`}})}}}},recommended:{}},be={name:`promise`,plugins:{promise:N}},xe={"promise/no-new-statics":`error`},Se={"promise/no-return-wrap":`error`,"promise/param-names":`error`,"promise/valid-params":`error`},Ce={autoFixable:{...be,rules:xe},recommended:{rules:Se}},we={plugins:{regexp:P}},Te={"no-empty-character-class":`off`,"no-invalid-regexp":`off`,"no-regex-spaces":`error`,"no-useless-backreference":`off`,"regexp/control-character-escape":`error`,"regexp/match-any":`error`,"regexp/negation":`error`,"regexp/no-extra-lookaround-assertions":`error`,"regexp/no-invisible-character":`error`,"regexp/no-misleading-unicode-character":`error`,"regexp/no-missing-g-flag":`error`,"regexp/no-trivially-nested-assertion":`error`,"regexp/no-trivially-nested-quantifier":`error`,"regexp/no-useless-character-class":`error`,"regexp/no-useless-escape":`error`,"regexp/no-useless-flag":`error`,"regexp/no-useless-lazy":`error`,"regexp/no-useless-non-capturing-group":`error`,"regexp/no-useless-quantifier":`error`,"regexp/no-useless-range":`error`,"regexp/no-useless-set-operand":`error`,"regexp/no-useless-string-literal":`error`,"regexp/no-useless-two-nums-quantifier":`error`,"regexp/optimal-quantifier-concatenation":`error`,"regexp/prefer-character-class":`error`,"regexp/prefer-d":`error`,"regexp/prefer-plus-quantifier":`error`,"regexp/prefer-predefined-assertion":`error`,"regexp/prefer-question-quantifier":`error`,"regexp/prefer-range":`error`,"regexp/prefer-regexp-test":`error`,"regexp/prefer-set-operation":`error`,"regexp/prefer-star-quantifier":`error`,"regexp/prefer-unicode-codepoint-escapes":`error`,"regexp/prefer-w":`error`,"regexp/simplify-set-operations":`error`,"regexp/sort-flags":`error`,"regexp/strict":`error`,"regexp/use-ignore-case":`error`},Ee={"prefer-regex-literals":`error`,"regexp/no-dupe-characters-character-class":`error`,"regexp/no-empty-character-class":`error`,"regexp/no-empty-group":`error`,"regexp/no-empty-lookarounds-assertion":`error`,"regexp/no-empty-string-literal":`error`,"regexp/no-escape-backspace":`error`,"regexp/no-invalid-regexp":`error`,"regexp/no-non-standard-flag":`error`,"regexp/no-obscure-range":`error`,"regexp/no-useless-backreference":`error`,"regexp/no-useless-dollar-replacements":`error`,"regexp/no-zero-quantifier":`error`},De={autoFixable:{...we,rules:Te},recommended:{rules:Ee}},Oe={files:[f],name:`rxjs`,plugins:{rxjs:_}},ke={"rxjs/no-implicit-any-catch":`error`,"rxjs/no-internal":`error`,"rxjs/prefer-observer":`error`},Ae={"rxjs/no-compat":`error`,"rxjs/no-create":`error`,"rxjs/no-index":`error`},je={autoFixable:{...Oe,rules:ke},recommended:{rules:Ae}},Me={name:`sonarjs`,plugins:{sonarjs:F}},Ne={"sonarjs/prefer-immediate-return":`error`},Pe={"sonarjs/no-redundant-boolean":`error`,"sonarjs/no-redundant-jump":`error`,"sonarjs/non-existent-operator":`error`,"sonarjs/public-static-readonly":`error`},Fe={autoFixable:{...Me,rules:Ne},recommended:{rules:Pe}},Ie={files:[r],languageOptions:{parser:{meta:L,parseForESLint:R}},name:`toml`,plugins:{toml:I}},Le={"toml/array-bracket-newline":`error`,"toml/array-bracket-spacing":`error`,"toml/array-element-newline":`error`,"toml/comma-style":`error`,"toml/indent":[`error`,2],"toml/inline-table-curly-spacing":`error`,"toml/key-spacing":`error`,"toml/keys-order":`error`,"toml/no-space-dots":`error`,"toml/padding-line-between-pairs":`error`,"toml/padding-line-between-tables":`error`,"toml/quoted-keys":`error`,"toml/table-bracket-spacing":`error`,"toml/tables-order":`error`},Re={"toml/no-unreadable-number-separator":`error`,"toml/precision-of-fractional-seconds":`error`,"toml/precision-of-integer":`error`,"toml/vue-custom-block/no-parsing-error":`error`},ze={autoFixable:{...Ie,rules:Le},recommended:{rules:Re}},Be={plugins:{"@typescript-eslint":m}},Ve={"@typescript-eslint/array-type":`error`,"@typescript-eslint/consistent-generic-constructors":`error`,"@typescript-eslint/consistent-indexed-object-style":`error`,"@typescript-eslint/consistent-type-assertions":`error`,"@typescript-eslint/consistent-type-imports":[`error`,{disallowTypeAnnotations:!1,fixStyle:`separate-type-imports`,prefer:`type-imports`}],"@typescript-eslint/dot-notation":[`error`,{allowIndexSignaturePropertyAccess:!0}],"@typescript-eslint/method-signature-style":[`error`,`property`],"@typescript-eslint/no-array-constructor":`error`,"@typescript-eslint/no-duplicate-type-constituents":`error`,"@typescript-eslint/no-extra-non-null-assertion":`error`,"@typescript-eslint/no-import-type-side-effects":`error`,"@typescript-eslint/no-inferrable-types":`error`,"@typescript-eslint/no-meaningless-void-operator":`error`,"@typescript-eslint/no-unnecessary-qualifier":`error`,"@typescript-eslint/no-unnecessary-template-expression":`error`,"@typescript-eslint/no-unnecessary-type-arguments":`error`,"@typescript-eslint/no-unnecessary-type-assertion":`error`,"@typescript-eslint/no-unused-vars":`off`,"@typescript-eslint/no-useless-empty-export":`error`,"@typescript-eslint/no-wrapper-object-types":`error`,"@typescript-eslint/prefer-as-const":`error`,"@typescript-eslint/prefer-function-type":`error`,"@typescript-eslint/prefer-namespace-keyword":`error`,"constructor-super":`off`,"getter-return":`off`,"no-array-constructor":`off`,"no-class-assign":`off`,"no-const-assign":`off`,"no-dupe-args":`off`,"no-dupe-class-members":`off`,"no-dupe-keys":`off`,"no-func-assign":`off`,"no-import-assign":`off`,"no-new-native-nonconstructor":`off`,"no-new-symbol":`off`,"no-obj-calls":`off`,"no-redeclare":`off`,"no-setter-return":`off`,"no-this-before-super":`off`,"no-undef":`off`,"no-unreachable":`off`,"no-unsafe-negation":`off`,"no-unused-expressions":`off`,"no-unused-vars":`off`,"no-use-before-define":`off`,"no-useless-constructor":`off`,"no-with":`off`,"unused-imports/no-unused-vars":`off`},$={"@typescript-eslint/class-literal-property-style":`error`,"@typescript-eslint/consistent-type-definitions":[`error`,`interface`],"@typescript-eslint/default-param-last":`error`,"@typescript-eslint/explicit-member-accessibility":[`error`,{overrides:{constructors:`no-public`}}],"@typescript-eslint/naming-convention":[`error`,{format:null,selector:[`objectLiteralProperty`]},{format:null,selector:`import`},{format:[`StrictPascalCase`],selector:[`enum`,`class`]},{format:[`UPPER_CASE`],selector:[`enumMember`]},{format:[`StrictPascalCase`],prefix:[`I`],selector:[`interface`]},{format:[`StrictPascalCase`],prefix:[`T`],selector:[`typeAlias`]},{format:[`StrictPascalCase`],selector:[`typeParameter`]},{format:[`strictCamelCase`,`UPPER_CASE`],modifiers:[`const`],selector:`variable`},{format:[`camelCase`],leadingUnderscore:`allow`,modifiers:[`unused`],selector:`parameter`}],"@typescript-eslint/no-dupe-class-members":`error`,"@typescript-eslint/no-duplicate-enum-values":`error`,"@typescript-eslint/no-dynamic-delete":`error`,"@typescript-eslint/no-empty-object-type":[`error`,{allowInterfaces:`always`}],"@typescript-eslint/no-misused-new":`error`,"@typescript-eslint/no-namespace":`error`,"@typescript-eslint/no-non-null-asserted-nullish-coalescing":`error`,"@typescript-eslint/no-non-null-asserted-optional-chain":`error`,"@typescript-eslint/no-redeclare":[`error`,{builtinGlobals:!1}],"@typescript-eslint/no-redundant-type-constituents":`error`,"@typescript-eslint/no-require-imports":`error`,"@typescript-eslint/no-this-alias":`error`,"@typescript-eslint/no-unnecessary-type-constraint":`error`,"@typescript-eslint/no-unnecessary-type-conversion":`error`,"@typescript-eslint/no-unsafe-declaration-merging":`error`,"@typescript-eslint/no-unsafe-function-type":`error`,"@typescript-eslint/no-useless-constructor":`error`,"@typescript-eslint/only-throw-error":`error`,"@typescript-eslint/related-getter-setter-pairs":`error`,"@typescript-eslint/require-array-sort-compare":[`error`,{ignoreStringArrays:!1}],"@typescript-eslint/unified-signatures":`error`},He={autoFixable:{...Be,rules:Ve},recommended:{rules:$}},Ue={plugins:{unicorn:z}},We={"unicorn/consistent-empty-array-spread":`error`,"unicorn/escape-case":`error`,"unicorn/new-for-builtins":`error`,"unicorn/no-instanceof-builtins":`error`,"unicorn/no-new-array":`error`,"unicorn/no-new-buffer":`error`,"unicorn/no-unnecessary-array-flat-depth":`error`,"unicorn/no-unnecessary-array-splice-count":`error`,"unicorn/no-unnecessary-await":`error`,"unicorn/no-unnecessary-slice-end":`error`,"unicorn/no-useless-fallback-in-spread":`error`,"unicorn/no-useless-length-check":`error`,"unicorn/no-useless-promise-resolve-reject":`error`,"unicorn/no-useless-spread":`error`,"unicorn/no-zero-fractions":`error`,"unicorn/numeric-separators-style":`error`,"unicorn/prefer-array-find":`error`,"unicorn/prefer-array-flat":`error`,"unicorn/prefer-array-flat-map":`error`,"unicorn/prefer-array-index-of":`error`,"unicorn/prefer-at":`error`,"unicorn/prefer-date-now":`error`,"unicorn/prefer-dom-node-append":`error`,"unicorn/prefer-dom-node-dataset":`error`,"unicorn/prefer-dom-node-remove":`error`,"unicorn/prefer-export-from":`error`,"unicorn/prefer-global-this":`error`,"unicorn/prefer-import-meta-properties":`error`,"unicorn/prefer-includes":`error`,"unicorn/prefer-keyboard-event-key":`error`,"unicorn/prefer-math-min-max":`error`,"unicorn/prefer-modern-dom-apis":`error`,"unicorn/prefer-modern-math-apis":`error`,"unicorn/prefer-native-coercion-functions":`error`,"unicorn/prefer-negative-index":`error`,"unicorn/prefer-node-protocol":`error`,"unicorn/prefer-object-from-entries":`error`,"unicorn/prefer-optional-catch-binding":`error`,"unicorn/prefer-prototype-methods":`error`,"unicorn/prefer-reflect-apply":`error`,"unicorn/prefer-regexp-test":`error`,"unicorn/prefer-set-size":`error`,"unicorn/prefer-string-raw":`error`,"unicorn/prefer-string-replace-all":`error`,"unicorn/prefer-string-starts-ends-with":`error`,"unicorn/prefer-string-trim-start-end":`error`,"unicorn/prefer-switch":`error`,"unicorn/prefer-ternary":`error`,"unicorn/prefer-type-error":`error`,"unicorn/require-array-join-separator":`error`,"unicorn/switch-case-braces":`error`,"unicorn/throw-new-error":`error`},Ge={"unicorn/no-useless-undefined":`error`,"unicorn/prefer-array-some":`error`,"unicorn/prefer-set-has":`error`,"unicorn/prefer-spread":`error`,"unicorn/prefer-string-slice":`error`},Ke={autoFixable:{...Ue,rules:We},recommended:{rules:Ge}},qe={autoFixable:{rules:{"vue/attribute-hyphenation":[`error`,`never`],"vue/attributes-order":[`error`,{alphabetical:!0}],"vue/block-order":[`error`,{order:[`script`,`template`,`style`]}],"vue/component-name-in-template-casing":[`error`,`PascalCase`],"vue/component-options-name-casing":[`error`,`PascalCase`],"vue/dot-location":[`error`,`property`],"vue/html-self-closing":[`error`,{html:{void:`always`}}],"vue/max-attributes-per-line":`off`,"vue/multi-word-component-names":`off`,"vue/no-deprecated-data-object-declaration":`error`,"vue/no-deprecated-destroyed-lifecycle":`error`,"vue/no-deprecated-dollar-scopedslots-api":`error`,"vue/no-deprecated-scope-attribute":`error`,"vue/no-deprecated-slot-attribute":`error`,"vue/no-deprecated-slot-scope-attribute":`error`,"vue/no-deprecated-v-bind-sync":`error`,"vue/no-deprecated-v-on-number-modifiers":`error`,"vue/no-empty-component-block":`error`,"vue/no-implicit-coercion":`error`,"vue/no-import-compiler-macros":`error`,"vue/no-ref-as-operand":`error`,"vue/no-setup-props-reactivity-loss":`off`,"vue/no-useless-mustaches":`error`,"vue/no-useless-v-bind":`error`,"vue/no-v-html":`off`,"vue/object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"vue/padding-line-between-blocks":[`error`,`always`],"vue/prefer-import-from-vue":`error`,"vue/prefer-separate-static-class":`error`,"vue/prefer-template":`error`,"vue/require-default-prop":`off`,"vue/require-prop-types":`off`,"vue/space-infix-ops":`error`,"vue/space-unary-ops":[`error`,{nonwords:!1,words:!0}],"vue/this-in-template":`error`,"vue/v-bind-style":[`error`,`shorthand`,{sameNameShorthand:`always`}],"vue/v-for-delimiter-style":[`error`,`of`],"vue/v-if-else-key":`error`,"vue/v-on-event-hyphenation":[`error`,`never`,{autofix:!0}],"vue/v-on-style":`error`,"vue/v-slot-style":[`error`,{atComponent:`v-slot`,default:`v-slot`,named:`longform`}],"vue/valid-next-tick":`error`}},recommended:{rules:{"vue/block-lang":[`error`,{script:{lang:`ts`}}],"vue/comment-directive":[`error`,{reportUnusedDisableDirectives:!0}],"vue/define-macros-order":[`error`,{defineExposeLast:!0,order:[`defineOptions`,`defineModel`,`defineProps`,`defineEmits`,`defineSlots`]}],"vue/define-props-declaration":`error`,"vue/define-props-destructuring":`error`,"vue/html-comment-content-spacing":[`error`,`always`,{exceptions:[`-`]}],"vue/jsx-uses-vars":`error`,"vue/no-deprecated-delete-set":`error`,"vue/no-deprecated-dollar-listeners-api":`error`,"vue/no-deprecated-events-api":`error`,"vue/no-deprecated-filter":`error`,"vue/no-deprecated-functional-template":`error`,"vue/no-deprecated-html-element-is":`error`,"vue/no-deprecated-inline-template":`error`,"vue/no-deprecated-model-definition":`error`,"vue/no-deprecated-props-default-this":`error`,"vue/no-deprecated-router-link-tag-prop":`error`,"vue/no-deprecated-v-is":`error`,"vue/no-deprecated-v-on-native-modifier":`error`,"vue/no-deprecated-vue-config-keycodes":`error`,"vue/no-dupe-keys":`error`,"vue/no-dupe-v-else-if":`error`,"vue/no-duplicate-attributes":`error`,"vue/no-empty-pattern":`error`,"vue/no-export-in-script-setup":`error`,"vue/no-irregular-whitespace":`error`,"vue/no-lone-template":`error`,"vue/no-loss-of-precision":`error`,"vue/no-multiple-objects-in-class":`error`,"vue/no-multiple-slot-args":`error`,"vue/no-parsing-error":`error`,"vue/no-reserved-component-names":`error`,"vue/no-reserved-keys":`error`,"vue/no-reserved-props":`error`,"vue/no-restricted-v-bind":[`error`,`/^v-/`],"vue/no-template-key":`error`,"vue/no-textarea-mustache":`error`,"vue/no-useless-template-attributes":`error`,"vue/no-v-for-template-key-on-child":`error`,"vue/prefer-true-attribute-shorthand":`error`,"vue/require-component-is":`error`,"vue/require-macro-variable-name":`error`,"vue/require-render-return":`error`,"vue/require-slots-as-functions":`error`,"vue/require-toggle-inside-transition":`error`,"vue/return-in-computed-property":`error`,"vue/return-in-emits-validator":`error`,"vue/valid-attribute-name":`error`,"vue/valid-define-emits":`error`,"vue/valid-define-options":`error`,"vue/valid-define-props":`error`,"vue/valid-template-root":`error`,"vue/valid-v-bind":`error`,"vue/valid-v-cloak":`error`,"vue/valid-v-else":`error`,"vue/valid-v-else-if":`error`,"vue/valid-v-for":`error`,"vue/valid-v-html":`error`,"vue/valid-v-if":`error`,"vue/valid-v-is":`error`,"vue/valid-v-memo":`error`,"vue/valid-v-model":`error`,"vue/valid-v-on":`error`,"vue/valid-v-once":`error`,"vue/valid-v-pre":`error`,"vue/valid-v-show":`error`,"vue/valid-v-slot":`error`,"vue/valid-v-text":`error`}}},Je={files:[i],languageOptions:{parser:{meta:V,parseForESLint:H}},name:`yaml`,plugins:{yml:B}},Ye={"yml/block-mapping":`error`,"yml/block-mapping-colon-indicator-newline":`error`,"yml/block-mapping-question-indicator-newline":`error`,"yml/block-sequence":`error`,"yml/block-sequence-hyphen-indicator-newline":`error`,"yml/flow-mapping-curly-newline":`error`,"yml/flow-mapping-curly-spacing":`error`,"yml/flow-sequence-bracket-newline":`error`,"yml/flow-sequence-bracket-spacing":`error`,"yml/indent":[`error`,2],"yml/key-spacing":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`},Xe={"yml/no-empty-key":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`},Ze={autoFixable:{...Je,rules:Ye},recommended:{rules:Xe}},Qe=e=>[{files:[f,a],languageOptions:{globals:{computed:`readonly`,defineEmits:`readonly`,defineExpose:`readonly`,defineProps:`readonly`,onMounted:`readonly`,onUnmounted:`readonly`,reactive:`readonly`,ref:`readonly`,shallowReactive:`readonly`,shallowRef:`readonly`,toRef:`readonly`,toRefs:`readonly`,watch:`readonly`,watchEffect:`readonly`}},name:`vue/setup`,plugins:{vue:b}},{files:[a],languageOptions:{parser:C,parserOptions:{ecmaFeatures:{jsx:!0},extraFileExtensions:[`.vue`],parser:h,sourceType:`module`}},name:`vue/rules`,processor:b.processors[`.vue`],rules:G(qe,e).rules??{}}],$e=({ignores:n=[],preset:c=`recommended`,rxjs:m,vue:g}={})=>{let _=g??(S(`vue`)||S(`nuxt`)),b=m??S(`rxjs`),C=_?[f,a]:[f];return p(new v([{ignores:[...l,...n],name:`ignores`},{files:C,languageOptions:{ecmaVersion:`latest`,globals:{...x.browser,...x.es2025,...x.node},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:`latest`,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},name:`base/setup`},{files:C,name:`base/rules`,...G(ue,c)},{files:C,name:`eslint-comments/rules`,...G(ne,c)},{files:C,name:`node/rules`,...G(_e,c)},{files:C,name:`perfectionist/rules`,...G(ve,c)},{files:C,name:`unicorn/rules`,...G(Ke,c)},{files:[s],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:`tsx/setup`},{files:[u,s],languageOptions:{parser:h,parserOptions:{extraFileExtensions:[`.vue`],projectService:!0,sourceType:`module`}},name:`typescript/parser`},{files:[u,s],name:`typescript/rules`,...G(He,c)},{files:C,name:`regexp/rules`,...G(De,c)},..._?Qe(c):[],{files:C,name:`imports`,...G(oe,c)},{files:[e],language:`css/css`,name:`css`,...G(Y,c)},{files:C,name:`boundaries`,...G(K,c)},{files:[f,a,e,d,t,o,i,r],name:`prettier`,plugins:{prettier:y},rules:{"prettier/prettier":`error`}},{files:C,name:`promise`,...G(Ce,c)},{files:C,name:`sonarjs`,...G(Fe,c)},{files:C,name:`productive`,...G(ye,c)},G(me,c),G(Ze,c),G(ze,c),X,...b?[G(je,c)]:[]].flat()))};export{U as Preset,$e as createConfig};