productive-eslint 3.3.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +35 -0
- package/README.md +94 -17
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6 -0
- package/dist/index.config.d.ts +14 -20
- package/dist/index.config.js +1 -1
- package/dist/model-DGP73Lve.js +1 -0
- package/docs/README.md +45 -0
- package/docs/analyzer-runtime.md +105 -0
- package/docs/cli-diagnostics.md +106 -0
- package/docs/configuration.md +79 -0
- package/package.json +36 -31
- package/FIXES.md +0 -1039
package/dist/index.config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@typescript-eslint/parser";import{FlatConfigComposer as t}from"eslint-flat-config-utils";import n from"eslint-plugin-prettier";import r from"eslint-plugin-vue";import i from"globals";import{isPackageExists as a}from"local-pkg";import o from"vue-eslint-parser";import s from"eslint-plugin-boundaries";import c from"@eslint/css";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"eslint-plugin-import";import d from"eslint-plugin-prefer-arrow-functions";import f from"eslint-plugin-unused-imports";import p from"eslint-plugin-jsdoc";import ee from"eslint-plugin-jsonc";import m from"jsonc-eslint-parser";import h from"eslint-plugin-n";import g from"eslint-plugin-perfectionist";import{AST_NODE_TYPES as _,ESLintUtils as v}from"@typescript-eslint/utils";import y from"eslint-plugin-promise";import b from"eslint-plugin-regexp";import x from"@smarttools/eslint-plugin-rxjs";import S from"eslint-plugin-sonarjs";import C from"eslint-plugin-toml";import w from"toml-eslint-parser";import T from"@typescript-eslint/eslint-plugin";import E from"eslint-plugin-unicorn";import D from"eslint-plugin-yml";import te from"yaml-eslint-parser";let O=function(e){return e.AUTO_FIXABLE=`autoFixable`,e.EASY=`easy`,e.HARD=`hard`,e.MEDIUM=`medium`,e}({});const k=[O.AUTO_FIXABLE,O.EASY,O.MEDIUM,O.HARD],A=e=>{let t=k.indexOf(e);return t===-1?0:t},j=(e,t)=>{let n=A(t),r=k.filter(e=>A(e)<=n),[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},M={name:`boundaries`,plugins:{boundaries:s},settings:{"boundaries/elements":[{pattern:`app`,type:`app`},{capture:[`page`],pattern:`pages/*`,type:`pages`},{capture:[`widget`],pattern:`widgets/*`,type:`widgets`},{capture:[`feature`],pattern:`features/*`,type:`features`},{capture:[`entity`],pattern:`entities/*`,type:`entities`},{capture:[`segment`],pattern:`shared/*`,type:`shared`}],"boundaries/include":[`src/**/*`],"import/resolver":{typescript:{alwaysTryTypes:!0}}}},N={},P={},F={"boundaries/element-types":[`error`,{default:`allow`,message:"${file.type} is not allowed to import (${dependency.type})",rules:[{disallow:[`app`,`pages`,`widgets`,`features`,`entities`],from:[`shared`],message:"Shared module must not import upper layers (${dependency.type})"},{disallow:[`app`,`pages`,`widgets`,`features`],from:[`entities`],message:"Entity must not import upper layers (${dependency.type})"},{disallow:[[`entities`,{entity:"!${entity}"}]],from:[`entities`],message:`Entity must not import other entity`},{disallow:[`app`,`pages`,`widgets`],from:[`features`],message:"Feature must not import upper layers (${dependency.type})"},{disallow:[[`features`,{feature:"!${feature}"}]],from:[`features`],message:`Feature must not import other feature`},{disallow:[`app`,`pages`],from:[`widgets`],message:"Feature must not import upper layers (${dependency.type})"},{disallow:[[`widgets`,{widget:"!${widget}"}]],from:[`widgets`],message:`Widget must not import other widget`},{disallow:[`app`],from:[`pages`],message:"Page must not import upper layers (${dependency.type})"},{disallow:[[`pages`,{page:"!${page}"}]],from:[`pages`],message:`Page must not import other page`}]}],"boundaries/entry-point":[`error`,{default:`disallow`,rules:[{allow:`**`,target:[`shared`]},{allow:`index.{ts,vue}`,target:[`app`,`pages`,`widgets`,`features`,`entities`]}]}]},I={[O.AUTO_FIXABLE]:{...M},[O.EASY]:{rules:N},[O.HARD]:{rules:F},[O.MEDIUM]:{rules:P}},L={plugins:{css:c}},R={"css/font-family-fallbacks":`error`,"css/no-duplicate-imports":`error`,"css/no-duplicate-keyframe-selectors":`error`,"css/no-empty-blocks":`error`,"css/no-important":`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`,"css/no-unmatchable-selectors":`error`,"css/use-baseline":`error`},z={[O.AUTO_FIXABLE]:{...L},[O.EASY]:{},[O.HARD]:{},[O.MEDIUM]:{rules:R}},B=`?([cm])[jt]s?(x)`,V=`**/*.${B}`,H=`**/*.?([cm])ts?(x)`,U=`**/*.?([cm])tsx`,W=`**/*.vue`,G=`**/*.json`,K=`**/*.json5`,q=`**/*.jsonc`,J=`**/*.y?(a)ml`,Y=`**/*.toml`,X=`**/*.css`;`${B}`,`${B}`,`${B}`,`${B}`,`${B}`;const Z=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/output,**/coverage,**/temp,**/tmp,**/.temp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.svelte-kit,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts,**/*.d.ts`.split(`,`),Q=[{files:[`**/scripts/${V}`],name:`disables/scripts`,rules:{"@typescript-eslint/explicit-function-return-type":`off`,"no-console":`off`}},{files:[`**/cli/${V}`,`**/cli.${B}`],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:[`**/*.js`,`**/*.cjs`],name:`disables/cjs`,rules:{"@typescript-eslint/no-require-imports":`off`}},{files:[`**/*.config.${B}`,`**/*.config.*.${B}`,`**/*.plugin.${B}`],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`}}],ne={plugins:{"eslint-comments":l}},re={"eslint-comments/no-aggregating-enable":`error`,"eslint-comments/no-duplicate-disable":`error`,"eslint-comments/no-unlimited-disable":`error`,"eslint-comments/no-unused-enable":`error`},ie={[O.AUTO_FIXABLE]:{...ne},[O.EASY]:{rules:re},[O.HARD]:{},[O.MEDIUM]:{}},ae={name:`imports`,plugins:{import:u},settings:{"import/resolver":{typescript:!0}}},oe={"import/first":`error`,"import/newline-after-import":[`error`,{count:1}],"import/no-empty-named-blocks":`error`},se={"import/consistent-type-specifier-style":[`error`,`prefer-top-level`],"import/extensions":[`error`,`ignorePackages`,{js:`never`,jsx:`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`},ce={"import/export":`error`,"import/no-cycle":`error`},le={[O.AUTO_FIXABLE]:{...ae,rules:oe},[O.EASY]:{rules:se},[O.HARD]:{},[O.MEDIUM]:{rules:ce}},ue={plugins:{"prefer-arrow-functions":d,"unused-imports":f}},de={"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`]},fe={"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case":`error`,"default-case-last":`error`,eqeqeq:[`error`,`smart`],"grouped-accessor-pairs":`error`,"id-length":[`error`,{exceptions:[`t`]}],"logical-assignment-operators":[`error`,`always`,{enforceForIfStatements:!0}],"no-alert":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-console":[`error`,{allow:[`warn`,`error`]}],"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":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-function":`error`,"no-empty-pattern":`error`,"no-empty-static-block":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-inner-declarations":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`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":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-undef":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-private-class-members":`error`,"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-use-before-define":[`error`,{classes:!1,functions:!1,variables:!0}],"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-void":[`error`,{allowAsStatement:!0}],"no-with":`error`,"prefer-arrow-functions/prefer-arrow-functions":`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}],"vars-on-top":`error`},pe={"consistent-this":`error`,"for-direction":`error`,"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-bitwise":`error`,"no-constant-binary-expression":`error`,"no-constant-condition":`error`,"no-constructor-return":`error`,"no-implicit-coercion":[`error`,{disallowTemplateShorthand:!0}],"no-invalid-this":`error`,"no-param-reassign":[`error`,{ignorePropertyModificationsFor:[`accumulator`,`ctx`,`context`,`req`,`request`,`res`,`response`,`$scope`,`staticContext`,`ref`,`model`],ignorePropertyModificationsForRegex:[`^.*(?:Ref|Model)$`],props:!0}],"no-promise-executor-return":`error`,"no-return-assign":`error`,"no-script-url":`error`,"no-sequences":`error`},me={complexity:[`error`,{max:12}],"max-depth":[`error`,2],"require-atomic-updates":`error`},he={[O.AUTO_FIXABLE]:{...ue,rules:de},[O.EASY]:{rules:fe},[O.HARD]:{rules:me},[O.MEDIUM]:{rules:pe}},ge={files:[`./src/**/*`],plugins:{jsdoc:p}},_e={"jsdoc/require-jsdoc":[`error`,{checkConstructors:!1,contexts:[`TSPropertySignature`,`TSMethodSignature`,`TSTypeAliasDeclaration`,`TSInterfaceDeclaration`,`TSEnumDeclaration`,`MethodDefinition`,`ClassDeclaration`,`ArrowFunctionExpression`,`ObjectExpression`,`PropertyDefinition`],enableFixer:!1,publicOnly:!0}]},ve={[O.AUTO_FIXABLE]:{...ge},[O.EASY]:{rules:_e},[O.HARD]:{},[O.MEDIUM]:{}},ye=[{name:`jsonc/setup`,plugins:{jsonc:ee}},{files:[G,K,q],languageOptions:{parser:m},name:`jsonc/rules`,rules:{"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-bigint-literals":`error`,"jsonc/no-binary-expression":`error`,"jsonc/no-binary-numeric-literals":`error`,"jsonc/no-dupe-keys":`error`,"jsonc/no-escape-sequence-in-identifier":`error`,"jsonc/no-floating-decimal":`error`,"jsonc/no-hexadecimal-numeric-literals":`error`,"jsonc/no-infinity":`error`,"jsonc/no-multi-str":`error`,"jsonc/no-nan":`error`,"jsonc/no-number-props":`error`,"jsonc/no-numeric-separators":`error`,"jsonc/no-octal":`error`,"jsonc/no-octal-escape":`error`,"jsonc/no-octal-numeric-literals":`error`,"jsonc/no-parenthesized":`error`,"jsonc/no-plus-sign":`error`,"jsonc/no-regexp-literals":`error`,"jsonc/no-sparse-arrays":`error`,"jsonc/no-template-literals":`error`,"jsonc/no-undefined-value":`error`,"jsonc/no-unicode-codepoint-escapes":`error`,"jsonc/no-useless-escape":`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`,"jsonc/vue-custom-block/no-parsing-error":`error`}}],be={files:[V],plugins:{n:h}},xe={"n/handle-callback-err":[`error`,`^(err|error)$`],"n/no-deprecated-api":`error`,"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`],"n/process-exit-as-throw":`error`},Se={[O.AUTO_FIXABLE]:{...be},[O.EASY]:{rules:xe},[O.HARD]:{},[O.MEDIUM]:{}},Ce={"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`}]},we={[O.AUTO_FIXABLE]:{plugins:{perfectionist:g},rules:Ce},[O.EASY]:{},[O.HARD]:{},[O.MEDIUM]:{}},Te=v.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===_.BlockStatement&&i.parent.type===_.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`}}),Ee=v.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`}}),De=v.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`}}),Oe={name:`productive`,plugins:{productive:{rules:{"no-abusive-nested-if":Te,"no-else":Ee,"prefer-const-enum":De}}}},ke={},Ae={},je={"productive/no-abusive-nested-if":[`error`,2],"productive/no-else":`error`,"productive/prefer-const-enum":`off`},Me={[O.AUTO_FIXABLE]:{...Oe},[O.EASY]:{rules:ke},[O.HARD]:{rules:je},[O.MEDIUM]:{rules:Ae}},Ne={name:`promise`,plugins:{promise:y}},Pe={"promise/no-new-statics":`error`},Fe={"promise/always-return":`error`,"promise/catch-or-return":`error`,"promise/no-multiple-resolved":`error`,"promise/no-return-in-finally":`error`,"promise/no-return-wrap":`error`,"promise/param-names":`error`,"promise/valid-params":`error`},Ie={"promise/prefer-await-to-then":`error`},Le={"promise/no-nesting":`error`,"promise/no-promise-in-callback":`error`},Re={[O.AUTO_FIXABLE]:{...Ne,rules:Pe},[O.EASY]:{rules:Fe},[O.HARD]:{rules:Le},[O.MEDIUM]:{rules:Ie}},ze={plugins:{regexp:b}},Be={"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`},Ve={"no-control-regex":`error`,"no-misleading-character-class":`error`,"prefer-regex-literals":`error`,"regexp/confusing-quantifier":`error`,"regexp/no-contradiction-with-assertion":`error`,"regexp/no-dupe-characters-character-class":`error`,"regexp/no-dupe-disjunctions":`error`,"regexp/no-empty-alternative":`error`,"regexp/no-empty-capturing-group":`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-lazy-ends":`error`,"regexp/no-legacy-features":`error`,"regexp/no-misleading-capturing-group":`error`,"regexp/no-non-standard-flag":`error`,"regexp/no-obscure-range":`error`,"regexp/no-optional-assertion":`error`,"regexp/no-potentially-useless-backreference":`error`,"regexp/no-super-linear-backtracking":`error`,"regexp/no-unused-capturing-group":`error`,"regexp/no-useless-assertions":`error`,"regexp/no-useless-backreference":`error`,"regexp/no-useless-dollar-replacements":`error`,"regexp/no-zero-quantifier":`error`,"regexp/optimal-lookaround-quantifier":`error`},He={[O.AUTO_FIXABLE]:{...ze,rules:Be},[O.EASY]:{rules:Ve},[O.HARD]:{},[O.MEDIUM]:{}},Ue={files:[`**/*.{ts,tsx,js,jsx,mjs,cjs}`],name:`rxjs`,plugins:{rxjs:x}},We={"rxjs/no-implicit-any-catch":`error`,"rxjs/no-internal":`error`,"rxjs/prefer-observer":`error`},Ge={"rxjs/no-compat":`error`,"rxjs/no-create":`error`,"rxjs/no-ignored-error":`error`,"rxjs/no-ignored-observable":`error`,"rxjs/no-ignored-replay-buffer":`error`,"rxjs/no-ignored-subscribe":`error`,"rxjs/no-ignored-subscription":`error`,"rxjs/no-index":`error`,"rxjs/no-topromise":`error`,"rxjs/no-unbound-methods":`error`},Ke={"rxjs/finnish":`error`,"rxjs/no-async-subscribe":`error`,"rxjs/no-cyclic-action":`error`,"rxjs/no-exposed-subjects":`error`,"rxjs/no-ignored-notifier":`error`,"rxjs/no-ignored-takewhile-value":`error`,"rxjs/no-redundant-notify":`error`,"rxjs/no-subclass":`error`,"rxjs/no-subject-unsubscribe":`error`,"rxjs/no-subject-value":`error`,"rxjs/no-unsafe-catch":`error`,"rxjs/no-unsafe-first":`error`,"rxjs/no-unsafe-subject-next":`error`,"rxjs/no-unsafe-takeuntil":`error`,"rxjs/suffix-subjects":`error`,"rxjs/throw-error":`error`},qe={"rxjs/no-connectable":`error`,"rxjs/no-nested-subscribe":`error`,"rxjs/no-sharereplay":`error`,"rxjs/no-subscribe-handlers":`error`,"rxjs/no-unsafe-switchmap":`error`},Je={[O.AUTO_FIXABLE]:{...Ue,rules:We},[O.EASY]:{rules:Ge},[O.HARD]:{rules:qe},[O.MEDIUM]:{rules:Ke}},Ye={name:`sonarjs`,plugins:{sonarjs:S}},Xe={"sonarjs/prefer-immediate-return":`error`},Ze={"sonarjs/no-fallthrough":`error`,"sonarjs/no-redundant-boolean":`error`,"sonarjs/no-redundant-jump":`error`,"sonarjs/non-existent-operator":`error`,"sonarjs/public-static-readonly":`error`},Qe={"sonarjs/bool-param-default":`error`,"sonarjs/comma-or-logical-or-case":`error`,"sonarjs/future-reserved-words":`error`,"sonarjs/index-of-compare-to-positive-number":`error`,"sonarjs/link-with-target-blank":`error`,"sonarjs/no-array-delete":`error`,"sonarjs/no-duplicate-in-composite":`error`,"sonarjs/no-for-in-iterable":`error`,"sonarjs/no-function-declaration-in-block":`error`,"sonarjs/no-global-this":`error`,"sonarjs/no-globals-shadowing":`error`,"sonarjs/no-identical-conditions":`error`,"sonarjs/no-identical-expressions":`error`,"sonarjs/no-identical-functions":`error`,"sonarjs/no-ignored-return":`error`,"sonarjs/no-in-misuse":`error`,"sonarjs/no-incorrect-string-concat":`error`,"sonarjs/no-internal-api-use":`error`,"sonarjs/no-misleading-array-reverse":`error`,"sonarjs/no-nested-template-literals":`error`,"sonarjs/no-redundant-assignments":`error`,"sonarjs/no-redundant-optional":`error`,"sonarjs/no-selector-parameter":`error`,"sonarjs/no-small-switch":`error`,"sonarjs/no-try-promise":`error`,"sonarjs/no-undefined-assignment":`error`,"sonarjs/no-unthrown-error":`error`,"sonarjs/no-unused-collection":`error`,"sonarjs/no-unused-function-argument":`error`,"sonarjs/no-use-of-empty-return-value":`error`,"sonarjs/no-useless-intersection":`error`,"sonarjs/object-alt-content":`error`,"sonarjs/post-message":`error`,"sonarjs/prefer-promise-shorthand":`error`,"sonarjs/reduce-initial-value":`error`,"sonarjs/strings-comparison":`error`,"sonarjs/table-header":`error`,"sonarjs/table-header-reference":`error`},$e={"sonarjs/expression-complexity":[`error`,{max:2}],"sonarjs/no-all-duplicated-branches":`error`,"sonarjs/no-async-constructor":`error`,"sonarjs/no-invariant-returns":`error`,"sonarjs/no-nested-switch":`error`,"sonarjs/too-many-break-or-continue-in-loop":`error`},et={[O.AUTO_FIXABLE]:{...Ye,rules:Xe},[O.EASY]:{rules:Ze},[O.HARD]:{rules:$e},[O.MEDIUM]:{rules:Qe}},tt=[{name:`toml/setup`,plugins:{toml:C}},{files:[Y],languageOptions:{parser:w},name:`toml/rules`,rules:{"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/no-unreadable-number-separator":`error`,"toml/padding-line-between-pairs":`error`,"toml/padding-line-between-tables":`error`,"toml/precision-of-fractional-seconds":`error`,"toml/precision-of-integer":`error`,"toml/quoted-keys":`error`,"toml/table-bracket-spacing":`error`,"toml/tables-order":`error`,"toml/vue-custom-block/no-parsing-error":`error`}}],nt={plugins:{"@typescript-eslint":T}},rt={"@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`},it={"@typescript-eslint/ban-ts-comment":[`error`,{"ts-expect-error":`allow-with-description`}],"@typescript-eslint/class-literal-property-style":`error`,"@typescript-eslint/consistent-type-definitions":[`error`,`interface`],"@typescript-eslint/default-param-last":`error`,"@typescript-eslint/explicit-function-return-type":[`error`,{allowExpressions:!0}],"@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-base-to-string":`error`,"@typescript-eslint/no-confusing-void-expression":`error`,"@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-explicit-any":`error`,"@typescript-eslint/no-floating-promises":`error`,"@typescript-eslint/no-loop-func":`error`,"@typescript-eslint/no-magic-numbers":[`error`,{enforceConst:!0,ignore:[0,1,100,-1],ignoreClassFieldInitialValues:!0,ignoreDefaultValues:!0,ignoreEnums:!0}],"@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-boolean-literal-compare":`error`,"@typescript-eslint/no-unnecessary-condition":`error`,"@typescript-eslint/no-unnecessary-type-constraint":`error`,"@typescript-eslint/no-unnecessary-type-conversion":`error`,"@typescript-eslint/no-unsafe-argument":`error`,"@typescript-eslint/no-unsafe-assignment":`error`,"@typescript-eslint/no-unsafe-call":`error`,"@typescript-eslint/no-unsafe-declaration-merging":`error`,"@typescript-eslint/no-unsafe-enum-comparison":`error`,"@typescript-eslint/no-unsafe-function-type":`error`,"@typescript-eslint/no-unsafe-member-access":`error`,"@typescript-eslint/no-unsafe-return":`error`,"@typescript-eslint/no-unsafe-unary-minus":`error`,"@typescript-eslint/no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"@typescript-eslint/no-use-before-define":[`error`,{classes:!1,functions:!1,variables:!0}],"@typescript-eslint/no-useless-constructor":`error`,"@typescript-eslint/only-throw-error":`error`,"@typescript-eslint/prefer-destructuring":`error`,"@typescript-eslint/prefer-literal-enum-member":`error`,"@typescript-eslint/prefer-nullish-coalescing":`error`,"@typescript-eslint/prefer-optional-chain":`error`,"@typescript-eslint/related-getter-setter-pairs":`error`,"@typescript-eslint/require-array-sort-compare":[`error`,{ignoreStringArrays:!1}],"@typescript-eslint/require-await":`error`,"@typescript-eslint/return-await":`error`,"@typescript-eslint/switch-exhaustiveness-check":`error`,"@typescript-eslint/triple-slash-reference":`off`,"@typescript-eslint/unbound-method":`error`,"@typescript-eslint/unified-signatures":`error`},at={"@typescript-eslint/class-methods-use-this":`error`,"@typescript-eslint/init-declarations":`error`,"@typescript-eslint/max-params":[`error`,{max:3}],"@typescript-eslint/no-extraneous-class":`error`,"@typescript-eslint/no-invalid-void-type":`error`,"@typescript-eslint/no-misused-promises":`error`,"@typescript-eslint/no-misused-spread":`error`,"@typescript-eslint/no-mixed-enums":`error`,"@typescript-eslint/parameter-properties":`error`,"@typescript-eslint/prefer-enum-initializers":`error`,"@typescript-eslint/prefer-promise-reject-errors":`error`,"@typescript-eslint/prefer-reduce-type-parameter":`error`,"@typescript-eslint/prefer-return-this-type":`error`,"@typescript-eslint/restrict-template-expressions":`error`},ot={"@typescript-eslint/no-non-null-assertion":`error`,"@typescript-eslint/prefer-readonly":`error`},st={[O.AUTO_FIXABLE]:{...nt,rules:rt},[O.EASY]:{rules:it},[O.HARD]:{rules:ot},[O.MEDIUM]:{rules:at}},ct={plugins:{unicorn:E}},lt={"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`},ut={"unicorn/error-message":`error`,"unicorn/no-empty-file":`error`,"unicorn/no-unused-properties":`error`,"unicorn/no-useless-switch-case":`error`,"unicorn/no-useless-undefined":`error`,"unicorn/prefer-add-event-listener":`error`,"unicorn/prefer-array-some":`error`,"unicorn/prefer-blob-reading-methods":`error`,"unicorn/prefer-code-point":`error`,"unicorn/prefer-default-parameters":`error`,"unicorn/prefer-dom-node-text-content":`error`,"unicorn/prefer-event-target":`error`,"unicorn/prefer-json-parse-buffer":`error`,"unicorn/prefer-logical-operator-over-ternary":`error`,"unicorn/prefer-math-trunc":`error`,"unicorn/prefer-number-properties":`error`,"unicorn/prefer-query-selector":`error`,"unicorn/prefer-set-has":`error`,"unicorn/prefer-single-call":`error`,"unicorn/prefer-spread":`error`,"unicorn/prefer-string-slice":`error`,"unicorn/prefer-structured-clone":`error`,"unicorn/prefer-top-level-await":`error`},dt={"unicorn/consistent-date-clone":`error`,"unicorn/consistent-destructuring":`error`,"unicorn/consistent-existence-index-check":`error`,"unicorn/custom-error-definition":`error`,"unicorn/explicit-length-check":`error`,"unicorn/no-abusive-eslint-disable":`error`,"unicorn/no-accessor-recursion":`error`,"unicorn/no-array-callback-reference":`error`,"unicorn/no-array-for-each":`error`,"unicorn/no-for-loop":`error`,"unicorn/no-hex-escape":`error`,"unicorn/no-lonely-if":`error`,"unicorn/no-magic-array-flat-depth":`error`,"unicorn/no-named-default":`error`,"unicorn/no-negated-condition":`error`,"unicorn/no-negation-in-equality-check":`error`,"unicorn/no-nested-ternary":`error`,"unicorn/no-single-promise-in-promise-methods":`error`,"unicorn/no-typeof-undefined":`error`,"unicorn/no-unreadable-array-destructuring":`error`,"unicorn/relative-url-style":`error`,"unicorn/require-number-to-fixed-digits-argument":`error`,"unicorn/require-post-message-target-origin":`error`},ft={"unicorn/no-array-method-this-argument":`error`,"unicorn/no-await-in-promise-methods":`error`,"unicorn/no-document-cookie":`error`,"unicorn/no-invalid-remove-event-listener":`error`,"unicorn/no-object-as-default-parameter":`error`},$={[O.AUTO_FIXABLE]:{...ct,rules:lt},[O.EASY]:{rules:ut},[O.HARD]:{rules:ft},[O.MEDIUM]:{rules:dt}},pt={"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`},mt={"vue/block-lang":[`error`,{script:{lang:`ts`}}],"vue/comment-directive":[`error`,{reportUnusedDisableDirectives:!0}],"vue/component-api-style":[`error`,[`script-setup`]],"vue/custom-event-name-casing":[`error`,`camelCase`],"vue/define-macros-order":[`error`,{defineExposeLast:!0,order:[`defineOptions`,`defineModel`,`defineProps`,`defineEmits`,`defineSlots`]}],"vue/define-props-declaration":`error`,"vue/define-props-destructuring":`error`,"vue/enforce-style-attribute":[`error`,{allow:[`module`]}],"vue/html-comment-content-spacing":[`error`,`always`,{exceptions:[`-`]}],"vue/jsx-uses-vars":`error`,"vue/no-arrow-functions-in-watch":`error`,"vue/no-async-in-computed-properties":`error`,"vue/no-child-content":`error`,"vue/no-computed-properties-in-data":`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-expose-after-await":`error`,"vue/no-irregular-whitespace":`error`,"vue/no-lifecycle-after-await":`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-mutating-props":`error`,"vue/no-parsing-error":`error`,"vue/no-ref-object-reactivity-loss":`error`,"vue/no-required-prop-with-default":`error`,"vue/no-reserved-component-names":`error`,"vue/no-reserved-keys":`error`,"vue/no-reserved-props":`error`,"vue/no-restricted-block":`error`,"vue/no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,{message:`Use ref instead of reactive for code consistency`,selector:`CallExpression[callee.name="reactive"]`}],"vue/no-restricted-v-bind":[`error`,`/^v-/`],"vue/no-side-effects-in-computed-properties":`error`,"vue/no-template-key":`error`,"vue/no-template-shadow":`error`,"vue/no-template-target-blank":`error`,"vue/no-textarea-mustache":`error`,"vue/no-unused-components":`error`,"vue/no-unused-refs":`error`,"vue/no-unused-vars":`error`,"vue/no-use-computed-property-like-method":`error`,"vue/no-use-v-else-with-v-for":`error`,"vue/no-use-v-if-with-v-for":`error`,"vue/no-useless-template-attributes":`error`,"vue/no-v-for-template-key-on-child":`error`,"vue/no-v-text-v-html-on-component":`error`,"vue/no-watch-after-await":`error`,"vue/prefer-true-attribute-shorthand":`error`,"vue/prefer-use-template-ref":`error`,"vue/prop-name-casing":[`error`,`camelCase`],"vue/require-component-is":`error`,"vue/require-explicit-emits":`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/require-typed-ref":`error`,"vue/require-v-for-key":`error`,"vue/return-in-computed-property":`error`,"vue/return-in-emits-validator":`error`,"vue/slot-name-casing":`error`,"vue/use-v-on-exact":`error`,"vue/v-on-handler-style":[`error`,[`method`,`inline-function`],{ignoreIncludesComment:!0}],"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`},ht={"vue/eqeqeq":[`error`,`smart`],"vue/html-button-has-type":`error`,"vue/no-async-in-computed-properties":`error`,"vue/no-child-content":`error`,"vue/no-console":`error`,"vue/no-constant-condition":`error`,"vue/no-duplicate-attr-inheritance":`error`,"vue/no-root-v-if":`error`,"vue/no-sparse-arrays":`error`,"vue/no-static-inline-styles":`error`,"vue/no-v-html":`error`,"vue/no-v-text":`error`,"vue/no-v-text-v-html-on-component":`error`},gt={[O.AUTO_FIXABLE]:{rules:pt},[O.EASY]:{rules:mt},[O.HARD]:{},[O.MEDIUM]:{rules:ht}},_t=[{name:`yaml/setup`,plugins:{yml:D}},{files:[J],languageOptions:{parser:te},name:`yaml/rules`,rules:{"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/no-empty-key":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`,"yml/vue-custom-block/no-parsing-error":`error`}}],vt=t=>[{files:[V,W],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:r}},{files:[W],languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},extraFileExtensions:[`.vue`],parser:e,sourceType:`module`}},name:`vue/rules`,processor:r.processors[`.vue`],rules:j(gt,t).rules??{}}],yt=({ignores:r=[],rxjs:o,strictness:s=O.HARD,vue:c})=>{let l=c??(a(`vue`)||a(`nuxt`)),u=o??a(`rxjs`),d=l?[V,W]:[V];return new t([{ignores:[...Z,...r],name:`ignores`},{files:d,languageOptions:{ecmaVersion:`latest`,globals:{...i.browser,...i.es2025,...i.node},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:`latest`,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},name:`javascript/setup`},{files:d,name:`javascript/rules`,...j(he,s)},{files:d,name:`eslint-comments/rules`,...j(ie,s)},{files:d,name:`node/rules`,...j(Se,s)},{files:d,name:`perfectionist/rules`,...j(we,s)},{files:d,name:`jsdoc/rules`,...j(ve,s)},{files:d,name:`unicorn/rules`,...j($,s)},{files:[`**/*.?([cm])jsx`,U],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},name:`jsx/setup`},{files:[H,U],languageOptions:{parser:e,parserOptions:{extraFileExtensions:[`.vue`],projectService:!0,sourceType:`module`}},name:`typescript/parser`},{files:[H,U],name:`typescript/rules`,...j(st,s)},{files:d,name:`regexp/rules`,...j(He,s)},...l?vt(s):[],{files:d,name:`imports`,...j(le,s)},{files:[X],language:`css/css`,name:`css`,...j(z,s)},{files:d,name:`boundaries`,...j(I,s)},{files:[V,W,X,G,K,q,J,Y],name:`prettier`,plugins:{prettier:n},rules:{"prettier/prettier":`error`}},{files:d,name:`promise`,...j(Re,s)},{files:d,name:`sonarjs`,...j(et,s)},{files:d,name:`productive`,...j(Me,s)},ye,_t,tt,Q,...u?[j(Je,s)]:[]].flat())};export{O as StrictnessPreset,yt as default};
|
|
1
|
+
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*as D from"jsonc-eslint-parser";import O from"eslint-plugin-n";import k from"eslint-plugin-perfectionist";import{AST_NODE_TYPES as A,ESLintUtils as j}from"@typescript-eslint/utils";import M from"eslint-plugin-promise";import N from"eslint-plugin-regexp";import P from"eslint-plugin-sonarjs";import F from"eslint-plugin-toml";import*as I from"toml-eslint-parser";import L from"eslint-plugin-unicorn";import R from"eslint-plugin-yml";import*as z from"yaml-eslint-parser";let B=function(e){return e.AUTO_FIXABLE=`autoFixable`,e.RECOMMENDED=`recommended`,e}({});const V=[`autoFixable`,`recommended`],H=(e,t)=>{let n=V.indexOf(t),r=V.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},U={autoFixable:{...c},recommended:{}},W={plugins:{css:ee}},G={"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`},K={autoFixable:{...W},recommended:{rules:G}},q=[{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`}}],J={plugins:{"eslint-comments":te}},Y={"eslint-comments/no-aggregating-enable":`error`,"eslint-comments/no-duplicate-disable":`error`,"eslint-comments/no-unlimited-disable":`error`,"eslint-comments/no-unused-enable":`error`},X={autoFixable:{...J},recommended:{rules:Y}},Z={name:`imports`,plugins:{import:g},settings:{"import/resolver":{typescript:!0}}},Q={"import/first":`error`,"import/newline-after-import":[`error`,{count:1}],"import/no-empty-named-blocks":`error`},ne={"import/consistent-type-specifier-style":[`error`,`prefer-top-level`],"import/extensions":[`error`,`ignorePackages`,{mts:`never`,ts:`never`,tsx:`never`}],"import/no-duplicates":`error`,"import/no-named-default":`error`,"import/no-self-import":`error`,"import/no-useless-path-segments":`error`},re={autoFixable:{...Z,rules:Q},recommended:{rules:ne}},ie={plugins:{"prefer-arrow-functions":w,"unused-imports":T}},ae={"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`]},oe={"constructor-super":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"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-func-assign":`error`,"no-global-assign":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new-native-nonconstructor":`error`,"no-obj-calls":`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-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-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`,"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}]},se={autoFixable:{...ie,rules:ae},recommended:{rules:oe}},ce={files:[d,t,o],languageOptions:{parser:D},name:`jsonc`,plugins:{jsonc:E}},le={"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`},ue={"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`},de={autoFixable:{...ce,rules:le},recommended:{rules:ue}},fe={files:[f],plugins:{n:O}},pe={"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`]},me={autoFixable:{...fe},recommended:{rules:pe}},he={autoFixable:{plugins:{perfectionist:k},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:{}},ge={autoFixable:{name:`productive`,plugins:{productive:{rules:{"no-abusive-nested-if":j.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===A.BlockStatement&&i.parent.type===A.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":j.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":j.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:{}},_e={name:`promise`,plugins:{promise:M}},ve={"promise/no-new-statics":`error`},ye={"promise/no-return-wrap":`error`,"promise/param-names":`error`,"promise/valid-params":`error`},be={autoFixable:{..._e,rules:ve},recommended:{rules:ye}},xe={plugins:{regexp:N}},Se={"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`},Ce={"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`},we={autoFixable:{...xe,rules:Se},recommended:{rules:Ce}},Te={files:[f],name:`rxjs`,plugins:{rxjs:_}},Ee={"rxjs/no-implicit-any-catch":`error`,"rxjs/no-internal":`error`,"rxjs/prefer-observer":`error`},De={"rxjs/no-compat":`error`,"rxjs/no-create":`error`,"rxjs/no-index":`error`},Oe={autoFixable:{...Te,rules:Ee},recommended:{rules:De}},ke={name:`sonarjs`,plugins:{sonarjs:P}},Ae={"sonarjs/prefer-immediate-return":`error`},je={"sonarjs/no-redundant-boolean":`error`,"sonarjs/no-redundant-jump":`error`,"sonarjs/non-existent-operator":`error`,"sonarjs/public-static-readonly":`error`},Me={autoFixable:{...ke,rules:Ae},recommended:{rules:je}},Ne={files:[r],languageOptions:{parser:I},name:`toml`,plugins:{toml:F}},Pe={"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/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`},Fe={"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`},Ie={autoFixable:{...Ne,rules:Pe},recommended:{rules:Fe}},Le={plugins:{"@typescript-eslint":m}},Re={"@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`},ze={"@typescript-eslint/explicit-member-accessibility":[`error`,{overrides:{constructors:`no-public`}}],"@typescript-eslint/no-dupe-class-members":`error`,"@typescript-eslint/no-misused-new":`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-unnecessary-type-constraint":`error`,"@typescript-eslint/no-useless-constructor":`error`},Be={autoFixable:{...Le,rules:Re},recommended:{rules:ze}},Ve={plugins:{unicorn:L}},$={"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`},He={"unicorn/no-useless-undefined":`error`,"unicorn/prefer-array-some":`error`,"unicorn/prefer-set-has":`error`,"unicorn/prefer-spread":`error`,"unicorn/prefer-string-slice":`error`},Ue={autoFixable:{...Ve,rules:$},recommended:{rules:He}},We={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`}}},Ge={files:[i],languageOptions:{parser:z},name:`yaml`,plugins:{yml:R}},Ke={"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`},qe={"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`},Je={autoFixable:{...Ge,rules:Ke},recommended:{rules:qe}},Ye=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:H(We,e).rules??{}}],Xe=({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`,...H(se,c)},{files:C,name:`eslint-comments/rules`,...H(X,c)},{files:C,name:`node/rules`,...H(me,c)},{files:C,name:`perfectionist/rules`,...H(he,c)},{files:C,name:`unicorn/rules`,...H(Ue,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`,...H(Be,c)},{files:C,name:`regexp/rules`,...H(we,c)},..._?Ye(c):[],{files:C,name:`imports`,...H(re,c)},{files:[e],language:`css/css`,name:`css`,...H(K,c)},{files:C,name:`boundaries`,...H(U,c)},{files:[f,a,e,d,t,o,i,r],name:`prettier`,plugins:{prettier:y},rules:{"prettier/prettier":`error`}},{files:C,name:`promise`,...H(be,c)},{files:C,name:`sonarjs`,...H(Me,c)},{files:C,name:`productive`,...H(ge,c)},H(de,c),H(Je,c),H(Ie,c),q,...b?[H(Oe,c)]:[]].flat()))};export{B as Preset,Xe as createConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"eslint-plugin-boundaries";const t=Symbol.for(`productive-eslint.config`),n=e=>(Object.defineProperty(e,t,{configurable:!1,enumerable:!1,value:!0,writable:!1}),e),r=e=>{if(!e||typeof e!=`object`)return!1;let n=e;return n[t]===!0&&typeof n.append==`function`&&typeof n.override==`function`&&typeof n.toConfigs==`function`},i=`@(ts|tsx|mts)`,a=`**/*.${i}`,o=`**/*.@(ts|mts)`,s=`**/*.tsx`,c=`**/*.vue`,l=`**/*.json`,u=`**/*.json5`,d=`**/*.jsonc`,f=`**/*.y?(a)ml`,p=`**/*.toml`,m=`**/*.css`;`${i}`,`${i}`,`${i}`,`${i}`,`${i}`;const h=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/output,**/coverage,**/temp,**/tmp,**/.temp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.svelte-kit,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts,**/*.d.ts`.split(`,`),g=[{pattern:`app`,type:`app`},{capture:[`page`],pattern:`pages/*`,type:`pages`},{capture:[`widget`],pattern:`widgets/*`,type:`widgets`},{capture:[`feature`],pattern:`features/*`,type:`features`},{capture:[`entity`],pattern:`entities/*`,type:`entities`},{capture:[`segment`],pattern:`shared/*`,type:`shared`}],_=[`pages`,`widgets`,`features`,`entities`,`shared`],v=[`!(index).{ts,tsx,mts,vue}`,`**/!(index).{ts,tsx,mts,vue}`,`**/*/index.{ts,tsx,mts,vue}`],y={"boundaries/elements":[...g],"boundaries/include":[`src/**/*`],"import/resolver":{typescript:{alwaysTryTypes:!0}}},b={name:`boundaries`,plugins:{boundaries:e},settings:y},x=[`error`,{default:`disallow`,rules:[{allow:{to:{type:[`pages`,`widgets`,`features`,`entities`,`shared`]}},from:{type:`app`}},{allow:{to:{type:[`widgets`,`features`,`entities`,`shared`]}},from:{type:`pages`}},{allow:{to:{type:[`features`,`entities`,`shared`]}},from:{type:`widgets`}},{allow:{to:{type:[`entities`,`shared`]}},from:{type:`features`}},{allow:{to:{type:[`shared`]}},from:{type:`entities`}},{allow:{to:{type:[`shared`]}},from:{type:`shared`}},{disallow:{to:{internalPath:[...v]}},message:`private-entry`,to:{type:[..._]}}]}],S=e=>e.replaceAll(`\\`,`/`).replace(/^[./]+/u,``),C=e=>{let t=e.match(/(?:^|\/)(app|pages|widgets|features|entities|shared)(?:\/([^/]+))?/u);if(!t)return null;let[,n,r]=t;return{normalizedPath:e,...n===`app`?{}:{elementName:r},type:n}},w=e=>C(S(e)),T=(e,t)=>e.type===t.type&&e.elementName&&t.elementName&&e.elementName!==t.elementName&&[`entities`,`features`,`pages`,`widgets`].includes(e.type)?`${e.type} -> ${t.type}(other ${e.type.slice(0,-1)})`:`${e.type} -> ${t.type}`;export{r as _,m as a,u as c,i as d,p as f,f as g,c as h,w as i,d as l,s as m,b as n,h as o,o as p,T as r,l as s,x as t,a as u,n as v};
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# productive-eslint Documentation
|
|
2
|
+
|
|
3
|
+
`productive-eslint` has two deliberately separate jobs:
|
|
4
|
+
|
|
5
|
+
- provide a permanent ESLint flat config for mechanical repository-wide linting;
|
|
6
|
+
- provide explicit, on-demand diagnostics for review and audit tasks.
|
|
7
|
+
|
|
8
|
+
The permanent config is intentionally conservative. Rules that need judgment,
|
|
9
|
+
product context, or architecture decisions belong in CLI analyzers instead of
|
|
10
|
+
always-on lint output.
|
|
11
|
+
|
|
12
|
+
## Documentation Map
|
|
13
|
+
|
|
14
|
+
- [Configuration Model](./configuration.md)
|
|
15
|
+
- [CLI Diagnostics](./cli-diagnostics.md)
|
|
16
|
+
- [Analyzer Runtime](./analyzer-runtime.md)
|
|
17
|
+
|
|
18
|
+
## High-Level Model
|
|
19
|
+
|
|
20
|
+
```mermaid
|
|
21
|
+
flowchart TD
|
|
22
|
+
user[Developer or agent] --> choice{Task type}
|
|
23
|
+
|
|
24
|
+
choice -->|Everyday lint/fix| eslint[eslint .]
|
|
25
|
+
choice -->|Explicit review/audit| cli[productive-eslint analyze topic]
|
|
26
|
+
|
|
27
|
+
eslint --> preset[Permanent preset]
|
|
28
|
+
preset --> mechanical[Mechanical findings only]
|
|
29
|
+
|
|
30
|
+
cli --> projectConfig[Target project eslint.config.ts]
|
|
31
|
+
projectConfig --> analyzerOverlay[Focused analyzer overlay]
|
|
32
|
+
analyzerOverlay --> report[Ranked Markdown report]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Design Principles
|
|
36
|
+
|
|
37
|
+
- Permanent lint should stay mechanical and low-noise.
|
|
38
|
+
- Analyzers should be run only when someone explicitly asks for code quality,
|
|
39
|
+
migration, risk, or review diagnostics.
|
|
40
|
+
- Analyzer findings should come from ESLint rules whenever an adequate rule
|
|
41
|
+
surface already exists.
|
|
42
|
+
- Custom analyzer logic should enrich, classify, rank, and summarize findings,
|
|
43
|
+
not create a second independent lint universe.
|
|
44
|
+
- Markdown is the default human- and agent-readable output for the current CLI.
|
|
45
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Analyzer Runtime
|
|
2
|
+
|
|
3
|
+
Analyzers are thin diagnostic layers over the target project's ESLint setup.
|
|
4
|
+
They reuse the project's parser, resolver, plugins, ignores, and framework
|
|
5
|
+
configuration, then append topic-specific rules for the diagnostic run.
|
|
6
|
+
|
|
7
|
+
## Runtime Pipeline
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
flowchart TD
|
|
11
|
+
command[Analyze command] --> parse[Parse topic and options]
|
|
12
|
+
parse --> load[Load target eslint.config.ts]
|
|
13
|
+
load --> validate[Validate productive-eslint marker]
|
|
14
|
+
validate --> topic[Select analyzer]
|
|
15
|
+
topic --> clone[Clone FlatConfigComposer]
|
|
16
|
+
clone --> overlay[Append analyzer overlay]
|
|
17
|
+
overlay --> eslint[Run ESLint]
|
|
18
|
+
eslint --> findings[Map lint messages to findings]
|
|
19
|
+
findings --> score[Score and classify]
|
|
20
|
+
score --> summarize[Summarize by file]
|
|
21
|
+
summarize --> markdown[Render Markdown]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Config Loading
|
|
25
|
+
|
|
26
|
+
The loader temporarily switches `process.cwd()` to the selected `--cwd` while it
|
|
27
|
+
imports the target `eslint.config.ts` or `eslint.config.mts`.
|
|
28
|
+
|
|
29
|
+
This matters for project-local auto-detection. For example, Vue or RxJS support
|
|
30
|
+
should be detected from the target package root, not from the directory where
|
|
31
|
+
the CLI process happened to start.
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
flowchart LR
|
|
35
|
+
cliCwd[CLI process cwd] --> save[Save cwd]
|
|
36
|
+
save --> target[Switch to --cwd]
|
|
37
|
+
target --> importConfig[Import eslint.config.ts]
|
|
38
|
+
importConfig --> restore[Restore previous cwd]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Report Model
|
|
42
|
+
|
|
43
|
+
Every analyzer returns the same structured report shape:
|
|
44
|
+
|
|
45
|
+
- title;
|
|
46
|
+
- scanned file count;
|
|
47
|
+
- finding count;
|
|
48
|
+
- summary lines;
|
|
49
|
+
- ranked file summaries;
|
|
50
|
+
- suggested order;
|
|
51
|
+
- next step.
|
|
52
|
+
|
|
53
|
+
Markdown is rendered from that structured model.
|
|
54
|
+
|
|
55
|
+
```mermaid
|
|
56
|
+
classDiagram
|
|
57
|
+
class AnalyzerReport {
|
|
58
|
+
string title
|
|
59
|
+
number fileCount
|
|
60
|
+
number findingsCount
|
|
61
|
+
string[] summaryLines
|
|
62
|
+
FileSummary[] summaries
|
|
63
|
+
string[] suggestedOrder
|
|
64
|
+
string nextStep
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class FileSummary {
|
|
68
|
+
string file
|
|
69
|
+
number score
|
|
70
|
+
string[] labels
|
|
71
|
+
string[] reasons
|
|
72
|
+
Finding[] findings
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
class Finding {
|
|
76
|
+
string file
|
|
77
|
+
string ruleId
|
|
78
|
+
string severity
|
|
79
|
+
number score
|
|
80
|
+
string[] labels
|
|
81
|
+
string[] reasons
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
AnalyzerReport --> FileSummary
|
|
85
|
+
FileSummary --> Finding
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Analyzer Responsibility
|
|
89
|
+
|
|
90
|
+
Analyzers should:
|
|
91
|
+
|
|
92
|
+
- reuse ESLint as the canonical finding source when possible;
|
|
93
|
+
- add focused rule overlays for the selected topic;
|
|
94
|
+
- use analyzer-local plugin namespaces when a diagnostic rule must run
|
|
95
|
+
independently from the target project's optional plugin setup;
|
|
96
|
+
- classify and score findings;
|
|
97
|
+
- group findings into review-friendly hotspots;
|
|
98
|
+
- keep output advisory rather than punitive.
|
|
99
|
+
|
|
100
|
+
Analyzers should not:
|
|
101
|
+
|
|
102
|
+
- replace the target project's ESLint configuration;
|
|
103
|
+
- run implicitly during normal coding tasks;
|
|
104
|
+
- treat findings as process failures;
|
|
105
|
+
- implement a second parser or resolver model when ESLint already provides one.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# CLI Diagnostics
|
|
2
|
+
|
|
3
|
+
The CLI runs focused diagnostics on top of the target project's real ESLint
|
|
4
|
+
configuration.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
productive-eslint analyze risk --cwd .
|
|
8
|
+
productive-eslint analyze types --cwd .
|
|
9
|
+
productive-eslint analyze architecture --cwd .
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Available Topics
|
|
13
|
+
|
|
14
|
+
| Topic | Purpose |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `types` | weak type boundaries, unsafe values, redundant conditions |
|
|
17
|
+
| `architecture` | boundary direction and private entry violations |
|
|
18
|
+
| `complexity` | risky functions, branch depth, duplicated or misleading control flow |
|
|
19
|
+
| `async` | floating promises, misused promises, suspicious async boundaries |
|
|
20
|
+
| `suppressions` | stale disables, broad disables, TypeScript suppressions |
|
|
21
|
+
| `dead-code` | safe-delete and unused-code candidates |
|
|
22
|
+
| `imports` | import graph, dependency shape, import hygiene hotspots |
|
|
23
|
+
| `api` | public contract and export policy risks |
|
|
24
|
+
| `vue` | Vue component contract, lifecycle, reactivity, and template safety issues |
|
|
25
|
+
| `rxjs` | subscription lifecycle, error handling, and reactive state boundaries |
|
|
26
|
+
| `migrations` | deprecated Node, TypeScript, dependency, Vue, and RxJS API usage |
|
|
27
|
+
| `risk` | aggregate map over universal analyzers |
|
|
28
|
+
|
|
29
|
+
`risk` intentionally runs the universal analyzer set only:
|
|
30
|
+
|
|
31
|
+
- `types`
|
|
32
|
+
- `architecture`
|
|
33
|
+
- `complexity`
|
|
34
|
+
- `async`
|
|
35
|
+
- `suppressions`
|
|
36
|
+
- `dead-code`
|
|
37
|
+
- `imports`
|
|
38
|
+
- `api`
|
|
39
|
+
|
|
40
|
+
Framework-specific analyzers such as `vue`, `rxjs`, and `migrations` remain
|
|
41
|
+
explicit commands.
|
|
42
|
+
|
|
43
|
+
## Signal Coverage
|
|
44
|
+
|
|
45
|
+
The analyzer rulesets are intentionally stronger than the permanent presets.
|
|
46
|
+
They are meant to surface review leads, not enforce a merge gate.
|
|
47
|
+
|
|
48
|
+
Representative signals include:
|
|
49
|
+
|
|
50
|
+
| Topic | Examples |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `types` | unsafe arguments, unsafe enum comparisons, unsafe unary minus, object base stringification, unnecessary conditions |
|
|
53
|
+
| `async` | awaiting non-thenables, async functions without await, missing return-await in error boundaries, invalid Promise API calls |
|
|
54
|
+
| `complexity` | duplicated branches, identical conditions, invariant returns, nested conditionals |
|
|
55
|
+
| `vue` | expose or lifecycle registration after await, ref reactivity loss, untyped refs, required props with defaults |
|
|
56
|
+
| `rxjs` | async subscribe callbacks, missing error handlers, unsafe `takeUntil`, unbounded replay buffers, direct Subject unsubscribe |
|
|
57
|
+
| `migrations` | deprecated TypeScript symbols, deprecated imports, Node deprecated APIs, Vue deprecated APIs, RxJS compatibility APIs |
|
|
58
|
+
|
|
59
|
+
## CLI Flow
|
|
60
|
+
|
|
61
|
+
```mermaid
|
|
62
|
+
sequenceDiagram
|
|
63
|
+
actor User
|
|
64
|
+
participant CLI
|
|
65
|
+
participant Config as eslint.config.ts
|
|
66
|
+
participant Analyzer
|
|
67
|
+
participant ESLint
|
|
68
|
+
participant Report
|
|
69
|
+
|
|
70
|
+
User->>CLI: productive-eslint analyze types --cwd app
|
|
71
|
+
CLI->>Config: load with target cwd
|
|
72
|
+
Config-->>CLI: marked FlatConfigComposer
|
|
73
|
+
CLI->>Analyzer: run selected topic
|
|
74
|
+
Analyzer->>ESLint: append focused rules
|
|
75
|
+
ESLint-->>Analyzer: lint messages
|
|
76
|
+
Analyzer->>Report: classify, score, group
|
|
77
|
+
Report-->>User: Markdown
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Exit Codes
|
|
81
|
+
|
|
82
|
+
Finding issues is not a command failure. Exit code `1` is reserved for runtime
|
|
83
|
+
errors such as:
|
|
84
|
+
|
|
85
|
+
- unknown topic;
|
|
86
|
+
- invalid options;
|
|
87
|
+
- missing `eslint.config.ts` or `eslint.config.mts`;
|
|
88
|
+
- unsupported config shape;
|
|
89
|
+
- analyzer/runtime failures.
|
|
90
|
+
|
|
91
|
+
## File Targeting
|
|
92
|
+
|
|
93
|
+
The target project root is explicit:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
productive-eslint analyze async --cwd services/api
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Additional filters narrow the analyzer run:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
productive-eslint analyze types --cwd . --include "src/**/*.ts" --exclude "**/*.test.ts"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`--top` limits only the number of rendered hotspots. It does not reduce the
|
|
106
|
+
underlying scan.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Configuration Model
|
|
2
|
+
|
|
3
|
+
The public entry point is `createConfig(options)`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { createConfig, Preset } from 'productive-eslint'
|
|
7
|
+
|
|
8
|
+
export default createConfig({
|
|
9
|
+
preset: Preset.RECOMMENDED,
|
|
10
|
+
})
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Presets
|
|
14
|
+
|
|
15
|
+
`Preset.AUTO_FIXABLE` enables rules with reliable ESLint autofix support.
|
|
16
|
+
|
|
17
|
+
`Preset.RECOMMENDED` is the default permanent baseline. It includes
|
|
18
|
+
`AUTO_FIXABLE` and adds mechanical non-autofixable rules that should not require
|
|
19
|
+
human design judgment.
|
|
20
|
+
|
|
21
|
+
```mermaid
|
|
22
|
+
flowchart LR
|
|
23
|
+
auto[Preset.AUTO_FIXABLE] --> recommended[Preset.RECOMMENDED]
|
|
24
|
+
recommended --> baseline[Permanent lint baseline]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Config Composition
|
|
28
|
+
|
|
29
|
+
Each plugin config exports a preset map with two keys:
|
|
30
|
+
|
|
31
|
+
- `autoFixable`
|
|
32
|
+
- `recommended`
|
|
33
|
+
|
|
34
|
+
`mergePresetConfigs(map, preset)` composes these layers in order.
|
|
35
|
+
|
|
36
|
+
```mermaid
|
|
37
|
+
flowchart TD
|
|
38
|
+
factory[createConfig] --> options[Resolve options]
|
|
39
|
+
options --> autoDetect[Detect Vue and RxJS when not explicit]
|
|
40
|
+
autoDetect --> presetMerge[mergePresetConfigs per rule family]
|
|
41
|
+
presetMerge --> composer[FlatConfigComposer]
|
|
42
|
+
composer --> marker[Runtime productive-eslint marker]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The runtime marker is important for the CLI. It lets analyzers verify that the
|
|
46
|
+
target project uses a supported `productive-eslint` composer pipeline rather
|
|
47
|
+
than an arbitrary ESLint config shape.
|
|
48
|
+
|
|
49
|
+
## Vue and RxJS
|
|
50
|
+
|
|
51
|
+
Vue and RxJS support can be enabled explicitly:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
export default createConfig({
|
|
55
|
+
rxjs: true,
|
|
56
|
+
vue: true,
|
|
57
|
+
})
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
If an option is omitted, `productive-eslint` tries to detect the package in the
|
|
61
|
+
current project. In monorepos, explicit options are usually clearer when the
|
|
62
|
+
shared ESLint wrapper is used by many package roots.
|
|
63
|
+
|
|
64
|
+
## Permanent Rules vs Analyzer Rules
|
|
65
|
+
|
|
66
|
+
Permanent rules should be safe to run during ordinary development. Analyzer
|
|
67
|
+
rules are intentionally stronger and more contextual because they are used only
|
|
68
|
+
for explicit review commands.
|
|
69
|
+
|
|
70
|
+
```mermaid
|
|
71
|
+
flowchart TD
|
|
72
|
+
rule[Potential ESLint rule] --> question{Mechanical and local?}
|
|
73
|
+
question -->|Yes| permanent[Permanent preset]
|
|
74
|
+
question -->|No| analyzer[On-demand analyzer]
|
|
75
|
+
|
|
76
|
+
permanent --> lint[eslint .]
|
|
77
|
+
analyzer --> review[productive-eslint analyze topic]
|
|
78
|
+
```
|
|
79
|
+
|