@ziloen/eslint-config 0.1.80 → 0.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +13 -14
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import e from"@stylistic/eslint-plugin";import t from"eslint-plugin-ziloen";import{cwd as n}from"node:process";import r from"typescript-eslint";import i from"@eslint/js";import*as a from"eslint-plugin-regexp";import o from"eslint-plugin-unicorn";import s from"@eslint-react/eslint-plugin";import c from"eslint-plugin-react";import{defineConfig as l}from"eslint/config";import u from"eslint-plugin-vue";function d({project:i,tsconfigRootDir:a=n()}={}){return[{name:`format/general`,plugins:{"@typescript-eslint":r.plugin,ziloen:t,style:e},languageOptions:{parser:r.parser,parserOptions:{project:i||void 0,projectService:i?void 0:!0,tsconfigRootDir:a,sourceType:`module`,extraFileExtensions:[`.vue`]}},rules:{"style/array-bracket-newline":[`warn`,`consistent`],"style/array-bracket-spacing":[`warn`,`never`],"style/array-element-newline":[`warn`,`consistent`],"style/arrow-parens":[`warn`,`always`],"style/arrow-spacing":`warn`,"style/computed-property-spacing":`warn`,"style/comma-style":`warn`,"style/dot-location":[`warn`,`property`],"style/function-call-argument-newline":[`warn`,`consistent`],"style/generator-star-spacing":[`warn`,{before:!1,after:!0,named:`after`,anonymous:`after`,method:`before`}],"style/max-len":[`warn`,{code:120,tabWidth:2,ignoreComments:!0,ignoreTrailingComments:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0,ignoreRegExpLiterals:!0}],"style/new-parens":`off`,"style/newline-per-chained-call":[`warn`,{ignoreChainWithDepth:2}],"style/no-mixed-spaces-and-tabs":`warn`,"style/no-multi-spaces":`warn`,"style/no-multiple-empty-lines":[`warn`,{max:3}],"style/no-trailing-spaces":[`warn`,{ignoreComments:!0}],"no-useless-rename":`warn`,"style/no-whitespace-before-property":`warn`,"style/object-curly-newline":[`warn`,{consistent:!0}],"object-shorthand":[`warn`,`always`,{avoidQuotes:!0}],"prefer-template":`warn`,"style/quote-props":[`warn`,`as-needed`],"style/rest-spread-spacing":[`warn`,`never`],"style/semi-spacing":[`warn`,{before:!1,after:!0}],"style/semi-style":`warn`,"sort-imports":[`off`,{ignoreDeclarationSort:!0}],"style/space-in-parens":`warn`,"style/space-unary-ops":[`warn`,{words:!0,nonwords:!1}],"style/switch-colon-spacing":`warn`,"style/template-curly-spacing":`warn`,"style/yield-star-spacing":[`warn`,`after`],"style/block-spacing":`warn`,"style/brace-style":[`warn`,`1tbs`,{allowSingleLine:!0}],"style/comma-dangle":[`warn`,`only-multiline`],"style/comma-spacing":`warn`,"style/function-call-spacing":`warn`,"style/indent":[`warn`,2,{VariableDeclarator:`first`,SwitchCase:1,outerIIFEBody:1,MemberExpression:1,flatTernaryExpressions:!1,offsetTernaryExpressions:!0,ignoredNodes:[]}],"style/indent-binary-ops":[`warn`,2],"style/key-spacing":[`warn`],"style/keyword-spacing":`warn`,"style/no-extra-parens":[`warn`,`all`,{allowParensAfterCommentPattern:`@type`,ignoreJSX:`all`,conditionalAssign:!1,returnAssign:!1,ternaryOperandBinaryExpressions:!1,nestedBinaryExpressions:!1}],"style/no-extra-semi":[`warn`],"style/object-curly-spacing":[`warn`,`always`],"style/quotes":[`warn`,`single`,{avoidEscape:!0,allowTemplateLiterals:`avoidEscape`}],"style/semi":[`warn`,`never`],"style/space-before-blocks":`warn`,"style/space-before-function-paren":[`warn`,{anonymous:`always`,named:`never`,asyncArrow:`always`}],"style/space-infix-ops":`warn`,"style/member-delimiter-style":[`warn`,{multiline:{delimiter:`none`,requireLast:!1},singleline:{requireLast:!1},multilineDetection:`brackets`}],"@typescript-eslint/no-unnecessary-qualifier":`warn`,"style/type-annotation-spacing":[`warn`],"ziloen/generic-spacing":`warn`}},{name:`format/jsx`,files:[`**/*.jsx`,`**/*.tsx`],plugins:{style:e},rules:{"style/jsx-tag-spacing":[`warn`,{closingSlash:`never`,beforeSelfClosing:`proportional-always`,afterOpening:`never`,beforeClosing:`never`}],"style/jsx-curly-spacing":[`warn`],"style/jsx-indent-props":[`warn`,{indentMode:2}]}}]}const f=[{name:`javascript/ignore`,ignores:[`**/CHANGELOG*.md`,`**/*.min.*`,`**/LICENSE*`,`**/auto-import?(s).d.ts`,`**/package-lock.json`,`**/pnpm-lock.yaml`,`**/yarn.lock`,`**/bun.lockb`,`**/node_modules`,`**/dist`,`**/.nuxt`,`**/.next`,`**/.vercel`,`**/.idea`,`*.html`,`**/test-results`,`**/playwright-report`,`**/blob-report`,`**/playwright/.cache`]},i.configs.recommended,{name:`javascript/overrides`,rules:{"array-callback-return":[`error`,{allowImplicit:!0}],"block-scoped-var":`error`,"constructor-super":`error`,eqeqeq:[`error`,`smart`],"logical-assignment-operators":[`warn`],"max-nested-callbacks":[`warn`,5],"no-await-in-loop":`warn`,"no-async-promise-executor":`off`,"no-caller":`error`,"no-constant-binary-expression":`error`,"no-console":[`off`,{allow:[`warn`,`error`]}],"no-constructor-return":`warn`,"no-empty":`off`,"no-eval":`warn`,"no-extra-semi":`off`,"no-fallthrough":[`error`,{allowEmptyCase:!0}],"no-new-native-nonconstructor":`off`,"no-new-symbol":`off`,"no-promise-executor-return":`off`,"no-restricted-exports":[`off`,{restrictDefaultExports:{direct:!0}}],"no-restricted-globals":[`error`,`event`,`name`,`length`,`status`],"no-return-await":`off`,"no-undef":`off`,"no-unused-expressions":[`warn`,{allowShortCircuit:!0,enforceForJSX:!0}],"no-unused-vars":`off`,"no-var":`error`,"no-warning-comments":[`error`,{terms:[`@debug`],location:`anywhere`}],"prefer-const":[`off`,{destructuring:`all`,ignoreReadBeforeAssign:!1}],"prefer-exponentiation-operator":`warn`,"prefer-object-has-own":`warn`,"prefer-promise-reject-errors":[`warn`,{allowEmptyReject:!0}],"require-atomic-updates":`off`}},{name:`unicorn/overrides`,plugins:{unicorn:o,regexp:a},rules:{"regexp/no-unused-capturing-group":[`error`,{fixable:!1,allowNamed:!1}],"unicorn/better-regex":[`warn`,{sortCharacterClasses:!1}],"unicorn/error-message":`warn`,"unicorn/no-array-reverse":[`warn`],"unicorn/no-document-cookie":`warn`,"unicorn/no-instanceof-builtins":`warn`,"unicorn/no-invalid-remove-event-listener":`error`,"unicorn/no-negation-in-equality-check":`error`,"unicorn/no-new-array":`error`,"unicorn/no-new-buffer":`error`,"unicorn/no-thenable":`error`,"unicorn/no-typeof-undefined":[`warn`,{checkGlobalVariables:!1}],"unicorn/no-unnecessary-await":`off`,"unicorn/no-unreadable-array-destructuring":`error`,"unicorn/no-useless-fallback-in-spread":`warn`,"unicorn/no-useless-promise-resolve-reject":`warn`,"unicorn/no-useless-spread":`warn`,"unicorn/no-useless-undefined":[`off`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/no-zero-fractions":`warn`,"unicorn/number-literal-case":`warn`,"unicorn/prefer-array-flat":`warn`,"unicorn/prefer-array-flat-map":`warn`,"unicorn/prefer-array-index-of":`warn`,"unicorn/prefer-array-some":`warn`,"unicorn/prefer-at":`warn`,"unicorn/prefer-blob-reading-methods":`warn`,"unicorn/prefer-code-point":`warn`,"unicorn/prefer-dom-node-append":`warn`,"unicorn/prefer-dom-node-dataset":`off`,"unicorn/prefer-dom-node-remove":`warn`,"unicorn/prefer-dom-node-text-content":`warn`,"unicorn/prefer-export-from":[`warn`,{ignoreUsedVariables:!0}],"unicorn/prefer-includes":`warn`,"unicorn/prefer-keyboard-event-key":`warn`,"unicorn/prefer-modern-dom-apis":`warn`,"unicorn/prefer-modern-math-apis":`warn`,"unicorn/prefer-negative-index":`warn`,"unicorn/prefer-node-protocol":`warn`,"unicorn/prefer-object-from-entries":`warn`,"unicorn/prefer-optional-catch-binding":`warn`,"unicorn/prefer-prototype-methods":`warn`,"unicorn/prefer-query-selector":`off`,"unicorn/prefer-set-size":`warn`,"unicorn/prefer-string-raw":`warn`,"unicorn/prefer-string-slice":`warn`,"unicorn/throw-new-error":`warn`}}];let p=!1;function m({project:e,tsconfigRootDir:t=n()}={}){if(p)return[];p=!0;let i=e===!0?{projectService:!0}:e?{project:e}:{projectService:{allowDefaultProject:[`./*.js`],defaultProject:`./tsconfig.json`},tsconfigRootDir:t};return l(f,r.configs.strictTypeChecked,{name:`typescript/type-checked/project`,languageOptions:{parserOptions:i}},{name:`typescript/overrides`,files:[`**/*.js`,`**/*.jsx`,`**/*.ts`,`**/*.tsx`,`**/*.mts`,`**/*.cts`,`**/*.vue`],languageOptions:{parser:r.parser,sourceType:`module`,parserOptions:{ecmaVersion:`latest`,jsDocParsingMode:`none`,extraFileExtensions:[`.vue`],...i}},rules:{"@typescript-eslint/consistent-type-imports":`warn`,"@typescript-eslint/consistent-type-definitions":`off`,"default-param-last":`off`,"@typescript-eslint/default-param-last":`error`,"dot-notation":`off`,"@typescript-eslint/dot-notation":`off`,"@typescript-eslint/no-confusing-void-expression":[`off`,{ignoreArrowShorthand:!0}],"@typescript-eslint/no-deprecated":`off`,"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":`off`,"@typescript-eslint/no-empty-function":`off`,"@typescript-eslint/no-explicit-any":`off`,"@typescript-eslint/no-floating-promises":`off`,"@typescript-eslint/no-invalid-void-type":`off`,"no-loop-func":`off`,"@typescript-eslint/no-loop-func":`error`,"@typescript-eslint/no-misused-promises":[`error`,{checksVoidReturn:!1}],"@typescript-eslint/no-misused-spread":`error`,"@typescript-eslint/no-non-null-assertion":`off`,"no-redeclare":`off`,"@typescript-eslint/no-redeclare":[`error`],"@typescript-eslint/no-redundant-type-constituents":`warn`,"no-restricted-syntax":[`warn`,{selector:`:matches(PropertyDefinition, MethodDefinition)[accessibility="private"]`,message:"Use `#private` instead "},{selector:`:matches(PropertyDefinition, MethodDefinition)[accessibility="public"]`,message:"Unnecessary `public` access modifier, just remove it"}],"no-throw-literal":`off`,"@typescript-eslint/only-throw-error":[`error`,{allowThrowingAny:!1,allowThrowingUnknown:!1}],"no-undef":`off`,"@typescript-eslint/no-unnecessary-condition":`off`,"@typescript-eslint/no-unnecessary-type-parameters":`off`,"@typescript-eslint/no-unnecessary-type-assertion":`off`,"@typescript-eslint/no-unsafe-unary-minus":`error`,"no-unused-expressions":`off`,"@typescript-eslint/no-unused-expressions":[`warn`,{allowShortCircuit:!0,enforceForJSX:!0}],"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":`off`,"@typescript-eslint/no-useless-default-assignment":[`warn`],"@typescript-eslint/prefer-nullish-coalescing":[`warn`,{ignorePrimitives:{bigint:!0,boolean:!0,number:!0,string:!0}}],"@typescript-eslint/prefer-optional-chain":`off`,"prefer-promise-reject-errors":`off`,"@typescript-eslint/prefer-promise-reject-errors":`error`,"@typescript-eslint/promise-function-async":[`off`,{checkArrowFunctions:!1}],"@typescript-eslint/require-array-sort-compare":[`error`],"require-await":`off`,"@typescript-eslint/require-await":`off`,"@typescript-eslint/restrict-template-expressions":[`error`,{allowAny:!1,allowArray:!1,allowBoolean:!1,allowNullish:!1,allowNumber:!0,allowRegExp:!1}],"@typescript-eslint/unified-signatures":`off`}},{name:`typescript/disable-js-type-check`,files:[`**/*.js`,`**/*.jsx`],extends:[r.configs.disableTypeChecked]},{name:`typescript/off`,rules:{"@typescript-eslint/consistent-type-definitions":`off`,"default-param-last":`off`,"@typescript-eslint/default-param-last":`error`,"dot-notation":`off`,"@typescript-eslint/dot-notation":`off`,"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":`off`,"@typescript-eslint/no-empty-function":`off`,"@typescript-eslint/no-non-null-assertion":`off`,"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":`off`,"no-undef":`off`,"require-await":`off`,"@typescript-eslint/require-await":`off`}},{name:`typescript/dts-overrides`,files:[`**/*.d.ts`],rules:{"no-var":`off`,"@typescript-eslint/ban-types":`off`,"@typescript-eslint/consistent-type-imports":`off`,"@typescript-eslint/no-empty-object-type":`off`,"@typescript-eslint/no-invalid-void-type":`off`,"@typescript-eslint/no-redeclare":`off`}})}function h(e){return l(m(e),{name:`react/override`,files:[`**/*.jsx`,`**/*.tsx`],plugins:{react:c,...s.configs.all.plugins},languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},settings:{react:{version:`18`}},rules:{"@eslint-react/no-missing-key":`error`,"@eslint-react/jsx-shorthand-fragment":`warn`,"react/no-invalid-html-attribute":`warn`,"@eslint-react/dom/no-unknown-property":`warn`,"@eslint-react/no-leaked-conditional-rendering":`error`}})}function g({project:e,tsconfigRootDir:t=n()}={}){return[...m({project:e,tsconfigRootDir:t}),...u.configs[`flat/essential`],{name:`vue/overrides`,files:[`**/*.vue`],languageOptions:{parserOptions:{parser:r.parser,project:e||void 0,projectService:e?void 0:!0,tsconfigRootDir:t}},rules:{"vue/no-unused-vars":`off`,"vue/html-self-closing":`off`,"vue/max-attributes-per-line":`off`,"vue/multi-word-component-names":`off`,"vue/require-default-prop":`off`,"vue/require-prop-types":`off`,"vue/singleline-html-element-content-newline":`off`}}]}export{d as format,f as javascript,h as react,m as typescript,g as vue};
1
+ import e from"@stylistic/eslint-plugin";import t from"eslint-plugin-ziloen";import{cwd as n}from"node:process";import r from"typescript-eslint";import i from"@eslint/js";import*as a from"eslint-plugin-regexp";import o from"eslint-plugin-unicorn";import s from"@eslint-react/eslint-plugin";import{defineConfig as c}from"eslint/config";import l from"eslint-plugin-vue";function u({project:i,tsconfigRootDir:a=n()}={}){return[{name:`format/general`,plugins:{"@typescript-eslint":r.plugin,ziloen:t,style:e},languageOptions:{parser:r.parser,parserOptions:{project:i||void 0,projectService:i?void 0:!0,tsconfigRootDir:a,sourceType:`module`,extraFileExtensions:[`.vue`]}},rules:{"style/array-bracket-newline":[`warn`,`consistent`],"style/array-bracket-spacing":[`warn`,`never`],"style/array-element-newline":[`warn`,`consistent`],"style/arrow-parens":[`warn`,`always`],"style/arrow-spacing":`warn`,"style/computed-property-spacing":`warn`,"style/comma-style":`warn`,"style/dot-location":[`warn`,`property`],"style/function-call-argument-newline":[`warn`,`consistent`],"style/generator-star-spacing":[`warn`,{before:!1,after:!0,named:`after`,anonymous:`after`,method:`before`}],"style/max-len":[`warn`,{code:120,tabWidth:2,ignoreComments:!0,ignoreTrailingComments:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0,ignoreRegExpLiterals:!0}],"style/new-parens":`off`,"style/newline-per-chained-call":[`warn`,{ignoreChainWithDepth:2}],"style/no-mixed-spaces-and-tabs":`warn`,"style/no-multi-spaces":`warn`,"style/no-multiple-empty-lines":[`warn`,{max:3}],"style/no-trailing-spaces":[`warn`,{ignoreComments:!0}],"no-useless-rename":`warn`,"style/no-whitespace-before-property":`warn`,"style/object-curly-newline":[`warn`,{consistent:!0}],"object-shorthand":[`warn`,`always`,{avoidQuotes:!0}],"prefer-template":`warn`,"style/quote-props":[`warn`,`as-needed`],"style/rest-spread-spacing":[`warn`,`never`],"style/semi-spacing":[`warn`,{before:!1,after:!0}],"style/semi-style":`warn`,"sort-imports":[`off`,{ignoreDeclarationSort:!0}],"style/space-in-parens":`warn`,"style/space-unary-ops":[`warn`,{words:!0,nonwords:!1}],"style/switch-colon-spacing":`warn`,"style/template-curly-spacing":`warn`,"style/yield-star-spacing":[`warn`,`after`],"style/block-spacing":`warn`,"style/brace-style":[`warn`,`1tbs`,{allowSingleLine:!0}],"style/comma-dangle":[`warn`,`only-multiline`],"style/comma-spacing":`warn`,"style/function-call-spacing":`warn`,"style/indent":[`warn`,2,{VariableDeclarator:`first`,SwitchCase:1,outerIIFEBody:1,MemberExpression:1,flatTernaryExpressions:!1,offsetTernaryExpressions:!0,ignoredNodes:[]}],"style/indent-binary-ops":[`warn`,2],"style/key-spacing":[`warn`],"style/keyword-spacing":`warn`,"style/no-extra-parens":[`warn`,`all`,{allowParensAfterCommentPattern:`@type`,ignoreJSX:`all`,conditionalAssign:!1,returnAssign:!1,ternaryOperandBinaryExpressions:!1,nestedBinaryExpressions:!1}],"style/no-extra-semi":[`warn`],"style/object-curly-spacing":[`warn`,`always`],"style/quotes":[`warn`,`single`,{avoidEscape:!0,allowTemplateLiterals:`avoidEscape`}],"style/semi":[`warn`,`never`],"style/space-before-blocks":`warn`,"style/space-before-function-paren":[`warn`,{anonymous:`always`,named:`never`,asyncArrow:`always`}],"style/space-infix-ops":`warn`,"style/member-delimiter-style":[`warn`,{multiline:{delimiter:`none`,requireLast:!1},singleline:{requireLast:!1},multilineDetection:`brackets`}],"@typescript-eslint/no-unnecessary-qualifier":`warn`,"style/type-annotation-spacing":[`warn`],"ziloen/generic-spacing":`warn`}},{name:`format/jsx`,files:[`**/*.jsx`,`**/*.tsx`],plugins:{style:e},rules:{"style/jsx-tag-spacing":[`warn`,{closingSlash:`never`,beforeSelfClosing:`proportional-always`,afterOpening:`never`,beforeClosing:`never`}],"style/jsx-curly-spacing":[`warn`],"style/jsx-indent-props":[`warn`,{indentMode:2}]}}]}const d=[{name:`javascript/ignore`,ignores:[`**/*.min.*`,`**/auto-import?(s).d.ts`,`**/CHANGELOG*.md`,`**/LICENSE*`,`**/bun.lockb`,`**/package-lock.json`,`**/pnpm-lock.yaml`,`**/yarn.lock`,`**/.agents`,`**/.idea`,`**/.next`,`**/.nuxt`,`**/.vercel`,`**/dist`,`**/node_modules`,`*.html`,`**/blob-report`,`**/playwright-report`,`**/playwright/.cache`,`**/test-results`]},i.configs.recommended,{name:`javascript/overrides`,rules:{"array-callback-return":[`error`,{allowImplicit:!0}],"block-scoped-var":`error`,"constructor-super":`error`,eqeqeq:[`error`,`smart`],"logical-assignment-operators":[`warn`],"max-nested-callbacks":[`warn`,5],"no-await-in-loop":`warn`,"no-async-promise-executor":`off`,"no-caller":`error`,"no-constant-binary-expression":`error`,"no-console":[`off`,{allow:[`warn`,`error`]}],"no-constructor-return":`warn`,"no-empty":`off`,"no-eval":`warn`,"no-extra-semi":`off`,"no-fallthrough":[`error`,{allowEmptyCase:!0}],"no-new-native-nonconstructor":`off`,"no-new-symbol":`off`,"no-promise-executor-return":`off`,"no-restricted-exports":[`off`,{restrictDefaultExports:{direct:!0}}],"no-restricted-globals":[`error`,`event`,`name`,`length`,`status`],"no-return-await":`off`,"no-undef":`off`,"no-unused-expressions":[`warn`,{allowShortCircuit:!0,enforceForJSX:!0}],"no-unused-vars":`off`,"no-var":`error`,"no-warning-comments":[`error`,{terms:[`@debug`],location:`anywhere`}],"prefer-const":[`off`,{destructuring:`all`,ignoreReadBeforeAssign:!1}],"prefer-exponentiation-operator":`warn`,"prefer-object-has-own":`warn`,"prefer-promise-reject-errors":[`warn`,{allowEmptyReject:!0}],"require-atomic-updates":`off`}},{name:`unicorn/overrides`,plugins:{unicorn:o,regexp:a},rules:{"regexp/no-unused-capturing-group":[`error`,{fixable:!1,allowNamed:!1}],"unicorn/better-regex":[`warn`,{sortCharacterClasses:!1}],"unicorn/error-message":`warn`,"unicorn/no-array-reverse":[`warn`],"unicorn/no-document-cookie":`warn`,"unicorn/no-instanceof-builtins":`warn`,"unicorn/no-invalid-remove-event-listener":`error`,"unicorn/no-negation-in-equality-check":`error`,"unicorn/no-new-array":`error`,"unicorn/no-new-buffer":`error`,"unicorn/no-thenable":`error`,"unicorn/no-typeof-undefined":[`warn`,{checkGlobalVariables:!1}],"unicorn/no-unnecessary-await":`off`,"unicorn/no-unreadable-array-destructuring":`error`,"unicorn/no-useless-fallback-in-spread":`warn`,"unicorn/no-useless-promise-resolve-reject":`warn`,"unicorn/no-useless-spread":`warn`,"unicorn/no-useless-undefined":[`off`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/no-zero-fractions":`warn`,"unicorn/number-literal-case":`warn`,"unicorn/prefer-array-flat":`warn`,"unicorn/prefer-array-flat-map":`warn`,"unicorn/prefer-array-index-of":`warn`,"unicorn/prefer-array-some":`warn`,"unicorn/prefer-at":`warn`,"unicorn/prefer-blob-reading-methods":`warn`,"unicorn/prefer-code-point":`warn`,"unicorn/prefer-dom-node-append":`warn`,"unicorn/prefer-dom-node-dataset":`off`,"unicorn/prefer-dom-node-remove":`warn`,"unicorn/prefer-dom-node-text-content":`warn`,"unicorn/prefer-export-from":[`warn`,{ignoreUsedVariables:!0}],"unicorn/prefer-includes":`warn`,"unicorn/prefer-keyboard-event-key":`warn`,"unicorn/prefer-modern-dom-apis":`warn`,"unicorn/prefer-modern-math-apis":`warn`,"unicorn/prefer-negative-index":`warn`,"unicorn/prefer-node-protocol":`warn`,"unicorn/prefer-object-from-entries":`warn`,"unicorn/prefer-optional-catch-binding":`warn`,"unicorn/prefer-prototype-methods":`warn`,"unicorn/prefer-query-selector":`off`,"unicorn/prefer-set-size":`warn`,"unicorn/prefer-string-raw":`warn`,"unicorn/prefer-string-slice":`warn`,"unicorn/throw-new-error":`warn`}}];function f(e){return`https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/${e}.md`}function p(e,t,n,r){e.report(Object.assign({messageId:n},r))}const m=new Map([[`alternate`,new Set([`link`,`area`,`a`])],[`apple-touch-icon`,new Set([`link`])],[`apple-touch-startup-image`,new Set([`link`])],[`author`,new Set([`link`,`area`,`a`])],[`bookmark`,new Set([`area`,`a`])],[`canonical`,new Set([`link`])],[`dns-prefetch`,new Set([`link`])],[`external`,new Set([`area`,`a`,`form`])],[`help`,new Set([`link`,`area`,`a`,`form`])],[`icon`,new Set([`link`])],[`license`,new Set([`link`,`area`,`a`,`form`])],[`manifest`,new Set([`link`])],[`mask-icon`,new Set([`link`])],[`modulepreload`,new Set([`link`])],[`next`,new Set([`link`,`area`,`a`,`form`])],[`nofollow`,new Set([`area`,`a`,`form`])],[`noopener`,new Set([`area`,`a`,`form`])],[`noreferrer`,new Set([`area`,`a`,`form`])],[`opener`,new Set([`area`,`a`,`form`])],[`pingback`,new Set([`link`])],[`preconnect`,new Set([`link`])],[`prefetch`,new Set([`link`])],[`preload`,new Set([`link`])],[`prerender`,new Set([`link`])],[`prev`,new Set([`link`,`area`,`a`,`form`])],[`search`,new Set([`link`,`area`,`a`,`form`])],[`shortcut`,new Set([`link`])],[`shortcut icon`,new Set([`link`])],[`stylesheet`,new Set([`link`])],[`tag`,new Set([`area`,`a`])]]),h=new Map([[`shortcut`,new Set([`icon`])]]),g=new Map([[`rel`,m]]),_=new Map([[`rel`,h]]),v=new Set(`a.abbr.acronym.address.applet.area.article.aside.audio.b.base.basefont.bdi.bdo.bgsound.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.del.details.dfn.dialog.dir.div.dl.dt.em.embed.fieldset.figcaption.figure.font.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.image.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.math.menu.menuitem.meta.meter.nav.nobr.noembed.noframes.noscript.object.ol.optgroup.option.output.p.param.picture.plaintext.portal.pre.progress.q.rb.rp.rt.rtc.ruby.s.samp.script.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.svg.table.tbody.td.template.textarea.tfoot.th.thead.time.title.tr.track.tt.u.ul.var.video.wbr.xmp`.split(`.`)),y=new Map([[`rel`,new Set([`link`,`a`,`area`,`form`])]]),b={emptyIsMeaningless:`An empty “{{attributeName}}” attribute is meaningless.`,neverValid:`“{{reportingValue}}” is never a valid “{{attributeName}}” attribute value.`,noEmpty:`An empty “{{attributeName}}” attribute is meaningless.`,noMethod:`The ”{{attributeName}}“ attribute cannot be a method.`,notAlone:`“{{reportingValue}}” must be directly followed by “{{missingValue}}”.`,notPaired:`“{{reportingValue}}” can not be directly followed by “{{secondValue}}” without “{{missingValue}}”.`,notValidFor:`“{{reportingValue}}” is not a valid “{{attributeName}}” attribute value for <{{elementName}}>.`,onlyMeaningfulFor:`The ”{{attributeName}}“ attribute only has meaning on the tags: {{tagNames}}`,onlyStrings:`“{{attributeName}}” attribute only supports strings.`,spaceDelimited:`”{{attributeName}}“ attribute values should be space delimited.`,suggestRemoveDefault:`"remove {{attributeName}}"`,suggestRemoveEmpty:`"remove empty attribute {{attributeName}}"`,suggestRemoveInvalid:`“remove invalid attribute {{reportingValue}}”`,suggestRemoveWhitespaces:`remove whitespaces in “{{attributeName}}”`,suggestRemoveNonString:`remove non-string value in “{{attributeName}}”`};function x(e,t){let n=e.range[0]+1;return Array.from(e.value.matchAll(t),e=>{let t=e.index+n,r=t+e[0].length;return{reportingValue:`${e[1]}`,value:e[1],range:[t,r]}})}function S(e,t,n,r,i){if(typeof n.value!=`string`){let i={attributeName:t,reportingValue:n.value};p(e,b.onlyStrings,`onlyStrings`,{node:n,data:i,suggest:[{messageId:`suggestRemoveNonString`,data:i,fix(e){return e.remove(r)}}]});return}if(!n.value.trim()){let r={attributeName:t,reportingValue:n.value};p(e,b.noEmpty,`noEmpty`,{node:n,data:r,suggest:[{messageId:`suggestRemoveEmpty`,data:r,fix(e){return e.remove(n.parent)}}]});return}x(n,/(\S+)/g).forEach(r=>{let a=g.get(t).get(r.value),o=r.reportingValue;if(!a){let i={attributeName:t,reportingValue:o},a=[{messageId:`suggestRemoveInvalid`,data:i,fix(e){return e.removeRange(r.range)}}];p(e,b.neverValid,`neverValid`,{node:n,data:i,suggest:a})}else if(!a.has(i)){let a={attributeName:t,reportingValue:o,elementName:i},s=[{messageId:`suggestRemoveInvalid`,data:a,fix(e){return e.removeRange(r.range)}}];p(e,b.notValidFor,`notValidFor`,{node:n,data:a,suggest:s})}});let a=_.get(t);a&&x(n,/(?=(\b\S+\s*\S+))/g).forEach(t=>{a.forEach((r,i)=>{let a=t.reportingValue.split(` `),o=a[0],s=a[1];if(o===i){let t=a[a.length-1];r.has(t)||p(e,s?b.notPaired:b.notAlone,s?`notPaired`:`notAlone`,{node:n,data:{reportingValue:o,secondValue:s,missingValue:Array.from(r).join(`, `)},suggest:!1})}})}),x(n,/(\s+)/g).forEach(r=>{let i={attributeName:t};r.range[0]===n.range[0]+1||r.range[1]===n.range[1]-1?p(e,b.spaceDelimited,`spaceDelimited`,{node:n,data:i,suggest:[{messageId:`suggestRemoveWhitespaces`,data:i,fix(e){return e.removeRange(r.range)}}]}):r.value!==` `&&p(e,b.spaceDelimited,`spaceDelimited`,{node:n,data:i,suggest:[{messageId:`suggestRemoveWhitespaces`,data:i,fix(e){return e.replaceTextRange(r.range,` `)}}]})})}const C=[`rel`];function w(e,t){let n=t.name.name,r=t.parent.name.name;if(!y.has(n)||!y.get(n).has(r)){let r={attributeName:n,tagNames:Array.from(y.get(n).values(),e=>`"<${e}>"`).join(`, `)};p(e,b.onlyMeaningfulFor,`onlyMeaningfulFor`,{node:t.name,data:r,suggest:[{messageId:`suggestRemoveDefault`,data:r,fix(e){return e.remove(t)}}]});return}function i(e){return e.remove(t)}if(!t.value){let r={attributeName:n};p(e,b.emptyIsMeaningless,`emptyIsMeaningless`,{node:t.name,data:r,suggest:[{messageId:`suggestRemoveEmpty`,data:r,fix:i}]});return}if(t.value.type===`Literal`)return S(e,n,t.value,t,r);if(t.value.expression.type===`Literal`)return S(e,n,t.value.expression,t,r);if(t.value.type===`JSXExpressionContainer`){if(t.value.expression.type===`ObjectExpression`){let r={attributeName:n};p(e,b.onlyStrings,`onlyStrings`,{node:t.value,data:r,suggest:[{messageId:`suggestRemoveDefault`,data:r,fix:i}]})}else if(t.value.expression.type===`Identifier`&&t.value.expression.name===`undefined`){let r={attributeName:n};p(e,b.onlyStrings,`onlyStrings`,{node:t.value,data:r,suggest:[{messageId:`suggestRemoveDefault`,data:r,fix:i}]})}}}function T(e){return e.callee&&e.callee.type===`MemberExpression`&&e.callee.object.name===`React`&&e.callee.property.name===`createElement`&&e.arguments.length>0}function E(e,t,n,r){let i=g.get(r);if(n.type!==`Literal`)return;let a=i.get(n.value);if(a)a.has(t.arguments[0].value)||p(e,b.notValidFor,`notValidFor`,{node:n,data:{attributeName:r,reportingValue:n.raw,elementName:t.arguments[0].value},suggest:!1});else{let t={attributeName:r,reportingValue:n.value};p(e,b.neverValid,`neverValid`,{node:n,data:t,suggest:[{messageId:`suggestRemoveInvalid`,data:t,fix(e){return e.replaceText(n,n.raw.replace(n.value,``))}}]})}}function D(e,t,n){let r=t.arguments[1];if(!(!r||r.type!==`ObjectExpression`)){for(let i of r.properties)if(!(!i.key||i.key.type!==`Identifier`)&&i.key.name===n){if(!y.get(n).has(t.arguments[0].value)){let t=Array.from(y.get(n).values(),e=>`"<${e}>"`).join(`, `);p(e,b.onlyMeaningfulFor,`onlyMeaningfulFor`,{node:i.key,data:{attributeName:n,tagNames:t},suggest:!1});continue}if(i.method){p(e,b.noMethod,`noMethod`,{node:i,data:{attributeName:n},suggest:!1});continue}if(!(i.shorthand||i.computed)){if(i.value.type===`ArrayExpression`){i.value.elements.forEach(r=>{E(e,t,r,n)});continue}E(e,t,i.value,n)}}}}const O={meta:{docs:{description:`Disallow usage of invalid attributes`,category:`Possible Errors`,url:f(`no-invalid-html-attribute`)},messages:b,schema:[{type:`array`,uniqueItems:!0,items:{enum:[`rel`]}}],type:`suggestion`,hasSuggestions:!0},create(e){return{JSXAttribute(t){new Set(e.options[0]||C).has(t.name.name)&&v.has(t.parent.name.name)&&w(e,t)},CallExpression(t){if(!T(t))return;let n=t.arguments[0];!n||n.type!==`Literal`||typeof n.value==`string`&&!v.has(n.value)||new Set(e.options[0]||C).forEach(n=>{D(e,t,n)})}}}};let k=!1;function A({project:e,tsconfigRootDir:t=n()}={}){if(k)return[];k=!0;let i=e===!0?{projectService:!0}:e?{project:e}:{projectService:{allowDefaultProject:[`./*.js`],defaultProject:`./tsconfig.json`},tsconfigRootDir:t};return c(d,r.configs.strictTypeChecked,{name:`typescript/type-checked/project`,languageOptions:{parserOptions:i}},{name:`typescript/overrides`,files:[`**/*.js`,`**/*.jsx`,`**/*.ts`,`**/*.tsx`,`**/*.mts`,`**/*.cts`,`**/*.vue`],languageOptions:{parser:r.parser,sourceType:`module`,parserOptions:{ecmaVersion:`latest`,jsDocParsingMode:`none`,extraFileExtensions:[`.vue`],...i}},rules:{"@typescript-eslint/consistent-type-imports":`warn`,"@typescript-eslint/consistent-type-definitions":`off`,"default-param-last":`off`,"@typescript-eslint/default-param-last":`error`,"dot-notation":`off`,"@typescript-eslint/dot-notation":`off`,"@typescript-eslint/no-confusing-void-expression":[`off`,{ignoreArrowShorthand:!0}],"@typescript-eslint/no-deprecated":`off`,"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":`off`,"@typescript-eslint/no-empty-function":`off`,"@typescript-eslint/no-explicit-any":`off`,"@typescript-eslint/no-floating-promises":`off`,"@typescript-eslint/no-invalid-void-type":`off`,"no-loop-func":`off`,"@typescript-eslint/no-loop-func":`error`,"@typescript-eslint/no-misused-promises":[`error`,{checksVoidReturn:!1}],"@typescript-eslint/no-misused-spread":`error`,"@typescript-eslint/no-non-null-assertion":`off`,"no-redeclare":`off`,"@typescript-eslint/no-redeclare":[`error`],"@typescript-eslint/no-redundant-type-constituents":`warn`,"no-restricted-syntax":[`warn`,{selector:`:matches(PropertyDefinition, MethodDefinition)[accessibility="private"]`,message:"Use `#private` instead "},{selector:`:matches(PropertyDefinition, MethodDefinition)[accessibility="public"]`,message:"Unnecessary `public` access modifier, just remove it"}],"no-throw-literal":`off`,"@typescript-eslint/only-throw-error":[`error`,{allowThrowingAny:!1,allowThrowingUnknown:!1}],"no-undef":`off`,"@typescript-eslint/no-unnecessary-condition":`off`,"@typescript-eslint/no-unnecessary-type-parameters":`off`,"@typescript-eslint/no-unnecessary-type-assertion":`off`,"@typescript-eslint/no-unsafe-unary-minus":`error`,"no-unused-expressions":`off`,"@typescript-eslint/no-unused-expressions":[`warn`,{allowShortCircuit:!0,enforceForJSX:!0}],"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":`off`,"@typescript-eslint/no-useless-default-assignment":[`warn`],"@typescript-eslint/prefer-nullish-coalescing":[`warn`,{ignorePrimitives:{bigint:!0,boolean:!0,number:!0,string:!0}}],"@typescript-eslint/prefer-optional-chain":`off`,"prefer-promise-reject-errors":`off`,"@typescript-eslint/prefer-promise-reject-errors":`error`,"@typescript-eslint/promise-function-async":[`off`,{checkArrowFunctions:!1}],"@typescript-eslint/require-array-sort-compare":[`error`],"require-await":`off`,"@typescript-eslint/require-await":`off`,"@typescript-eslint/restrict-template-expressions":[`error`,{allowAny:!1,allowArray:!1,allowBoolean:!1,allowNullish:!1,allowNumber:!0,allowRegExp:!1}],"@typescript-eslint/unified-signatures":`off`}},{name:`typescript/disable-js-type-check`,files:[`**/*.js`,`**/*.jsx`],extends:[r.configs.disableTypeChecked]},{name:`typescript/off`,rules:{"@typescript-eslint/consistent-type-definitions":`off`,"default-param-last":`off`,"@typescript-eslint/default-param-last":`error`,"dot-notation":`off`,"@typescript-eslint/dot-notation":`off`,"no-dupe-class-members":`off`,"@typescript-eslint/no-dupe-class-members":`off`,"@typescript-eslint/no-empty-function":`off`,"@typescript-eslint/no-non-null-assertion":`off`,"no-unused-vars":`off`,"@typescript-eslint/no-unused-vars":`off`,"no-undef":`off`,"require-await":`off`,"@typescript-eslint/require-await":`off`}},{name:`typescript/dts-overrides`,files:[`**/*.d.ts`],rules:{"no-var":`off`,"@typescript-eslint/ban-types":`off`,"@typescript-eslint/consistent-type-imports":`off`,"@typescript-eslint/no-empty-object-type":`off`,"@typescript-eslint/no-invalid-void-type":`off`,"@typescript-eslint/no-redeclare":`off`}})}function j(e){return c(A(e),{name:`react/override`,files:[`**/*.jsx`,`**/*.tsx`],plugins:{react:{rules:{"no-invalid-html-attribute":O}},...s.configs.all.plugins},languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}},settings:{react:{version:`18`}},rules:{"@eslint-react/no-missing-key":`error`,"@eslint-react/jsx-shorthand-fragment":`warn`,"react/no-invalid-html-attribute":`warn`,"@eslint-react/dom/no-unknown-property":`warn`,"@eslint-react/no-leaked-conditional-rendering":`error`}})}function M({project:e,tsconfigRootDir:t=n()}={}){return[...A({project:e,tsconfigRootDir:t}),...l.configs[`flat/essential`],{name:`vue/overrides`,files:[`**/*.vue`],languageOptions:{parserOptions:{parser:r.parser,project:e||void 0,projectService:e?void 0:!0,tsconfigRootDir:t}},rules:{"vue/no-unused-vars":`off`,"vue/html-self-closing":`off`,"vue/max-attributes-per-line":`off`,"vue/multi-word-component-names":`off`,"vue/require-default-prop":`off`,"vue/require-prop-types":`off`,"vue/singleline-html-element-content-newline":`off`}}]}export{u as format,d as javascript,j as react,A as typescript,M as vue};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziloen/eslint-config",
3
- "version": "0.1.80",
3
+ "version": "0.1.82",
4
4
  "author": "ziloen",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,29 +22,28 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@eslint-react/eslint-plugin": "3.0.0-beta.83",
25
+ "@eslint-react/eslint-plugin": "3.0.0",
26
26
  "@eslint/js": "^10.0.1",
27
27
  "@stylistic/eslint-plugin": "^5.10.0",
28
- "eslint-plugin-react": "^7.37.5",
29
28
  "eslint-plugin-regexp": "^3.1.0",
30
- "eslint-plugin-unicorn": "^63.0.0",
29
+ "eslint-plugin-unicorn": "^64.0.0",
31
30
  "eslint-plugin-vue": "^10.8.0",
32
- "eslint-plugin-ziloen": "^0.1.19",
33
- "typescript": "5.9.3",
34
- "typescript-eslint": "8.57.0"
31
+ "eslint-plugin-ziloen": "^0.1.20",
32
+ "typescript": "6.0.2",
33
+ "typescript-eslint": "8.58.2"
35
34
  },
36
35
  "devDependencies": {
37
36
  "@types/eslint": "^9.6.1",
38
- "@types/node": "^24.10.13",
37
+ "@types/node": "^24.12.0",
39
38
  "@types/react": "^19.2.14",
40
- "bumpp": "^10.4.1",
39
+ "bumpp": "^11.0.1",
41
40
  "cross-env": "^10.1.0",
42
- "eslint": "^10.0.3",
43
- "react": "^19.2.4",
44
- "tsdown": "0.21.1",
45
- "vue": "^3.5.30"
41
+ "eslint": "^10.2.0",
42
+ "react": "^19.2.5",
43
+ "tsdown": "0.21.8",
44
+ "vue": "^3.5.32"
46
45
  },
47
46
  "peerDependencies": {
48
- "eslint": "^9 || ^10"
47
+ "eslint": "^10"
49
48
  }
50
49
  }