eslint-config-sukka 6.2.3 → 6.3.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/dist/index.cjs +1 -3
- package/dist/index.mjs +1 -3
- package/package.json +14 -15
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
"use strict";let e;const r=e=>Promise.resolve(require(e));var t,n=require("@eslint-sukka/shared"),s=require("node:fs"),o=require("node:process"),i=require("node:path");require("node:fs/promises");var a=require("node:url"),l=require("@eslint-community/eslint-plugin-eslint-comments"),c=require("eslint-plugin-sukka"),p=require("eslint-plugin-promise"),u=require("eslint-plugin-regexp"),f=require("@eslint/js"),m=require("@stylistic/eslint-plugin-js"),d=require("@stylistic/eslint-plugin-plus"),y=require("eslint-plugin-unused-imports"),g=require("eslint-plugin-import-x"),h=require("eslint-plugin-autofix"),w=require("eslint-plugin-jsonc"),k=require("jsonc-eslint-parser"),b=require("eslint-plugin-sukka-ts"),j=require("typescript-eslint"),x=require("@stylistic/eslint-plugin-ts");require("acorn");var R=require("node:module"),v=require("node:assert"),E=require("node:v8"),_=require("node:util"),L=require("picocolors"),T=require("defu"),P=require("ci-info"),O="undefined"!=typeof document?document.currentScript:null,$=(t=Object.create(null),u&&Object.keys(u).forEach(function(e){if("default"!==e){var r=Object.getOwnPropertyDescriptor(u,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return u[e]}})}}),t.default=u,Object.freeze(t));const U=e=>e instanceof URL?a.fileURLToPath(e):e;var I=function(e){let r=e.startsWith("!"),t=r?"!":"",n=(r?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(n))return`${t}${n}`;let s=n.indexOf("/"),o=s<0||s===n.length-1?"**/":"",i=(0===s?n.slice(1):n).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=n.endsWith("/**")?"/*":"";return`${t}${o}${i}${a}`};const S=".gitignore";function D(e={}){let r=[],{root:t=!1,files:n=t?S:function(e,{cwd:r=o.cwd(),type:t="file",stopAt:n}={}){let a=i.resolve(U(r)??""),{root:l}=i.parse(a);for(n=i.resolve(a,U(n)??l);a&&a!==n&&a!==l;){let r=i.isAbsolute(e)?e:i.join(a,e);try{let e=s.statSync(r,{throwIfNoEntry:!1});if("file"===t&&e?.isFile()||"directory"===t&&e?.isDirectory())return r}catch{}a=i.dirname(a)}}(S)||[],strict:a=!0,cwd:l=o.cwd()}=e,c=Array.isArray(n)?n:[n];for(let e of c){let t="";try{t=s.readFileSync(e,"utf8")}catch(e){if(a)throw e;continue}let n=i.relative(l,i.dirname(e)).replaceAll("\\","/"),o=t.split(/\r?\n/u).filter(e=>e&&!e.startsWith("#")).map(e=>I(e)).map(e=>(function(e,r,t){if(["",".","/"].includes(r))return e;let n=e.startsWith("!")?"!":"",s=n?e.slice(1):e;if(r.endsWith("/")||(r=`${r}/`),!r.startsWith(".."))return`${n}${r}${s}`;if(!r.match(/^(\.\.\/)+$/))throw Error("The ignore file location should be either a parent or child directory");if(s.startsWith("**"))return e;let o=i.relative(i.resolve(t,r),t).split(/[/\\]/);for(;o.length&&s.startsWith(`${o[0]}/`);)s=s.slice(o[0].length+1),o.shift();return s.startsWith("**")||0===o.length?`${n}${s}`:null})(e,n,l)).filter(e=>null!==e);r.push(...o)}if(a&&0===c.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:r}}const N=(e={})=>{let{customGlobs:r=null,gitignore:t=[".gitignore"]}=e,s=[],o=[];return!1===r||null===r?o=n.constants.GLOB_EXCLUDE:"function"==typeof r?o=r(n.constants.GLOB_EXCLUDE):"string"==typeof r?o.push(...n.constants.GLOB_EXCLUDE,r):Array.isArray(r)&&o.push(...n.constants.GLOB_EXCLUDE,...r),s.push({ignores:o}),!1===t||null===t||(!0===t?s.push(D({files:[".gitignore"],strict:!1})):("string"==typeof t||Array.isArray(t))&&s.push(D({files:t,strict:!1}))),s},A=()=>[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":l,sukka:n.memo(c,"eslint-plugin-sukka")},rules:{"sukka/ban-eslint-disable":["error","allow-with-description"],"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error"}}],C=({typescript:e})=>[{name:"sukka/promise",plugins:{promise:p},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn"}}],q=()=>[{name:"sukka/regexp",plugins:{sukka:n.memo(c,"eslint-plugin-sukka"),regexp:n.memo($,"eslint-plugin-regexp")},rules:{"sukka/unicorn/better-regex":"error",...u.configs["flat/recommended"].rules,"regexp/strict":"off"}}],F=[".js",".jsx",".mjs",".cjs"],W=(e={})=>{let{files:r,disableNoConsoleInCLI:t=!0,env:s={}}=e,{browser:o=!0,webextensions:i=!1,greasemonkey:a=!1,customGlobals:l={}}=s,p=e.module??n.getPackageJson()?.type==="module",u=[{name:"@eslint/js recommended",...f.configs.recommended},{linterOptions:{reportUnusedDisableDirectives:!0}},{name:"@eslint-sukka/js base",...r?{files:r}:{},languageOptions:{ecmaVersion:"latest",sourceType:p?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:p?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...n.globals.es2025,...o&&n.globals.browser,...i&&n.globals.webextensions,...a&&n.globals.greasemonkey,...l}},settings:{"import-x/parsers":{espree:F},"import-x/extensions":F},plugins:{"unused-imports":n.memo(y,"eslint-plugin-unused-imports"),"@stylistic/js":n.memo(m,"@stylistic/eslint-plugin-js"),"@stylistic/plus":n.memo(d,"@stylistic/eslint-plugin-plus"),sukka:n.memo(c,"eslint-plugin-sukka"),"import-x":n.memo(g,"eslint-plugin-import-x"),autofix:h},rules:{...g.configs.recommended.rules,"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],"@stylistic/js/dot-location":["error","property"],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"off","autofix/no-caller":"error","no-constructor-return":"error","no-else-return":["error",{allowElseIf:!1}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","@stylistic/js/no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"off","autofix/no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,r])=>["global","globalThis","window","self"].map(t=>({object:t,property:e,message:`Please use ${r} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-return-await":"off","sukka/no-return-await":"error","no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"off","no-useless-catch":"off","autofix/no-useless-catch":"error","no-useless-concat":"off","autofix/no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"off","autofix/radix":"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error","@stylistic/js/wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":"warn","no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","@stylistic/js/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":"off","autofix/valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"off","autofix/no-new-native-nonconstructor":"error","@stylistic/js/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/js/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/js/no-confusing-arrow":["error",{allowParens:!0}],"no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error","@stylistic/js/template-curly-spacing":["error","never"],"@stylistic/js/yield-star-spacing":["error","before"],"@stylistic/js/array-bracket-newline":["off","consistent"],"@stylistic/js/array-bracket-spacing":["error","never"],"@stylistic/js/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/js/block-spacing":["error","always"],"@stylistic/js/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"@stylistic/js/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/js/computed-property-spacing":["error","never"],"consistent-this":"off","@stylistic/js/eol-last":["error","always"],"@stylistic/js/func-call-spacing":["error","never"],"@stylistic/js/function-call-argument-newline":["off","consistent"],"@stylistic/js/function-paren-newline":["error","consistent"],"@stylistic/js/implicit-arrow-linebreak":["error","beside"],"@stylistic/js/indent":["error",2,{SwitchCase:1}],"@stylistic/plus/indent-binary-ops":["error",2],"@stylistic/js/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/linebreak-style":"error","@stylistic/js/lines-around-comment":"off","@stylistic/js/lines-around-directive":"off","@stylistic/js/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/js/multiline-ternary":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"@stylistic/js/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/js/new-parens":"error","no-bitwise":"off","no-lonely-if":"error","sukka/unicorn/no-lonely-if":"error","@stylistic/js/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/js/no-mixed-spaces-and-tabs":"error","no-multi-assign":"error","@stylistic/js/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","sukka/unicorn/no-negated-condition":"warn","no-nested-ternary":"off","sukka/unicorn/no-nested-ternary":"warn","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","@stylistic/js/no-spaced-func":"off","@stylistic/js/no-tabs":"error","no-ternary":"off","@stylistic/js/no-trailing-spaces":"error","no-unneeded-ternary":"error","@stylistic/js/no-whitespace-before-property":"error","@stylistic/js/nonblock-statement-body-position":"error","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","prefer-exponentiation-operator":"error","@stylistic/js/operator-linebreak":["error","before"],"@stylistic/js/padded-blocks":["error","never"],"@stylistic/js/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":["error","single"],"@stylistic/js/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/jsx-quotes":["error","prefer-double"],"@stylistic/js/rest-spread-spacing":["error","never"],"@stylistic/js/semi":["error","always"],"@stylistic/js/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/js/semi-style":["error","last"],"@stylistic/js/space-before-blocks":"error","@stylistic/js/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-in-parens":["error","never"],"@stylistic/js/space-infix-ops":"error","@stylistic/js/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/js/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/js/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/js/template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"@stylistic/js/wrap-regex":"off","no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","sukka/array/no-unneeded-flat-map":"error","sukka/browser/prefer-location-assign":"warn","sukka/jsx/no-template-literal":"error","sukka/jsx/no-unneeded-nested":"error","sukka/string/no-locale-case":"warn","sukka/string/no-simple-template-literal":"error","sukka/type/no-instanceof-wrapper":"error","sukka/unicode/no-bidi":"warn","sukka/unicode/no-invisible":"warn","sukka/no-redundant-variable":"error","sukka/no-single-return":"error","sukka/prefer-early-return":["error",{maximumStatements:16}],"sukka/prefer-fetch":"error","sukka/prefer-timer-id":"warn","sukka/unicorn/catch-error-name":["error",{ignore:[/^(?:e|err|error|\w+Err|\w+Error)[\d_]?$/]}],"sukka/unicorn/custom-error-definition":"error","sukka/unicorn/require-array-join-separator":"warn","sukka/unicorn/no-thenable":"error","sukka/unicorn/no-invalid-remove-event-listener":"error","sukka/unicorn/consistent-function-scoping":"warn","sukka/unicorn/prefer-event-target":"warn","sukka/unicorn/prefer-keyboard-event-key":"warn","sukka/unicorn/prefer-text-content":"warn","sukka/unicorn/no-console-spaces":"warn","sukka/unicorn/no-empty-file":"warn","sukka/unicorn/no-useless-fallback-in-spread":"warn","sukka/unicorn/no-useless-length-check":"warn","sukka/unicorn/no-useless-promise-resolve-reject":"warn","sukka/unicorn/no-zero-fractions":"warn","sukka/unicorn/prefer-export-from":["warn",{ignoreUsedVariables:!0}],"sukka/unicorn/prefer-native-coercion-functions":"warn","sukka/unicorn/prefer-negative-index":"warn","sukka/unicorn/no-document-cookie":"error","sukka/unicorn/prefer-add-event-listener":"warn","sukka/unicorn/prefer-array-index-of":"warn","sukka/unicorn/prefer-blob-reading-methods":"warn","sukka/unicorn/prefer-date-now":"warn","sukka/unicorn/prefer-dom-node-dataset":"warn","sukka/unicorn/prefer-modern-math-apis":"warn","sukka/unicorn/number-literal-case":"error","sukka/unicorn/prefer-number-properties":["warn",{checkInfinity:!1}],"sukka/unicorn/prefer-reflect-apply":"warn","sukka/unicorn/prefer-set-size":"warn","sukka/unicorn/prefer-string-replace-all":"warn","sukka/unicorn/prefer-string-slice":"warn","sukka/unicorn/prefer-string-trim-start-end":"warn","sukka/unicorn/no-unreadable-iife":"warn","sukka/unicorn/throw-new-error":"warn","sukka/unicorn/escape-case":"warn","sukka/unicorn/no-hex-escape":"warn","sukka/unicorn/prefer-prototype-methods":"warn","sukka/unicorn/error-message":"error","sukka/unicorn/no-instanceof-array":"error","sukka/unicorn/prefer-type-error":"error","sukka/unicorn/consistent-destructuring":"warn","sukka/unicorn/new-for-builtins":"warn","sukka/unicorn/no-array-push-push":"warn","sukka/unicorn/no-static-only-class":"warn","sukka/unicorn/no-unreadable-array-destructuring":"error","sukka/unicorn/no-useless-spread":"error","sukka/unicorn/no-useless-switch-case":"warn","sukka/unicorn/no-useless-undefined":["error",{checkArguments:!1}],"sukka/unicorn/numeric-separators-style":["warn",{onlyIfContainsSeparator:!1,number:{minimumDigits:7,groupLength:3},binary:{minimumDigits:9,groupLength:4},octal:{minimumDigits:9,groupLength:4},hexadecimal:{minimumDigits:5,groupLength:2}}],"sukka/unicorn/prefer-array-find":"warn","sukka/unicorn/prefer-array-flat-map":"warn","sukka/unicorn/prefer-array-flat":"warn","sukka/unicorn/prefer-array-some":"warn","sukka/unicorn/prefer-code-point":"warn","sukka/unicorn/prefer-default-parameters":"warn","sukka/unicorn/prefer-logical-operator-over-ternary":"warn","sukka/unicorn/prefer-optional-catch-binding":"error","sukka/unicorn/prefer-regexp-test":"warn","sukka/unicorn/prefer-set-has":"error","sukka/unicorn/prefer-switch":"warn","sukka/unicorn/require-number-to-fixed-digits-argument":"warn","sukka/import-dedupe":"error","sukka/unicorn/prefer-string-raw":"warn","sukka/unicorn/no-single-promise-in-promise-methods":"error","sukka/unicorn/no-await-in-promise-methods":"error","sukka/unicorn/no-magic-array-flat-depth":"error","sukka/unicorn/no-object-as-default-parameter":"error","sukka/unicorn/template-indent":["warn",{tags:["outdent","dedent","gql","sql","html","styled","css"],functions:["dedent","stripIndent","strip_indent","stripTags","striptags","strip_tags","stripHtml","stripHTML","strip_html"],selectors:[],comments:["HTML","html","CSS","css","indent"]}],"sukka/unicorn/no-negation-in-equality-check":"error","sukka/unicorn/no-length-as-slice-end":"error","no-restricted-imports":["error",{paths:n.RESTRICTED_IMPORT_JS}],"no-prototype-builtins":"off","autofix/no-prototype-builtins":"error"}}];if(!1!==t){let e="boolean"==typeof t?null:Array.isArray(t)?t:[t];u.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${n.constants.GLOB_SRC}`,`**/cli/${n.constants.GLOB_SRC}`,`**/cli.${n.constants.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return u},M={plugins:{jsonc:n.memo(w,"eslint-plugin-jsonc")},languageOptions:{parser:k}},G={"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"},V=()=>[...w.configs["flat/base"],{name:"@eslint-sukka/json json",files:[n.constants.GLOB_JSON],rules:{...w.configs["flat/recommended-with-json"].reduce((e,r)=>({...e,...r.rules}),{}),...G}},{name:"@eslint-sukka/json json5",...M,files:[n.constants.GLOB_JSON5],rules:{...w.configs["flat/recommended-with-json5"].reduce((e,r)=>({...e,...r.rules}),{}),...G}},{name:"@eslint-sukka/json jsonc",...M,files:[n.constants.GLOB_JSONC],rules:{...w.configs["flat/recommended-with-jsonc"].reduce((e,r)=>({...e,...r.rules}),{}),...G}},{name:"@eslint-sukka/json package.json",...M,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...M,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}],B={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":"error","no-return-await":"off","@typescript-eslint/return-await":"error","sukka/no-return-await":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@stylistic/js/no-extra-parens":"off","@stylistic/ts/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@stylistic/js/block-spacing":"off","@stylistic/ts/block-spacing":["error","always"],"@stylistic/js/brace-style":"off","@stylistic/ts/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:"off","@stylistic/js/comma-dangle":"off","@stylistic/ts/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":"off","@stylistic/ts/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/func-call-spacing":"off","@stylistic/ts/func-call-spacing":["error","never"],"@stylistic/js/indent":"off","@stylistic/ts/indent":["error",2,{SwitchCase:1}],"@stylistic/js/key-spacing":"off","@stylistic/ts/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":"off","@stylistic/ts/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/lines-around-comment":"off","@stylistic/ts/lines-around-comment":"off","@stylistic/js/lines-between-class-members":"off","@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@stylistic/js/object-curly-newline":"off","@stylistic/ts/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/ts/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/ts/object-property-newline":"off","@stylistic/js/padding-line-between-statements":"off","@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":"off","@stylistic/ts/quotes":["error","single"],"@stylistic/js/quote-props":"off","@stylistic/ts/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/semi":"off","@stylistic/ts/semi":["error","always"],"@stylistic/js/space-before-blocks":"off","@stylistic/ts/space-before-blocks":"error","@stylistic/js/space-before-function-paren":"off","@stylistic/ts/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-infix-ops":"off","@stylistic/ts/space-infix-ops":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-imports":"off"},J=[".js",".jsx",".mjs",".cjs"],K=[".ts",".cts",".mts",".tsx",".d.ts"],X=[...K,...J],z=[".ts",".cts",".mts",".tsx",...J],H=(e={})=>{let{tsconfigPath:r=!0,tsconfigRootDir:t=o.cwd(),componentExtentions:s=[]}=e,i="string"==typeof __dirname?a.pathToFileURL(__dirname).href:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:O&&O.src||new URL("index.cjs",document.baseURI).href,l=a.fileURLToPath(n.importMetaResolve("@typescript-eslint/parser",i)),c=a.fileURLToPath(n.importMetaResolve("eslint-import-resolver-ts-bundled",i));return[{name:"@eslint-sukka/ts base",files:[n.constants.GLOB_TS,n.constants.GLOB_TSX,...s.map(e=>`**/*.${e}`)],plugins:{...j.configs.base.plugins,"@stylistic/ts":n.memo(x,"@stylistic/eslint-plugin-ts"),"sukka-ts":n.memo(b,"eslint-plugin-sukka-ts"),"@stylistic/plus":n.memo(d,"@stylistic/eslint-plugin-plus"),"import-x":n.memo(g,"eslint-plugin-import-x")},languageOptions:{parser:j.configs.base.languageOptions.parser,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===r?{projectService:!0,allowDefaultProject:[]}:{project:r},tsconfigRootDir:t,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":X,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver":{node:{extensions:z},[c]:{alwaysTryTypes:!0,...!0===r?{}:{project:r}}},"import-x/parsers":{espree:J,[l]:K}},rules:{...j.configs.base.rules,...j.configs.recommendedTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...j.configs.stylisticTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...g.configs.typescript.rules,...B,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"@typescript-eslint/no-restricted-imports":["error",{paths:n.RESTRICTED_IMPORT_TS}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, you don't have to use React.FC to annotate it. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-enum-comparison":"warn","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@stylistic/ts/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/ts/type-annotation-spacing":["error",{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0},operator:{before:!0,after:!0}}}],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":"off","sukka-ts/string/prefer-string-starts-ends-with":"error","@typescript-eslint/switch-exhaustiveness-check":"error","sukka-ts/string/no-unneeded-to-string":"error","sukka-ts/type/no-force-cast-via-top-type":"error","sukka-ts/type/no-wrapper-type-reference":"error","sukka-ts/no-default-error":"off","sukka-ts/no-export-const-enum":"error","@stylistic/plus/type-generic-spacing":"error","@stylistic/plus/type-named-tuple-spacing":"error","@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":"error","import-x/named":"off","import-x/no-duplicates":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off"}},{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":n.memo(g,"eslint-plugin-import-x")},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:j.configs.base.plugins,rules:{"@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-var-requires":"off"}}]},Y=(e={})=>[{name:"@eslint-sukka/legacy base",...e.files?{files:e.files}:{},plugins:{sukka:n.memo(c,"eslint-plugin-sukka")},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off"},languageOptions:{globals:{...e.browser??!0?n.globals.browser:{},...e.node?n.globals.node:{}}}}],Q=/^\.?\//;var Z=function(e,...r){let t=e||"";for(let e of r.filter(e=>e&&"/"!==e))if(t){let r=e.replace(Q,"");t=function(e="",r){return e.endsWith("/")?e:e+"/"}(t)+r}else t=e;return t};const ee=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,er=new Set(R.builtinModules);function et(e){return e.replace(/\\/g,"/")}const en={}.hasOwnProperty,es=/^([A-Z][a-z\d]*)+$/,eo=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),ei={};function ea(e,r="and"){return e.length<3?e.join(` ${r} `):`${e.slice(0,-1).join(", ")}, ${r} ${e[e.length-1]}`}const el=new Map;function ec(e,r,t){return el.set(e,r),function(...r){let n=Error.stackTraceLimit;ep()&&(Error.stackTraceLimit=0);let s=new t;ep()&&(Error.stackTraceLimit=n);let o=function(e,r,t){let n=el.get(e);if(v(void 0!==n,"expected `message` to be found"),"function"==typeof n)return v(n.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${n.length}).`),Reflect.apply(n,t,r);let s=/%[dfijoOs]/g,o=0;for(;null!==s.exec(n);)o++;return(v(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),0===r.length)?n:(r.unshift(n),Reflect.apply(_.format,null,r))}(e,r,s);return Object.defineProperties(s,{message:{value:o,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),eu(s),s.code=e,s}}function ep(){try{if(E.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===e?Object.isExtensible(Error):en.call(e,"writable")&&void 0!==e.writable?e.writable:void 0!==e.set}ei.ERR_INVALID_ARG_TYPE=ec("ERR_INVALID_ARG_TYPE",(e,r,t)=>{v("string"==typeof e,"'name' must be a string"),Array.isArray(r)||(r=[r]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{let r=e.includes(".")?"property":"argument";n+=`"${e}" ${r} `}n+="must be ";let s=[],o=[],i=[];for(let e of r)v("string"==typeof e,"All expected entries have to be of type string"),eo.has(e)?s.push(e.toLowerCase()):null===es.exec(e)?(v("object"!==e,'The value "object" should be written as "Object"'),i.push(e)):o.push(e);if(o.length>0){let e=s.indexOf("object");-1!==e&&(s.slice(e,1),o.push("Object"))}return s.length>0&&(n+=`${s.length>1?"one of type":"of type"} ${ea(s,"or")}`,(o.length>0||i.length>0)&&(n+=" or ")),o.length>0&&(n+=`an instance of ${ea(o,"or")}`,i.length>0&&(n+=" or ")),i.length>0&&(i.length>1?n+=`one of ${ea(i,"or")}`:(i[0].toLowerCase()!==i[0]&&(n+="an "),n+=`${i[0]}`)),n+=`. Received ${function(e){if(null==e)return String(e);if("function"==typeof e&&e.name)return`function ${e.name}`;if("object"==typeof e)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${_.inspect(e,{depth:-1})}`;let r=_.inspect(e,{colors:!1});return r.length>28&&(r=`${r.slice(0,25)}...`),`type ${typeof e} (${r})`}(t)}`},TypeError),ei.ERR_INVALID_MODULE_SPECIFIER=ec("ERR_INVALID_MODULE_SPECIFIER",(e,r,t)=>`Invalid module "${e}" ${r}${t?` imported from ${t}`:""}`,TypeError),ei.ERR_INVALID_PACKAGE_CONFIG=ec("ERR_INVALID_PACKAGE_CONFIG",(e,r,t)=>`Invalid package config ${e}${r?` while importing ${r}`:""}${t?`. ${t}`:""}`,Error),ei.ERR_INVALID_PACKAGE_TARGET=ec("ERR_INVALID_PACKAGE_TARGET",(e,r,t,n=!1,s)=>{let o="string"==typeof t&&!n&&t.length>0&&!t.startsWith("./");return"."===r?(v(!1===n),`Invalid "exports" main target ${JSON.stringify(t)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${o?'; targets must start with "./"':""}`):`Invalid "${n?"imports":"exports"}" target ${JSON.stringify(t)} defined for '${r}' in the package config ${e}package.json${s?` imported from ${s}`:""}${o?'; targets must start with "./"':""}`},Error),ei.ERR_MODULE_NOT_FOUND=ec("ERR_MODULE_NOT_FOUND",(e,r,t=!1)=>`Cannot find ${t?"module":"package"} '${e}' imported from ${r}`,Error),ei.ERR_NETWORK_IMPORT_DISALLOWED=ec("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),ei.ERR_PACKAGE_IMPORT_NOT_DEFINED=ec("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,r,t)=>`Package import specifier "${e}" is not defined${r?` in package ${r}package.json`:""} imported from ${t}`,TypeError),ei.ERR_PACKAGE_PATH_NOT_EXPORTED=ec("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,r,t)=>"."===r?`No "exports" main defined in ${e}package.json${t?` imported from ${t}`:""}`:`Package subpath '${r}' is not defined by "exports" in ${e}package.json${t?` imported from ${t}`:""}`,Error),ei.ERR_UNSUPPORTED_DIR_IMPORT=ec("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),ei.ERR_UNSUPPORTED_RESOLVE_REQUEST=ec("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),ei.ERR_UNKNOWN_FILE_EXTENSION=ec("ERR_UNKNOWN_FILE_EXTENSION",(e,r)=>`Unknown file extension "${e}" for ${r}`,TypeError),ei.ERR_INVALID_ARG_VALUE=ec("ERR_INVALID_ARG_VALUE",(e,r,t="is invalid")=>{let n=_.inspect(r);n.length>128&&(n=`${n.slice(0,128)}...`);let s=e.includes(".")?"property":"argument";return`The ${s} '${e}' ${t}. Received ${n}`},TypeError);const eu=function(e){let r="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:r}),e}(function(r){let t=ep();return t&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(r),t&&(Error.stackTraceLimit=e),r}),ef={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:em}=ei,ed=new Map;function ey(e,{base:r,specifier:t}){let n;let o=ed.get(e);if(o)return o;try{n=s.readFileSync(i.toNamespacedPath(e),"utf8")}catch(e){if("ENOENT"!==e.code)throw e}let l={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(void 0!==n){let s;try{s=JSON.parse(n)}catch(s){let n=new em(e,(r?`"${t}" from `:"")+a.fileURLToPath(r||t),s.message);throw n.cause=s,n}l.exists=!0,ef.call(s,"name")&&"string"==typeof s.name&&(l.name=s.name),ef.call(s,"main")&&"string"==typeof s.main&&(l.main=s.main),ef.call(s,"exports")&&(l.exports=s.exports),ef.call(s,"imports")&&(l.imports=s.imports),ef.call(s,"type")&&("commonjs"===s.type||"module"===s.type)&&(l.type=s.type)}return ed.set(e,l),l}function eg(e){let r=new URL("package.json",e);for(;!r.pathname.endsWith("node_modules/package.json");){let t=ey(a.fileURLToPath(r),{specifier:e});if(t.exists)return t;let n=r;if((r=new URL("../package.json",r)).pathname===n.pathname)break}return{pjsonPath:a.fileURLToPath(r),exists:!1,type:"none"}}const{ERR_UNKNOWN_FILE_EXTENSION:eh}=ei,ew={}.hasOwnProperty,ek={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},eb={__proto__:null,"data:":function(e){let{1:r}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return r&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(r)?"module":"application/json"===r?"json":null},"file:":function(e,r,t){let n=function(e){let r=e.pathname,t=r.length;for(;t--;){let e=r.codePointAt(t);if(47===e)break;if(46===e)return 47===r.codePointAt(t-1)?"":r.slice(t)}return""}(e);if(".js"===n){let r=eg(e).type;return"none"!==r?r:"commonjs"}if(""===n){let r=eg(e).type;return"none"===r||"commonjs"===r?"commonjs":"module"}let s=ek[n];if(s)return s;if(!t)throw new eh(n,a.fileURLToPath(e))},"http:":ej,"https:":ej,"node:":()=>"builtin"};function ej(){}const ex=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:eR,ERR_INVALID_MODULE_SPECIFIER:ev,ERR_INVALID_PACKAGE_CONFIG:eE,ERR_INVALID_PACKAGE_TARGET:e_,ERR_MODULE_NOT_FOUND:eL,ERR_PACKAGE_IMPORT_NOT_DEFINED:eT,ERR_PACKAGE_PATH_NOT_EXPORTED:eP,ERR_UNSUPPORTED_DIR_IMPORT:eO,ERR_UNSUPPORTED_RESOLVE_REQUEST:e$}=ei,eU={}.hasOwnProperty,eI=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,eS=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,eD=/^\.|%|\\/,eN=/\*/g,eA=/%2f|%5c/i,eC=new Set,eq=/[/\\]{2}/;function eF(e,r,t,n,s,i,l){if(o.noDeprecation)return;let c=a.fileURLToPath(n),p=null!==eq.exec(l?e:r);o.emitWarning(`Use of deprecated ${p?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${r}" ${r===t?"":`matched to "${t}" `}in the "${s?"imports":"exports"}" field module resolution of the package at ${c}${i?` imported from ${a.fileURLToPath(i)}`:""}.`,"DeprecationWarning","DEP0166")}function eW(e,r,t,n){if(o.noDeprecation||"module"!==function(e,r){let t=e.protocol;return ew.call(eb,t)&&eb[t](e,r,!0)||null}(e,{parentURL:t.href}))return;let s=a.fileURLToPath(e.href),l=a.fileURLToPath(new a.URL(".",r)),c=a.fileURLToPath(t);n?i.resolve(l,n)!==s&&o.emitWarning(`Package ${l} has a "main" field set to "${n}", excluding the full filename and extension to the resolved file at "${s.slice(l.length)}", imported from ${c}.
|
|
2
|
-
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):o.emitWarning(`No "main" or "exports" field defined in the package.json for ${l} resolving the main entry point "${s.slice(l.length)}", imported from ${c}.
|
|
3
|
-
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function eM(e){try{return s.statSync(e)}catch{}}function eG(e){let r=s.statSync(e,{throwIfNoEntry:!1}),t=r?r.isFile():void 0;return null!=t&&t}function eV(e,r,t){return new eP(a.fileURLToPath(new a.URL(".",r)),e,t&&a.fileURLToPath(t))}function eB(e,r,t,n,s){return r="object"==typeof r&&null!==r?JSON.stringify(r,null,""):`${r}`,new e_(a.fileURLToPath(new a.URL(".",t)),e,r,n,s&&a.fileURLToPath(s))}function eJ(e,r,t,n,s,o,i,l,c){if("string"==typeof r)return function(e,r,t,n,s,o,i,l,c){if(""!==r&&!o&&"/"!==e[e.length-1])throw eB(t,e,n,i,s);if(!e.startsWith("./")){if(i&&!e.startsWith("../")&&!e.startsWith("/")){let t=!1;try{new a.URL(e),t=!0}catch{}if(!t)return ez(o?ex.call(eN,e,()=>r):e+r,n,c)}throw eB(t,e,n,i,s)}if(null!==eI.exec(e.slice(2))){if(null===eS.exec(e.slice(2))){if(!l){let a=o?t.replace("*",()=>r):t+r;eF(o?ex.call(eN,e,()=>r):e,a,t,n,i,s,!0)}}else throw eB(t,e,n,i,s)}let p=new a.URL(e,n),u=p.pathname,f=new a.URL(".",n).pathname;if(!u.startsWith(f))throw eB(t,e,n,i,s);if(""===r)return p;if(null!==eI.exec(r)){let c=o?t.replace("*",()=>r):t+r;null===eS.exec(r)?l||eF(o?ex.call(eN,e,()=>r):e,c,t,n,i,s,!1):function(e,r,t,n,s){throw new ev(e,`request is not a valid match in pattern "${r}" for the "${n?"imports":"exports"}" resolution of ${a.fileURLToPath(t)}`,s&&a.fileURLToPath(s))}(c,t,n,i,s)}return o?new a.URL(ex.call(eN,p.href,()=>r)):new a.URL(r,p)}(r,t,n,e,s,o,i,l,c);if(Array.isArray(r)){let a;if(0===r.length)return null;let p=-1;for(;++p<r.length;){let u;let f=r[p];try{u=eJ(e,f,t,n,s,o,i,l,c)}catch(e){if(a=e,"ERR_INVALID_PACKAGE_TARGET"===e.code)continue;throw e}if(void 0!==u){if(null===u){a=null;continue}return u}}if(null==a)return null;throw a}if("object"==typeof r&&null!==r){let p=Object.getOwnPropertyNames(r),u=-1;for(;++u<p.length;)if(function(e){let r=Number(e);return`${r}`===e&&r>=0&&r<4294967295}(p[u]))throw new eE(a.fileURLToPath(e),s,'"exports" cannot contain numeric property keys.');for(u=-1;++u<p.length;){let a=p[u];if("default"===a||c&&c.has(a)){let p=eJ(e,r[a],t,n,s,o,i,l,c);if(void 0===p)continue;return p}}return null}if(null===r)return null;throw eB(n,r,e,i,s)}function eK(e,r,t,n,s){let i=t.exports;if(function(e,r,t){if("string"==typeof e||Array.isArray(e))return!0;if("object"!=typeof e||null===e)return!1;let n=Object.getOwnPropertyNames(e),s=!1,o=0,i=-1;for(;++i<n.length;){let e=n[i],l=""===e||"."!==e[0];if(0==o++)s=l;else if(s!==l)throw new eE(a.fileURLToPath(r),t,"\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.")}return s}(i,e,n)&&(i={".":i}),eU.call(i,r)&&!r.includes("*")&&!r.endsWith("/")){let t=eJ(e,i[r],"",r,n,!1,!1,!1,s);if(null==t)throw eV(r,e,n);return t}let l="",c="",p=Object.getOwnPropertyNames(i),u=-1;for(;++u<p.length;){let t=p[u],s=t.indexOf("*");if(-1!==s&&r.startsWith(t.slice(0,s))){r.endsWith("/")&&function(e,r,t){if(o.noDeprecation)return;let n=a.fileURLToPath(r);eC.has(n+"|"+e)||(eC.add(n+"|"+e),o.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${n}${t?` imported from ${a.fileURLToPath(t)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}(r,e,n);let i=t.slice(s+1);r.length>=t.length&&r.endsWith(i)&&1===eX(l,t)&&t.lastIndexOf("*")===s&&(l=t,c=r.slice(s,r.length-i.length))}}if(l){let t=eJ(e,i[l],c,l,n,!0,!1,r.endsWith("/"),s);if(null==t)throw eV(r,e,n);return t}throw eV(r,e,n)}function eX(e,r){let t=e.indexOf("*"),n=r.indexOf("*"),s=-1===t?e.length:t+1,o=-1===n?r.length:n+1;return s>o?-1:o>s||-1===t?1:-1===n||e.length>r.length?-1:r.length>e.length?1:0}function ez(e,r,t){let n;if(R.builtinModules.includes(e))return new a.URL("node:"+e);let{packageName:s,packageSubpath:o,isScoped:i}=function(e,r){let t=e.indexOf("/"),n=!0,s=!1;"@"===e[0]&&(s=!0,-1===t||0===e.length?n=!1:t=e.indexOf("/",t+1));let o=-1===t?e:e.slice(0,t);if(null!==eD.exec(o)&&(n=!1),!n)throw new ev(e,"is not a valid package name",a.fileURLToPath(r));return{packageName:o,packageSubpath:"."+(-1===t?"":e.slice(t)),isScoped:s}}(e,r),l=eg(r);if(l.exists){let e=a.pathToFileURL(l.pjsonPath);if(l.name===s&&void 0!==l.exports&&null!==l.exports)return eK(e,o,l,r,t)}let c=new a.URL("./node_modules/"+s+"/package.json",r),p=a.fileURLToPath(c);do{let l=eM(p.slice(0,-13));if(!l||!l.isDirectory()){n=p,c=new a.URL((i?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",c),p=a.fileURLToPath(c);continue}let u=ey(p,{base:r,specifier:e});if(void 0!==u.exports&&null!==u.exports)return eK(c,o,u,r,t);if("."===o)return function(e,r,t){let n;if(void 0!==r.main){if(eG(n=new a.URL(r.main,e)))return n;let s=[`./${r.main}.js`,`./${r.main}.json`,`./${r.main}.node`,`./${r.main}/index.js`,`./${r.main}/index.json`,`./${r.main}/index.node`],o=-1;for(;++o<s.length&&!eG(n=new a.URL(s[o],e));)n=void 0;if(n)return eW(n,e,t,r.main),n}let s=["./index.js","./index.json","./index.node"],o=-1;for(;++o<s.length&&!eG(n=new a.URL(s[o],e));)n=void 0;if(n)return eW(n,e,t,r.main),n;throw new eL(a.fileURLToPath(new a.URL(".",e)),a.fileURLToPath(t))}(c,u,r);return new a.URL(o,c)}while(p.length!==n.length);throw new eL(s,a.fileURLToPath(r),!1)}function eH(e){return"string"!=typeof e||e.startsWith("file://")?et(a.fileURLToPath(e)):et(e)}function eY(e){return a.pathToFileURL(eH(e)).toString()}const eQ=/* @__PURE__ */new Set(["node","import"]),eZ=[".mjs",".cjs",".js",".json"],e0=/* @__PURE__ */new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function e1(e,r,t){try{return function(e,r,t,n){var o;let l;let c=r.protocol;if(o=e,""!==o&&("/"===o[0]||"."===o[0]&&(1===o.length||"/"===o[1]||"."===o[1]&&(2===o.length||"/"===o[2]))))try{l=new a.URL(e,r)}catch(n){let t=new e$(e,r);throw t.cause=n,t}else if("file:"===c&&"#"===e[0])l=function(e,r,t){var n;let s;if("#"===e||e.startsWith("#/")||e.endsWith("/"))throw new ev(e,"is not a valid internal imports specifier name",a.fileURLToPath(r));let o=eg(r);if(o.exists){s=a.pathToFileURL(o.pjsonPath);let n=o.imports;if(n){if(eU.call(n,e)&&!e.includes("*")){let o=eJ(s,n[e],"",e,r,!1,!0,!1,t);if(null!=o)return o}else{let o="",i="",a=Object.getOwnPropertyNames(n),l=-1;for(;++l<a.length;){let r=a[l],t=r.indexOf("*");if(-1!==t&&e.startsWith(r.slice(0,-1))){let n=r.slice(t+1);e.length>=r.length&&e.endsWith(n)&&1===eX(o,r)&&r.lastIndexOf("*")===t&&(o=r,i=e.slice(t,e.length-n.length))}}if(o){let e=eJ(s,n[o],i,o,r,!0,!0,!1,t);if(null!=e)return e}}}}throw n=s,new eT(e,n&&a.fileURLToPath(new a.URL(".",n)),a.fileURLToPath(r))}(e,r,t);else try{l=new a.URL(e)}catch(n){if(("data:"===c||"http:"===c||"https:"===c)&&!R.builtinModules.includes(e)){let t=new e$(e,r);throw t.cause=n,t}l=ez(e,r,t)}return(v(void 0!==l,"expected to be defined"),"file:"!==l.protocol)?l:function(e,r,t){let n;if(null!==eA.exec(e.pathname))throw new ev(e.pathname,'must not include encoded "/" or "\\" characters',a.fileURLToPath(r));try{n=a.fileURLToPath(e)}catch(t){throw Object.defineProperty(t,"input",{value:String(e)}),Object.defineProperty(t,"module",{value:String(r)}),t}let o=eM(n.endsWith("/")?n.slice(-1):n);if(o&&o.isDirectory()){let t=new eO(n,a.fileURLToPath(r));throw t.url=String(e),t}if(!o||!o.isFile()){let t=new eL(n||e.pathname,r&&a.fileURLToPath(r),!0);throw t.url=String(e),t}{let r=s.realpathSync(n),{search:t,hash:o}=e;(e=a.pathToFileURL(r+(n.endsWith(i.sep)?"/":""))).search=t,e.hash=o}return e}(l,r)}(e,r,t)}catch(e){if(!e0.has(e?.code))throw e}}function e4(e,r={}){"auto"!==r.platform&&r.platform||(r.platform="win32"===o.platform?"win32":"posix");let t=eH(function(e,r={}){var t;let n;if("string"!=typeof e){if(e instanceof URL)e=eH(e);else throw TypeError("input must be a `string` or `URL`")}if(/(node|data|http|https):/.test(e))return e;if(er.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=eH(e)),t=e,ee.test(t))try{if(s.statSync(e).isFile())return eY(e)}catch(e){if(e?.code!=="ENOENT")throw e}let o=r.conditions?new Set(r.conditions):eQ,i=(Array.isArray(r.url)?r.url:[r.url]).filter(Boolean).map(e=>{var r;return new URL(("string"!=typeof(r=e.toString())&&(r=r.toString()),/(node|data|http|https|file):/.test(r))?r:er.has(r)?"node:"+r:"file://"+encodeURI(et(r)))});0===i.length&&i.push(new URL(eY(process.cwd())));let a=[...i];for(let e of i)"file:"===e.protocol&&a.push(new URL("./",e),new URL(Z(e.pathname,"_index.js"),e),new URL("node_modules",e));for(let t of a){if(n=e1(e,t,o))break;for(let s of["","/index"]){for(let i of r.extensions||eZ)if(n=e1(e+s+i,t,o))break;if(n)break}if(n)break}if(!n){let r=Error(`Cannot find module ${e} imported from ${a.join(", ")}`);throw r.code="ERR_MODULE_NOT_FOUND",r}return eY(n)}(e,{url:r.paths}));return"win32"===r.platform?i.win32.normalize(t):t}function e5(e,r={}){return!!function(e,r={}){try{return e4(`${e}/package.json`,r)}catch{}try{return e4(e,r)}catch(e){return"MODULE_NOT_FOUND"!==e.code&&"ERR_MODULE_NOT_FOUND"!==e.code&&console.error(e),!1}}(e,r)}const e2=async e=>{if(!P.isCI&&o.stdout.isTTY&&!e5(e)){let{confirm:r}=await Promise.resolve().then(function(){return require("./vendor-DekA__rQ.cjs")}).then(function(e){return e.i});await r({message:`Package is required for this config: ${e}. Do you want to install it?`})&&await Promise.resolve().then(function(){return require("./vendor-DekA__rQ.cjs")}).then(function(e){return e.a}).then(r=>r.installPackage(e,{dev:!0}))}return r(e)};function e6(e,r=!1){return"boolean"==typeof e?e:void 0===e?r:!!e.enable||r}function e3(e,...r){if("boolean"==typeof e||void 0===e)return;let{enable:t,...n}=e;return r.length?T.defu(n,...r):n}function e7(e){e5(e)&&console.error(L.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`))}const e8=async(e,...r)=>{let t=[];e7("@eslint-sukka/js"),e7("@eslint-sukka/json"),e7("@eslint-sukka/ts"),e7("@eslint-sukka/legacy");let n=e6(e?.ts,e5("typescript"));t.push(N(e?.ignores),A()),e6(e?.js,!0)&&t.push(W(e3(e?.js)),C({typescript:n}),q()),e6(e?.json,!0)&&t.push(V()),n&&t.push(H(e3(e?.ts)));let s=e5("next"),o=e6(e?.react,s||e5("react")||e5("@types/react"));if(o){if(n){let r=await e2("@eslint-sukka/react"),n=e5("@remix-run/node")||e5("@remix-run/react")||e5("@remix-run/serve")||e5("@remix-run/dev");t.push(r.react(e3(e?.react,{nextjs:s,remix:n,reactRefresh:{allowConstantExport:e5("vite")},reactCompiler:e5("babel-plugin-react-compiler")||e5("react-compiler-webpack")?"error":"off"}))),e6(e?.next,s)&&t.push(r.next()),e6(e?.stylex,e5("@stylexjs/stylex")||e5("stylex-webpack"))&&t.push(r.stylex(e3(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.")}return e6(e?.node,e5("@types/node")||e5("@types/bun"))&&t.push((await e2("@eslint-sukka/node")).node({...e3(e?.node),hasTypeScript:n,hasReact:o})),e6(e?.legacy)&&t.push(Y(e3(e?.legacy))),t.push(r),t.flat()};Object.defineProperty(exports,"constants",{enumerable:!0,get:function(){return n.constants}}),exports.ignores=N,exports.sukka=e8;
|
|
1
|
+
"use strict";const e=e=>Promise.resolve(require(e));var r,s=require("@eslint-sukka/shared"),t=require("node:fs"),n=require("node:process"),o=require("node:path");require("node:fs/promises");var i=require("node:url"),a=require("@eslint-community/eslint-plugin-eslint-comments"),l=require("eslint-plugin-sukka"),c=require("eslint-plugin-promise"),p=require("eslint-plugin-regexp"),u=require("@eslint/js"),f=require("@stylistic/eslint-plugin-js"),m=require("@stylistic/eslint-plugin-plus"),y=require("eslint-plugin-unused-imports"),d=require("eslint-plugin-import-x"),g=require("eslint-plugin-autofix"),k=require("eslint-plugin-jsonc"),w=require("jsonc-eslint-parser"),b=require("typescript-eslint"),h=require("@stylistic/eslint-plugin-ts"),j=require("local-pkg"),x=require("picocolors"),v=require("defu"),E=require("ci-info"),P="undefined"!=typeof document?document.currentScript:null,S=(r=Object.create(null),p&&Object.keys(p).forEach(function(e){if("default"!==e){var s=Object.getOwnPropertyDescriptor(p,e);Object.defineProperty(r,e,s.get?s:{enumerable:!0,get:function(){return p[e]}})}}),r.default=p,Object.freeze(r));const C=e=>e instanceof URL?i.fileURLToPath(e):e;var T=function(e){let r=e.startsWith("!"),s=r?"!":"",t=(r?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(t))return`${s}${t}`;let n=t.indexOf("/"),o=n<0||n===t.length-1?"**/":"",i=(0===n?t.slice(1):t).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=t.endsWith("/**")?"/*":"";return`${s}${o}${i}${a}`};const L=".gitignore";function O(e={}){let r=[],{root:s=!1,files:i=s?L:function(e,{cwd:r=n.cwd(),type:s="file",stopAt:i}={}){let a=o.resolve(C(r)??""),{root:l}=o.parse(a);for(i=o.resolve(a,C(i)??l);a&&a!==i&&a!==l;){let r=o.isAbsolute(e)?e:o.join(a,e);try{let e=t.statSync(r,{throwIfNoEntry:!1});if("file"===s&&e?.isFile()||"directory"===s&&e?.isDirectory())return r}catch{}a=o.dirname(a)}}(L)||[],strict:a=!0,cwd:l=n.cwd()}=e,c=Array.isArray(i)?i:[i];for(let e of c){let s="";try{s=t.readFileSync(e,"utf8")}catch(e){if(a)throw e;continue}let n=o.relative(l,o.dirname(e)).replaceAll("\\","/"),i=s.split(/\r?\n/u).filter(e=>e&&!e.startsWith("#")).map(e=>T(e)).map(e=>(function(e,r,s){if(["",".","/"].includes(r))return e;let t=e.startsWith("!")?"!":"",n=t?e.slice(1):e;if(r.endsWith("/")||(r=`${r}/`),!r.startsWith(".."))return`${t}${r}${n}`;if(!r.match(/^(\.\.\/)+$/))throw Error("The ignore file location should be either a parent or child directory");if(n.startsWith("**"))return e;let i=o.relative(o.resolve(s,r),s).split(/[/\\]/);for(;i.length&&n.startsWith(`${i[0]}/`);)n=n.slice(i[0].length+1),i.shift();return n.startsWith("**")||0===i.length?`${t}${n}`:null})(e,n,l)).filter(e=>null!==e);r.push(...i)}if(a&&0===c.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:r}}const q=(e={})=>{let{customGlobs:r=null,gitignore:t=[".gitignore"]}=e,n=[],o=[];return!1===r||null===r?o=s.constants.GLOB_EXCLUDE:"function"==typeof r?o=r(s.constants.GLOB_EXCLUDE):"string"==typeof r?o.push(...s.constants.GLOB_EXCLUDE,r):Array.isArray(r)&&o.push(...s.constants.GLOB_EXCLUDE,...r),n.push({ignores:o}),!1===t||null===t||(!0===t?n.push(O({files:[".gitignore"],strict:!1})):("string"==typeof t||Array.isArray(t))&&n.push(O({files:t,strict:!1}))),n},R=()=>[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":a,sukka:s.memo(l,"eslint-plugin-sukka")},rules:{"sukka/ban-eslint-disable":["error","allow-with-description"],"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error"}}],_=({typescript:e})=>[{name:"sukka/promise",plugins:{promise:c},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn"}}],I=()=>[{name:"sukka/regexp",plugins:{sukka:s.memo(l,"eslint-plugin-sukka"),regexp:s.memo(S,"eslint-plugin-regexp")},rules:{"sukka/unicorn/better-regex":"error",...p.configs["flat/recommended"].rules,"regexp/strict":"off"}}],D=[".js",".jsx",".mjs",".cjs"],A=(e={})=>{let{files:r,disableNoConsoleInCLI:t=!0,env:n={}}=e,{browser:o=!0,webextensions:i=!1,greasemonkey:a=!1,customGlobals:c={}}=n,p=e.module??s.getPackageJson()?.type==="module",k=[{name:"@eslint/js recommended",...u.configs.recommended},{linterOptions:{reportUnusedDisableDirectives:!0}},{name:"@eslint-sukka/js base",...r?{files:r}:{},languageOptions:{ecmaVersion:"latest",sourceType:p?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:p?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...s.globals.es2025,...o&&s.globals.browser,...i&&s.globals.webextensions,...a&&s.globals.greasemonkey,...c}},settings:{"import-x/parsers":{espree:D},"import-x/extensions":D},plugins:{"unused-imports":s.memo(y,"eslint-plugin-unused-imports"),"@stylistic/js":s.memo(f,"@stylistic/eslint-plugin-js"),"@stylistic/plus":s.memo(m,"@stylistic/eslint-plugin-plus"),sukka:s.memo(l,"eslint-plugin-sukka"),"import-x":s.memo(d,"eslint-plugin-import-x"),autofix:g},rules:{...d.configs.recommended.rules,"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],"@stylistic/js/dot-location":["error","property"],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"off","autofix/no-caller":"error","no-constructor-return":"error","no-else-return":["error",{allowElseIf:!1}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","@stylistic/js/no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"off","autofix/no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,r])=>["global","globalThis","window","self"].map(s=>({object:s,property:e,message:`Please use ${r} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-return-await":"off","sukka/no-return-await":"error","no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"off","no-useless-catch":"off","autofix/no-useless-catch":"error","no-useless-concat":"off","autofix/no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"off","autofix/radix":"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error","@stylistic/js/wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":"warn","no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","@stylistic/js/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":"off","autofix/valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"off","autofix/no-new-native-nonconstructor":"error","@stylistic/js/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/js/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/js/no-confusing-arrow":["error",{allowParens:!0}],"no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error","@stylistic/js/template-curly-spacing":["error","never"],"@stylistic/js/yield-star-spacing":["error","before"],"@stylistic/js/array-bracket-newline":["off","consistent"],"@stylistic/js/array-bracket-spacing":["error","never"],"@stylistic/js/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/js/block-spacing":["error","always"],"@stylistic/js/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"@stylistic/js/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/js/computed-property-spacing":["error","never"],"consistent-this":"off","@stylistic/js/eol-last":["error","always"],"@stylistic/js/func-call-spacing":["error","never"],"@stylistic/js/function-call-argument-newline":["off","consistent"],"@stylistic/js/function-paren-newline":["error","consistent"],"@stylistic/js/implicit-arrow-linebreak":["error","beside"],"@stylistic/js/indent":["error",2,{SwitchCase:1}],"@stylistic/plus/indent-binary-ops":["error",2],"@stylistic/js/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/linebreak-style":"error","@stylistic/js/lines-around-comment":"off","@stylistic/js/lines-around-directive":"off","@stylistic/js/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/js/multiline-ternary":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"@stylistic/js/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/js/new-parens":"error","no-bitwise":"off","no-lonely-if":"error","sukka/unicorn/no-lonely-if":"error","@stylistic/js/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/js/no-mixed-spaces-and-tabs":"error","no-multi-assign":"error","@stylistic/js/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","sukka/unicorn/no-negated-condition":"warn","no-nested-ternary":"off","sukka/unicorn/no-nested-ternary":"warn","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","@stylistic/js/no-spaced-func":"off","@stylistic/js/no-tabs":"error","no-ternary":"off","@stylistic/js/no-trailing-spaces":"error","no-unneeded-ternary":"error","@stylistic/js/no-whitespace-before-property":"error","@stylistic/js/nonblock-statement-body-position":"error","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","prefer-exponentiation-operator":"error","@stylistic/js/operator-linebreak":["error","before"],"@stylistic/js/padded-blocks":["error","never"],"@stylistic/js/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":["error","single"],"@stylistic/js/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/jsx-quotes":["error","prefer-double"],"@stylistic/js/rest-spread-spacing":["error","never"],"@stylistic/js/semi":["error","always"],"@stylistic/js/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/js/semi-style":["error","last"],"@stylistic/js/space-before-blocks":"error","@stylistic/js/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-in-parens":["error","never"],"@stylistic/js/space-infix-ops":"error","@stylistic/js/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/js/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/js/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/js/template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"@stylistic/js/wrap-regex":"off","no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","sukka/no-expression-empty-lines":"error","sukka/array/no-unneeded-flat-map":"error","sukka/browser/prefer-location-assign":"warn","sukka/jsx/no-template-literal":"error","sukka/jsx/no-unneeded-nested":"error","sukka/string/no-locale-case":"warn","sukka/string/no-simple-template-literal":"error","sukka/type/no-instanceof-wrapper":"error","sukka/unicode/no-bidi":"warn","sukka/unicode/no-invisible":"warn","sukka/no-redundant-variable":"error","sukka/no-single-return":"error","sukka/prefer-early-return":["error",{maximumStatements:16}],"sukka/prefer-fetch":"error","sukka/prefer-timer-id":"warn","sukka/unicorn/catch-error-name":["error",{ignore:[/^(?:e|err|error|\w+Err|\w+Error)[\d_]?$/]}],"sukka/unicorn/custom-error-definition":"error","sukka/unicorn/require-array-join-separator":"warn","sukka/unicorn/no-thenable":"error","sukka/unicorn/no-invalid-remove-event-listener":"error","sukka/unicorn/consistent-function-scoping":"warn","sukka/unicorn/prefer-event-target":"warn","sukka/unicorn/prefer-keyboard-event-key":"warn","sukka/unicorn/prefer-text-content":"warn","sukka/unicorn/no-console-spaces":"warn","sukka/unicorn/no-empty-file":"warn","sukka/unicorn/no-useless-fallback-in-spread":"warn","sukka/unicorn/no-useless-length-check":"warn","sukka/unicorn/no-useless-promise-resolve-reject":"warn","sukka/unicorn/no-zero-fractions":"warn","sukka/unicorn/prefer-export-from":["warn",{ignoreUsedVariables:!0}],"sukka/unicorn/prefer-native-coercion-functions":"warn","sukka/unicorn/prefer-negative-index":"warn","sukka/unicorn/no-document-cookie":"error","sukka/unicorn/prefer-add-event-listener":"warn","sukka/unicorn/prefer-array-index-of":"warn","sukka/unicorn/prefer-blob-reading-methods":"warn","sukka/unicorn/prefer-date-now":"warn","sukka/unicorn/prefer-dom-node-dataset":"warn","sukka/unicorn/prefer-modern-math-apis":"warn","sukka/unicorn/number-literal-case":"error","sukka/unicorn/prefer-number-properties":["warn",{checkInfinity:!1}],"sukka/unicorn/prefer-reflect-apply":"warn","sukka/unicorn/prefer-set-size":"warn","sukka/unicorn/prefer-string-replace-all":"warn","sukka/unicorn/prefer-string-slice":"warn","sukka/unicorn/prefer-string-trim-start-end":"warn","sukka/unicorn/no-unreadable-iife":"warn","sukka/unicorn/throw-new-error":"warn","sukka/unicorn/escape-case":"warn","sukka/unicorn/no-hex-escape":"warn","sukka/unicorn/prefer-prototype-methods":"warn","sukka/unicorn/error-message":"error","sukka/unicorn/no-instanceof-array":"error","sukka/unicorn/prefer-type-error":"error","sukka/unicorn/consistent-destructuring":"warn","sukka/unicorn/new-for-builtins":"warn","sukka/unicorn/no-array-push-push":"warn","sukka/unicorn/no-static-only-class":"warn","sukka/unicorn/no-unreadable-array-destructuring":"error","sukka/unicorn/no-useless-spread":"error","sukka/unicorn/no-useless-switch-case":"warn","sukka/unicorn/no-useless-undefined":["error",{checkArguments:!1}],"sukka/unicorn/numeric-separators-style":["warn",{onlyIfContainsSeparator:!1,number:{minimumDigits:7,groupLength:3},binary:{minimumDigits:9,groupLength:4},octal:{minimumDigits:9,groupLength:4},hexadecimal:{minimumDigits:5,groupLength:2}}],"sukka/unicorn/prefer-array-find":"warn","sukka/unicorn/prefer-array-flat-map":"warn","sukka/unicorn/prefer-array-flat":"warn","sukka/unicorn/prefer-array-some":"warn","sukka/unicorn/prefer-code-point":"warn","sukka/unicorn/prefer-default-parameters":"warn","sukka/unicorn/prefer-logical-operator-over-ternary":"warn","sukka/unicorn/prefer-optional-catch-binding":"error","sukka/unicorn/prefer-regexp-test":"warn","sukka/unicorn/prefer-set-has":"error","sukka/unicorn/prefer-switch":"warn","sukka/unicorn/require-number-to-fixed-digits-argument":"warn","sukka/import-dedupe":"error","sukka/unicorn/prefer-string-raw":"warn","sukka/unicorn/no-single-promise-in-promise-methods":"error","sukka/unicorn/no-await-in-promise-methods":"error","sukka/unicorn/no-magic-array-flat-depth":"error","sukka/unicorn/no-object-as-default-parameter":"error","sukka/unicorn/template-indent":["warn",{tags:["outdent","dedent","gql","sql","html","styled","css"],functions:["dedent","stripIndent","strip_indent","stripTags","striptags","strip_tags","stripHtml","stripHTML","strip_html"],selectors:[],comments:["HTML","html","CSS","css","indent"]}],"sukka/unicorn/no-negation-in-equality-check":"error","sukka/unicorn/no-length-as-slice-end":"error","no-restricted-imports":["error",{paths:s.RESTRICTED_IMPORT_JS}],"no-prototype-builtins":"off","autofix/no-prototype-builtins":"error"}}];if(!1!==t){let e="boolean"==typeof t?null:Array.isArray(t)?t:[t];k.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${s.constants.GLOB_SRC}`,`**/cli/${s.constants.GLOB_SRC}`,`**/cli.${s.constants.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return k},U={plugins:{jsonc:s.memo(k,"eslint-plugin-jsonc")},languageOptions:{parser:w}},F={"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"},N=()=>[...k.configs["flat/base"],{name:"@eslint-sukka/json json",files:[s.constants.GLOB_JSON],rules:{...k.configs["flat/recommended-with-json"].reduce((e,r)=>({...e,...r.rules}),{}),...F}},{name:"@eslint-sukka/json json5",...U,files:[s.constants.GLOB_JSON5],rules:{...k.configs["flat/recommended-with-json5"].reduce((e,r)=>({...e,...r.rules}),{}),...F}},{name:"@eslint-sukka/json jsonc",...U,files:[s.constants.GLOB_JSONC],rules:{...k.configs["flat/recommended-with-jsonc"].reduce((e,r)=>({...e,...r.rules}),{}),...F}},{name:"@eslint-sukka/json package.json",...U,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...U,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}],$={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":"error","no-return-await":"off","@typescript-eslint/return-await":"error","sukka/no-return-await":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@stylistic/js/no-extra-parens":"off","@stylistic/ts/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@stylistic/js/block-spacing":"off","@stylistic/ts/block-spacing":["error","always"],"@stylistic/js/brace-style":"off","@stylistic/ts/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:"off","@stylistic/js/comma-dangle":"off","@stylistic/ts/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":"off","@stylistic/ts/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/func-call-spacing":"off","@stylistic/ts/func-call-spacing":["error","never"],"@stylistic/js/indent":"off","@stylistic/ts/indent":["error",2,{SwitchCase:1}],"@stylistic/js/key-spacing":"off","@stylistic/ts/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":"off","@stylistic/ts/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/lines-around-comment":"off","@stylistic/ts/lines-around-comment":"off","@stylistic/js/lines-between-class-members":"off","@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@stylistic/js/object-curly-newline":"off","@stylistic/ts/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/ts/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/ts/object-property-newline":"off","@stylistic/js/padding-line-between-statements":"off","@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":"off","@stylistic/ts/quotes":["error","single"],"@stylistic/js/quote-props":"off","@stylistic/ts/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/semi":"off","@stylistic/ts/semi":["error","always"],"@stylistic/js/space-before-blocks":"off","@stylistic/ts/space-before-blocks":"error","@stylistic/js/space-before-function-paren":"off","@stylistic/ts/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-infix-ops":"off","@stylistic/ts/space-infix-ops":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-imports":"off"},M=[".js",".jsx",".mjs",".cjs"],B=[".ts",".cts",".mts",".tsx",".d.ts"],W=[...B,...M],G=[".ts",".cts",".mts",".tsx",...M],V=(e={})=>{let{tsconfigPath:r=!0,tsconfigRootDir:t=n.cwd(),componentExtentions:o=[]}=e,a="string"==typeof __dirname?i.pathToFileURL(__dirname).href:"undefined"==typeof document?require("url").pathToFileURL(__filename).href:P&&P.src||new URL("index.cjs",document.baseURI).href,l=i.fileURLToPath(s.importMetaResolve("@typescript-eslint/parser",a)),c=i.fileURLToPath(s.importMetaResolve("eslint-import-resolver-ts-bundled",a));return[{name:"@eslint-sukka/ts base",files:[s.constants.GLOB_TS,s.constants.GLOB_TSX,...o.map(e=>`**/*.${e}`)],plugins:{...b.configs.base.plugins,"@stylistic/ts":s.memo(h,"@stylistic/eslint-plugin-ts"),"@stylistic/plus":s.memo(m,"@stylistic/eslint-plugin-plus"),"import-x":s.memo(d,"eslint-plugin-import-x")},languageOptions:{parser:b.configs.base.languageOptions.parser,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===r?{projectService:!0,allowDefaultProject:[]}:{project:r},tsconfigRootDir:t,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":W,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver":{node:{extensions:G},[c]:{alwaysTryTypes:!0,...!0===r?{}:{project:r}}},"import-x/parsers":{espree:M,[l]:B}},rules:{...b.configs.base.rules,...b.configs.recommendedTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...b.configs.stylisticTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...d.configs.typescript.rules,...$,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"@typescript-eslint/no-restricted-imports":["error",{paths:s.RESTRICTED_IMPORT_TS}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, you don't have to use React.FC to annotate it. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-enum-comparison":"warn","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-unnecessary-template-expression":"warn","no-restricted-syntax":["error",{message:'Unnecessary "as const"',selector:"VariableDeclarator > TSAsExpression[expression.properties.length=0] > TSTypeReference > Identifier[name=const]"},{message:'Unnecessary "as const"',selector:"VariableDeclarator[id.typeAnnotation] > TSAsExpression > TSTypeReference > Identifier[name=const]"},{message:'Static class methods requires "this: void"',selector:"MethodDefinition[static=true] > FunctionExpression:not([params.0.name=this][params.0.typeAnnotation.typeAnnotation.type=TSVoidKeyword])"}],"@stylistic/ts/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/ts/type-annotation-spacing":["error",{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0},operator:{before:!0,after:!0}}}],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":"off","sukka/string/prefer-string-starts-ends-with":"error","@typescript-eslint/switch-exhaustiveness-check":"error","sukka/string/no-unneeded-to-string":"error","sukka/type/no-force-cast-via-top-type":"error","sukka/type/no-wrapper-type-reference":"error","sukka/no-default-error":"off","sukka/no-export-const-enum":"error","@stylistic/plus/type-generic-spacing":"error","@stylistic/plus/type-named-tuple-spacing":"error","@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":"error","import-x/named":"off","import-x/no-duplicates":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off"}},{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":s.memo(d,"eslint-plugin-import-x")},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:b.configs.base.plugins,rules:{"@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-var-requires":"off"}}]},J=(e={})=>[{name:"@eslint-sukka/legacy base",...e.files?{files:e.files}:{},plugins:{sukka:s.memo(l,"eslint-plugin-sukka")},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off"},languageOptions:{globals:{...e.browser??!0?s.globals.browser:{},...e.node?s.globals.node:{}}}}],X=async r=>{if(!E.isCI&&n.stdout.isTTY&&!j.isPackageExists(r)){let{confirm:e}=await Promise.resolve().then(function(){return require("./vendor-DekA__rQ.cjs")}).then(function(e){return e.i});await e({message:`Package is required for this config: ${r}. Do you want to install it?`})&&await Promise.resolve().then(function(){return require("./vendor-DekA__rQ.cjs")}).then(function(e){return e.a}).then(e=>e.installPackage(r,{dev:!0}))}return e(r)};function z(e,r=!1){return"boolean"==typeof e?e:void 0===e?r:!!e.enable||r}function H(e,...r){if("boolean"==typeof e||void 0===e)return;let{enable:s,...t}=e;return r.length?v.defu(t,...r):t}function K(e){j.isPackageExists(e)&&console.error(x.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`))}const Q=async(e,...r)=>{let s=[];K("@eslint-sukka/js"),K("@eslint-sukka/json"),K("@eslint-sukka/ts"),K("@eslint-sukka/legacy");let t=z(e?.ts,j.isPackageExists("typescript"));s.push(q(e?.ignores),R()),z(e?.js,!0)&&s.push(A(H(e?.js)),_({typescript:t}),I()),z(e?.json,!0)&&s.push(N()),t&&s.push(V(H(e?.ts)));let n=j.isPackageExists("next"),o=z(e?.react,n||j.isPackageExists("react")||j.isPackageExists("@types/react"));if(o){if(t){let r=await X("@eslint-sukka/react"),t=j.isPackageExists("@remix-run/node")||j.isPackageExists("@remix-run/react")||j.isPackageExists("@remix-run/serve")||j.isPackageExists("@remix-run/dev");s.push(r.react(H(e?.react,{nextjs:n,remix:t,reactRefresh:{allowConstantExport:j.isPackageExists("vite")},reactCompiler:j.isPackageExists("babel-plugin-react-compiler")||j.isPackageExists("react-compiler-webpack")?"error":"off"}))),z(e?.next,n)&&s.push(r.next()),z(e?.stylex,j.isPackageExists("@stylexjs/stylex")||j.isPackageExists("stylex-webpack"))&&s.push(r.stylex(H(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.")}return z(e?.node,j.isPackageExists("@types/node")||j.isPackageExists("@types/bun"))&&s.push((await X("@eslint-sukka/node")).node({...H(e?.node),hasTypeScript:t,hasReact:o})),z(e?.legacy)&&s.push(J(H(e?.legacy))),s.push(r),s.flat()};Object.defineProperty(exports,"constants",{enumerable:!0,get:function(){return s.constants}}),exports.ignores=q,exports.sukka=Q;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
let e;let r=e=>import(e);import{constants as t,memo as n,getPackageJson as s,globals as o,RESTRICTED_IMPORT_JS as i,importMetaResolve as a,RESTRICTED_IMPORT_TS as l}from"@eslint-sukka/shared";export{constants}from"@eslint-sukka/shared";import c,{statSync as p,realpathSync as u}from"node:fs";import f from"node:process";import m,{win32 as d}from"node:path";import"node:fs/promises";import{fileURLToPath as y,pathToFileURL as g,URL as h}from"node:url";import w from"@eslint-community/eslint-plugin-eslint-comments";import k from"eslint-plugin-sukka";import b from"eslint-plugin-promise";import*as j from"eslint-plugin-regexp";import{configs as x}from"eslint-plugin-regexp";import v from"@eslint/js";import E from"@stylistic/eslint-plugin-js";import _ from"@stylistic/eslint-plugin-plus";import R from"eslint-plugin-unused-imports";import O from"eslint-plugin-import-x";import $ from"eslint-plugin-autofix";import T from"eslint-plugin-jsonc";import P from"jsonc-eslint-parser";import L from"eslint-plugin-sukka-ts";import{configs as I}from"typescript-eslint";import N from"@stylistic/eslint-plugin-ts";import"acorn";import{builtinModules as D}from"node:module";import S from"node:assert";import A from"node:v8";import{format as C,inspect as U}from"node:util";import F from"picocolors";import{defu as W}from"defu";import{isCI as M}from"ci-info";let G=e=>e instanceof URL?y(e):e;var q=function(e){let r=e.startsWith("!"),t=r?"!":"",n=(r?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(n))return`${t}${n}`;let s=n.indexOf("/"),o=s<0||s===n.length-1?"**/":"",i=(0===s?n.slice(1):n).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=n.endsWith("/**")?"/*":"";return`${t}${o}${i}${a}`};let V=".gitignore";function B(e={}){let r=[],{root:t=!1,files:n=t?V:function(e,{cwd:r=f.cwd(),type:t="file",stopAt:n}={}){let s=m.resolve(G(r)??""),{root:o}=m.parse(s);for(n=m.resolve(s,G(n)??o);s&&s!==n&&s!==o;){let r=m.isAbsolute(e)?e:m.join(s,e);try{let e=c.statSync(r,{throwIfNoEntry:!1});if("file"===t&&e?.isFile()||"directory"===t&&e?.isDirectory())return r}catch{}s=m.dirname(s)}}(V)||[],strict:s=!0,cwd:o=f.cwd()}=e,i=Array.isArray(n)?n:[n];for(let e of i){let t="";try{t=c.readFileSync(e,"utf8")}catch(e){if(s)throw e;continue}let n=m.relative(o,m.dirname(e)).replaceAll("\\","/"),i=t.split(/\r?\n/u).filter(e=>e&&!e.startsWith("#")).map(e=>q(e)).map(e=>(function(e,r,t){if(["",".","/"].includes(r))return e;let n=e.startsWith("!")?"!":"",s=n?e.slice(1):e;if(r.endsWith("/")||(r=`${r}/`),!r.startsWith(".."))return`${n}${r}${s}`;if(!r.match(/^(\.\.\/)+$/))throw Error("The ignore file location should be either a parent or child directory");if(s.startsWith("**"))return e;let o=m.relative(m.resolve(t,r),t).split(/[/\\]/);for(;o.length&&s.startsWith(`${o[0]}/`);)s=s.slice(o[0].length+1),o.shift();return s.startsWith("**")||0===o.length?`${n}${s}`:null})(e,n,o)).filter(e=>null!==e);r.push(...i)}if(s&&0===i.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:r}}let K=(e={})=>{let{customGlobs:r=null,gitignore:n=[".gitignore"]}=e,s=[],o=[];return!1===r||null===r?o=t.GLOB_EXCLUDE:"function"==typeof r?o=r(t.GLOB_EXCLUDE):"string"==typeof r?o.push(...t.GLOB_EXCLUDE,r):Array.isArray(r)&&o.push(...t.GLOB_EXCLUDE,...r),s.push({ignores:o}),!1===n||null===n||(!0===n?s.push(B({files:[".gitignore"],strict:!1})):("string"==typeof n||Array.isArray(n))&&s.push(B({files:n,strict:!1}))),s},J=()=>[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":w,sukka:n(k,"eslint-plugin-sukka")},rules:{"sukka/ban-eslint-disable":["error","allow-with-description"],"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error"}}],X=({typescript:e})=>[{name:"sukka/promise",plugins:{promise:b},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn"}}],H=()=>[{name:"sukka/regexp",plugins:{sukka:n(k,"eslint-plugin-sukka"),regexp:n(j,"eslint-plugin-regexp")},rules:{"sukka/unicorn/better-regex":"error",...x["flat/recommended"].rules,"regexp/strict":"off"}}],z=[".js",".jsx",".mjs",".cjs"],Y=(e={})=>{let{files:r,disableNoConsoleInCLI:a=!0,env:l={}}=e,{browser:c=!0,webextensions:p=!1,greasemonkey:u=!1,customGlobals:f={}}=l,m=e.module??s()?.type==="module",d=[{name:"@eslint/js recommended",...v.configs.recommended},{linterOptions:{reportUnusedDisableDirectives:!0}},{name:"@eslint-sukka/js base",...r?{files:r}:{},languageOptions:{ecmaVersion:"latest",sourceType:m?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:m?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...o.es2025,...c&&o.browser,...p&&o.webextensions,...u&&o.greasemonkey,...f}},settings:{"import-x/parsers":{espree:z},"import-x/extensions":z},plugins:{"unused-imports":n(R,"eslint-plugin-unused-imports"),"@stylistic/js":n(E,"@stylistic/eslint-plugin-js"),"@stylistic/plus":n(_,"@stylistic/eslint-plugin-plus"),sukka:n(k,"eslint-plugin-sukka"),"import-x":n(O,"eslint-plugin-import-x"),autofix:$},rules:{...O.configs.recommended.rules,"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],"@stylistic/js/dot-location":["error","property"],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"off","autofix/no-caller":"error","no-constructor-return":"error","no-else-return":["error",{allowElseIf:!1}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","@stylistic/js/no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"off","autofix/no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,r])=>["global","globalThis","window","self"].map(t=>({object:t,property:e,message:`Please use ${r} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-return-await":"off","sukka/no-return-await":"error","no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"off","no-useless-catch":"off","autofix/no-useless-catch":"error","no-useless-concat":"off","autofix/no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"off","autofix/radix":"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error","@stylistic/js/wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":"warn","no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","@stylistic/js/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":"off","autofix/valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"off","autofix/no-new-native-nonconstructor":"error","@stylistic/js/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/js/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/js/no-confusing-arrow":["error",{allowParens:!0}],"no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error","@stylistic/js/template-curly-spacing":["error","never"],"@stylistic/js/yield-star-spacing":["error","before"],"@stylistic/js/array-bracket-newline":["off","consistent"],"@stylistic/js/array-bracket-spacing":["error","never"],"@stylistic/js/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/js/block-spacing":["error","always"],"@stylistic/js/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"@stylistic/js/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/js/computed-property-spacing":["error","never"],"consistent-this":"off","@stylistic/js/eol-last":["error","always"],"@stylistic/js/func-call-spacing":["error","never"],"@stylistic/js/function-call-argument-newline":["off","consistent"],"@stylistic/js/function-paren-newline":["error","consistent"],"@stylistic/js/implicit-arrow-linebreak":["error","beside"],"@stylistic/js/indent":["error",2,{SwitchCase:1}],"@stylistic/plus/indent-binary-ops":["error",2],"@stylistic/js/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/linebreak-style":"error","@stylistic/js/lines-around-comment":"off","@stylistic/js/lines-around-directive":"off","@stylistic/js/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/js/multiline-ternary":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"@stylistic/js/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/js/new-parens":"error","no-bitwise":"off","no-lonely-if":"error","sukka/unicorn/no-lonely-if":"error","@stylistic/js/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/js/no-mixed-spaces-and-tabs":"error","no-multi-assign":"error","@stylistic/js/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","sukka/unicorn/no-negated-condition":"warn","no-nested-ternary":"off","sukka/unicorn/no-nested-ternary":"warn","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","@stylistic/js/no-spaced-func":"off","@stylistic/js/no-tabs":"error","no-ternary":"off","@stylistic/js/no-trailing-spaces":"error","no-unneeded-ternary":"error","@stylistic/js/no-whitespace-before-property":"error","@stylistic/js/nonblock-statement-body-position":"error","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","prefer-exponentiation-operator":"error","@stylistic/js/operator-linebreak":["error","before"],"@stylistic/js/padded-blocks":["error","never"],"@stylistic/js/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":["error","single"],"@stylistic/js/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/jsx-quotes":["error","prefer-double"],"@stylistic/js/rest-spread-spacing":["error","never"],"@stylistic/js/semi":["error","always"],"@stylistic/js/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/js/semi-style":["error","last"],"@stylistic/js/space-before-blocks":"error","@stylistic/js/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-in-parens":["error","never"],"@stylistic/js/space-infix-ops":"error","@stylistic/js/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/js/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/js/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/js/template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"@stylistic/js/wrap-regex":"off","no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","sukka/array/no-unneeded-flat-map":"error","sukka/browser/prefer-location-assign":"warn","sukka/jsx/no-template-literal":"error","sukka/jsx/no-unneeded-nested":"error","sukka/string/no-locale-case":"warn","sukka/string/no-simple-template-literal":"error","sukka/type/no-instanceof-wrapper":"error","sukka/unicode/no-bidi":"warn","sukka/unicode/no-invisible":"warn","sukka/no-redundant-variable":"error","sukka/no-single-return":"error","sukka/prefer-early-return":["error",{maximumStatements:16}],"sukka/prefer-fetch":"error","sukka/prefer-timer-id":"warn","sukka/unicorn/catch-error-name":["error",{ignore:[/^(?:e|err|error|\w+Err|\w+Error)[\d_]?$/]}],"sukka/unicorn/custom-error-definition":"error","sukka/unicorn/require-array-join-separator":"warn","sukka/unicorn/no-thenable":"error","sukka/unicorn/no-invalid-remove-event-listener":"error","sukka/unicorn/consistent-function-scoping":"warn","sukka/unicorn/prefer-event-target":"warn","sukka/unicorn/prefer-keyboard-event-key":"warn","sukka/unicorn/prefer-text-content":"warn","sukka/unicorn/no-console-spaces":"warn","sukka/unicorn/no-empty-file":"warn","sukka/unicorn/no-useless-fallback-in-spread":"warn","sukka/unicorn/no-useless-length-check":"warn","sukka/unicorn/no-useless-promise-resolve-reject":"warn","sukka/unicorn/no-zero-fractions":"warn","sukka/unicorn/prefer-export-from":["warn",{ignoreUsedVariables:!0}],"sukka/unicorn/prefer-native-coercion-functions":"warn","sukka/unicorn/prefer-negative-index":"warn","sukka/unicorn/no-document-cookie":"error","sukka/unicorn/prefer-add-event-listener":"warn","sukka/unicorn/prefer-array-index-of":"warn","sukka/unicorn/prefer-blob-reading-methods":"warn","sukka/unicorn/prefer-date-now":"warn","sukka/unicorn/prefer-dom-node-dataset":"warn","sukka/unicorn/prefer-modern-math-apis":"warn","sukka/unicorn/number-literal-case":"error","sukka/unicorn/prefer-number-properties":["warn",{checkInfinity:!1}],"sukka/unicorn/prefer-reflect-apply":"warn","sukka/unicorn/prefer-set-size":"warn","sukka/unicorn/prefer-string-replace-all":"warn","sukka/unicorn/prefer-string-slice":"warn","sukka/unicorn/prefer-string-trim-start-end":"warn","sukka/unicorn/no-unreadable-iife":"warn","sukka/unicorn/throw-new-error":"warn","sukka/unicorn/escape-case":"warn","sukka/unicorn/no-hex-escape":"warn","sukka/unicorn/prefer-prototype-methods":"warn","sukka/unicorn/error-message":"error","sukka/unicorn/no-instanceof-array":"error","sukka/unicorn/prefer-type-error":"error","sukka/unicorn/consistent-destructuring":"warn","sukka/unicorn/new-for-builtins":"warn","sukka/unicorn/no-array-push-push":"warn","sukka/unicorn/no-static-only-class":"warn","sukka/unicorn/no-unreadable-array-destructuring":"error","sukka/unicorn/no-useless-spread":"error","sukka/unicorn/no-useless-switch-case":"warn","sukka/unicorn/no-useless-undefined":["error",{checkArguments:!1}],"sukka/unicorn/numeric-separators-style":["warn",{onlyIfContainsSeparator:!1,number:{minimumDigits:7,groupLength:3},binary:{minimumDigits:9,groupLength:4},octal:{minimumDigits:9,groupLength:4},hexadecimal:{minimumDigits:5,groupLength:2}}],"sukka/unicorn/prefer-array-find":"warn","sukka/unicorn/prefer-array-flat-map":"warn","sukka/unicorn/prefer-array-flat":"warn","sukka/unicorn/prefer-array-some":"warn","sukka/unicorn/prefer-code-point":"warn","sukka/unicorn/prefer-default-parameters":"warn","sukka/unicorn/prefer-logical-operator-over-ternary":"warn","sukka/unicorn/prefer-optional-catch-binding":"error","sukka/unicorn/prefer-regexp-test":"warn","sukka/unicorn/prefer-set-has":"error","sukka/unicorn/prefer-switch":"warn","sukka/unicorn/require-number-to-fixed-digits-argument":"warn","sukka/import-dedupe":"error","sukka/unicorn/prefer-string-raw":"warn","sukka/unicorn/no-single-promise-in-promise-methods":"error","sukka/unicorn/no-await-in-promise-methods":"error","sukka/unicorn/no-magic-array-flat-depth":"error","sukka/unicorn/no-object-as-default-parameter":"error","sukka/unicorn/template-indent":["warn",{tags:["outdent","dedent","gql","sql","html","styled","css"],functions:["dedent","stripIndent","strip_indent","stripTags","striptags","strip_tags","stripHtml","stripHTML","strip_html"],selectors:[],comments:["HTML","html","CSS","css","indent"]}],"sukka/unicorn/no-negation-in-equality-check":"error","sukka/unicorn/no-length-as-slice-end":"error","no-restricted-imports":["error",{paths:i}],"no-prototype-builtins":"off","autofix/no-prototype-builtins":"error"}}];if(!1!==a){let e="boolean"==typeof a?null:Array.isArray(a)?a:[a];d.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${t.GLOB_SRC}`,`**/cli/${t.GLOB_SRC}`,`**/cli.${t.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return d},Q={plugins:{jsonc:n(T,"eslint-plugin-jsonc")},languageOptions:{parser:P}},Z={"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"},ee=()=>[...T.configs["flat/base"],{name:"@eslint-sukka/json json",files:[t.GLOB_JSON],rules:{...T.configs["flat/recommended-with-json"].reduce((e,r)=>({...e,...r.rules}),{}),...Z}},{name:"@eslint-sukka/json json5",...Q,files:[t.GLOB_JSON5],rules:{...T.configs["flat/recommended-with-json5"].reduce((e,r)=>({...e,...r.rules}),{}),...Z}},{name:"@eslint-sukka/json jsonc",...Q,files:[t.GLOB_JSONC],rules:{...T.configs["flat/recommended-with-jsonc"].reduce((e,r)=>({...e,...r.rules}),{}),...Z}},{name:"@eslint-sukka/json package.json",...Q,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...Q,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}],er={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":"error","no-return-await":"off","@typescript-eslint/return-await":"error","sukka/no-return-await":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@stylistic/js/no-extra-parens":"off","@stylistic/ts/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@stylistic/js/block-spacing":"off","@stylistic/ts/block-spacing":["error","always"],"@stylistic/js/brace-style":"off","@stylistic/ts/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:"off","@stylistic/js/comma-dangle":"off","@stylistic/ts/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":"off","@stylistic/ts/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/func-call-spacing":"off","@stylistic/ts/func-call-spacing":["error","never"],"@stylistic/js/indent":"off","@stylistic/ts/indent":["error",2,{SwitchCase:1}],"@stylistic/js/key-spacing":"off","@stylistic/ts/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":"off","@stylistic/ts/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/lines-around-comment":"off","@stylistic/ts/lines-around-comment":"off","@stylistic/js/lines-between-class-members":"off","@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@stylistic/js/object-curly-newline":"off","@stylistic/ts/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/ts/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/ts/object-property-newline":"off","@stylistic/js/padding-line-between-statements":"off","@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":"off","@stylistic/ts/quotes":["error","single"],"@stylistic/js/quote-props":"off","@stylistic/ts/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/semi":"off","@stylistic/ts/semi":["error","always"],"@stylistic/js/space-before-blocks":"off","@stylistic/ts/space-before-blocks":"error","@stylistic/js/space-before-function-paren":"off","@stylistic/ts/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-infix-ops":"off","@stylistic/ts/space-infix-ops":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-imports":"off"},et=[".js",".jsx",".mjs",".cjs"],en=[".ts",".cts",".mts",".tsx",".d.ts"],es=[...en,...et],eo=[".ts",".cts",".mts",".tsx",...et],ei=(e={})=>{let{tsconfigPath:r=!0,tsconfigRootDir:s=f.cwd(),componentExtentions:o=[]}=e,i="string"==typeof __dirname?g(__dirname).href:import.meta.url,c=y(a("@typescript-eslint/parser",i)),p=y(a("eslint-import-resolver-ts-bundled",i));return[{name:"@eslint-sukka/ts base",files:[t.GLOB_TS,t.GLOB_TSX,...o.map(e=>`**/*.${e}`)],plugins:{...I.base.plugins,"@stylistic/ts":n(N,"@stylistic/eslint-plugin-ts"),"sukka-ts":n(L,"eslint-plugin-sukka-ts"),"@stylistic/plus":n(_,"@stylistic/eslint-plugin-plus"),"import-x":n(O,"eslint-plugin-import-x")},languageOptions:{parser:I.base.languageOptions.parser,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===r?{projectService:!0,allowDefaultProject:[]}:{project:r},tsconfigRootDir:s,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":es,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver":{node:{extensions:eo},[p]:{alwaysTryTypes:!0,...!0===r?{}:{project:r}}},"import-x/parsers":{espree:et,[c]:en}},rules:{...I.base.rules,...I.recommendedTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...I.stylisticTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...O.configs.typescript.rules,...er,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"@typescript-eslint/no-restricted-imports":["error",{paths:l}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, you don't have to use React.FC to annotate it. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-enum-comparison":"warn","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@stylistic/ts/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/ts/type-annotation-spacing":["error",{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0},operator:{before:!0,after:!0}}}],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":"off","sukka-ts/string/prefer-string-starts-ends-with":"error","@typescript-eslint/switch-exhaustiveness-check":"error","sukka-ts/string/no-unneeded-to-string":"error","sukka-ts/type/no-force-cast-via-top-type":"error","sukka-ts/type/no-wrapper-type-reference":"error","sukka-ts/no-default-error":"off","sukka-ts/no-export-const-enum":"error","@stylistic/plus/type-generic-spacing":"error","@stylistic/plus/type-named-tuple-spacing":"error","@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":"error","import-x/named":"off","import-x/no-duplicates":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off"}},{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":n(O,"eslint-plugin-import-x")},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:I.base.plugins,rules:{"@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-var-requires":"off"}}]},ea=(e={})=>[{name:"@eslint-sukka/legacy base",...e.files?{files:e.files}:{},plugins:{sukka:n(k,"eslint-plugin-sukka")},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off"},languageOptions:{globals:{...e.browser??!0?o.browser:{},...e.node?o.node:{}}}}],el=/^\.?\//;var ec=function(e,...r){let t=e||"";for(let e of r.filter(e=>e&&"/"!==e))if(t){let r=e.replace(el,"");t=function(e="",r){return e.endsWith("/")?e:e+"/"}(t)+r}else t=e;return t};let ep=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,eu=new Set(D);function ef(e){return e.replace(/\\/g,"/")}let em={}.hasOwnProperty,ed=/^([A-Z][a-z\d]*)+$/,ey=new Set(["string","function","number","object","Function","Object","boolean","bigint","symbol"]),eg={};function eh(e,r="and"){return e.length<3?e.join(` ${r} `):`${e.slice(0,-1).join(", ")}, ${r} ${e[e.length-1]}`}let ew=new Map;function ek(e,r,t){return ew.set(e,r),function(...r){let n=Error.stackTraceLimit;eb()&&(Error.stackTraceLimit=0);let s=new t;eb()&&(Error.stackTraceLimit=n);let o=function(e,r,t){let n=ew.get(e);if(S(void 0!==n,"expected `message` to be found"),"function"==typeof n)return S(n.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${n.length}).`),Reflect.apply(n,t,r);let s=/%[dfijoOs]/g,o=0;for(;null!==s.exec(n);)o++;return(S(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),0===r.length)?n:(r.unshift(n),Reflect.apply(C,null,r))}(e,r,s);return Object.defineProperties(s,{message:{value:o,enumerable:!1,writable:!0,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},enumerable:!1,writable:!0,configurable:!0}}),ej(s),s.code=e,s}}function eb(){try{if(A.startupSnapshot.isBuildingSnapshot())return!1}catch{}let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===e?Object.isExtensible(Error):em.call(e,"writable")&&void 0!==e.writable?e.writable:void 0!==e.set}eg.ERR_INVALID_ARG_TYPE=ek("ERR_INVALID_ARG_TYPE",(e,r,t)=>{S("string"==typeof e,"'name' must be a string"),Array.isArray(r)||(r=[r]);let n="The ";if(e.endsWith(" argument"))n+=`${e} `;else{let r=e.includes(".")?"property":"argument";n+=`"${e}" ${r} `}n+="must be ";let s=[],o=[],i=[];for(let e of r)S("string"==typeof e,"All expected entries have to be of type string"),ey.has(e)?s.push(e.toLowerCase()):null===ed.exec(e)?(S("object"!==e,'The value "object" should be written as "Object"'),i.push(e)):o.push(e);if(o.length>0){let e=s.indexOf("object");-1!==e&&(s.slice(e,1),o.push("Object"))}return s.length>0&&(n+=`${s.length>1?"one of type":"of type"} ${eh(s,"or")}`,(o.length>0||i.length>0)&&(n+=" or ")),o.length>0&&(n+=`an instance of ${eh(o,"or")}`,i.length>0&&(n+=" or ")),i.length>0&&(i.length>1?n+=`one of ${eh(i,"or")}`:(i[0].toLowerCase()!==i[0]&&(n+="an "),n+=`${i[0]}`)),n+=`. Received ${function(e){if(null==e)return String(e);if("function"==typeof e&&e.name)return`function ${e.name}`;if("object"==typeof e)return e.constructor&&e.constructor.name?`an instance of ${e.constructor.name}`:`${U(e,{depth:-1})}`;let r=U(e,{colors:!1});return r.length>28&&(r=`${r.slice(0,25)}...`),`type ${typeof e} (${r})`}(t)}`},TypeError),eg.ERR_INVALID_MODULE_SPECIFIER=ek("ERR_INVALID_MODULE_SPECIFIER",(e,r,t)=>`Invalid module "${e}" ${r}${t?` imported from ${t}`:""}`,TypeError),eg.ERR_INVALID_PACKAGE_CONFIG=ek("ERR_INVALID_PACKAGE_CONFIG",(e,r,t)=>`Invalid package config ${e}${r?` while importing ${r}`:""}${t?`. ${t}`:""}`,Error),eg.ERR_INVALID_PACKAGE_TARGET=ek("ERR_INVALID_PACKAGE_TARGET",(e,r,t,n=!1,s)=>{let o="string"==typeof t&&!n&&t.length>0&&!t.startsWith("./");return"."===r?(S(!1===n),`Invalid "exports" main target ${JSON.stringify(t)} defined in the package config ${e}package.json${s?` imported from ${s}`:""}${o?'; targets must start with "./"':""}`):`Invalid "${n?"imports":"exports"}" target ${JSON.stringify(t)} defined for '${r}' in the package config ${e}package.json${s?` imported from ${s}`:""}${o?'; targets must start with "./"':""}`},Error),eg.ERR_MODULE_NOT_FOUND=ek("ERR_MODULE_NOT_FOUND",(e,r,t=!1)=>`Cannot find ${t?"module":"package"} '${e}' imported from ${r}`,Error),eg.ERR_NETWORK_IMPORT_DISALLOWED=ek("ERR_NETWORK_IMPORT_DISALLOWED","import of '%s' by %s is not supported: %s",Error),eg.ERR_PACKAGE_IMPORT_NOT_DEFINED=ek("ERR_PACKAGE_IMPORT_NOT_DEFINED",(e,r,t)=>`Package import specifier "${e}" is not defined${r?` in package ${r}package.json`:""} imported from ${t}`,TypeError),eg.ERR_PACKAGE_PATH_NOT_EXPORTED=ek("ERR_PACKAGE_PATH_NOT_EXPORTED",(e,r,t)=>"."===r?`No "exports" main defined in ${e}package.json${t?` imported from ${t}`:""}`:`Package subpath '${r}' is not defined by "exports" in ${e}package.json${t?` imported from ${t}`:""}`,Error),eg.ERR_UNSUPPORTED_DIR_IMPORT=ek("ERR_UNSUPPORTED_DIR_IMPORT","Directory import '%s' is not supported resolving ES modules imported from %s",Error),eg.ERR_UNSUPPORTED_RESOLVE_REQUEST=ek("ERR_UNSUPPORTED_RESOLVE_REQUEST",'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',TypeError),eg.ERR_UNKNOWN_FILE_EXTENSION=ek("ERR_UNKNOWN_FILE_EXTENSION",(e,r)=>`Unknown file extension "${e}" for ${r}`,TypeError),eg.ERR_INVALID_ARG_VALUE=ek("ERR_INVALID_ARG_VALUE",(e,r,t="is invalid")=>{let n=U(r);n.length>128&&(n=`${n.slice(0,128)}...`);let s=e.includes(".")?"property":"argument";return`The ${s} '${e}' ${t}. Received ${n}`},TypeError);let ej=function(e){let r="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:r}),e}(function(r){let t=eb();return t&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY),Error.captureStackTrace(r),t&&(Error.stackTraceLimit=e),r}),ex={}.hasOwnProperty,{ERR_INVALID_PACKAGE_CONFIG:ev}=eg,eE=new Map;function e_(e,{base:r,specifier:t}){let n;let s=eE.get(e);if(s)return s;try{n=c.readFileSync(m.toNamespacedPath(e),"utf8")}catch(e){if("ENOENT"!==e.code)throw e}let o={exists:!1,pjsonPath:e,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};if(void 0!==n){let s;try{s=JSON.parse(n)}catch(s){let n=new ev(e,(r?`"${t}" from `:"")+y(r||t),s.message);throw n.cause=s,n}o.exists=!0,ex.call(s,"name")&&"string"==typeof s.name&&(o.name=s.name),ex.call(s,"main")&&"string"==typeof s.main&&(o.main=s.main),ex.call(s,"exports")&&(o.exports=s.exports),ex.call(s,"imports")&&(o.imports=s.imports),ex.call(s,"type")&&("commonjs"===s.type||"module"===s.type)&&(o.type=s.type)}return eE.set(e,o),o}function eR(e){let r=new URL("package.json",e);for(;!r.pathname.endsWith("node_modules/package.json");){let t=e_(y(r),{specifier:e});if(t.exists)return t;let n=r;if((r=new URL("../package.json",r)).pathname===n.pathname)break}return{pjsonPath:y(r),exists:!1,type:"none"}}let{ERR_UNKNOWN_FILE_EXTENSION:eO}=eg,e$={}.hasOwnProperty,eT={__proto__:null,".cjs":"commonjs",".js":"module",".json":"json",".mjs":"module"},eP={__proto__:null,"data:":function(e){let{1:r}=/^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname)||[null,null,null];return r&&/\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(r)?"module":"application/json"===r?"json":null},"file:":function(e,r,t){let n=function(e){let r=e.pathname,t=r.length;for(;t--;){let e=r.codePointAt(t);if(47===e)break;if(46===e)return 47===r.codePointAt(t-1)?"":r.slice(t)}return""}(e);if(".js"===n){let r=eR(e).type;return"none"!==r?r:"commonjs"}if(""===n){let r=eR(e).type;return"none"===r||"commonjs"===r?"commonjs":"module"}let s=eT[n];if(s)return s;if(!t)throw new eO(n,y(e))},"http:":eL,"https:":eL,"node:":()=>"builtin"};function eL(){}let eI=RegExp.prototype[Symbol.replace],{ERR_NETWORK_IMPORT_DISALLOWED:eN,ERR_INVALID_MODULE_SPECIFIER:eD,ERR_INVALID_PACKAGE_CONFIG:eS,ERR_INVALID_PACKAGE_TARGET:eA,ERR_MODULE_NOT_FOUND:eC,ERR_PACKAGE_IMPORT_NOT_DEFINED:eU,ERR_PACKAGE_PATH_NOT_EXPORTED:eF,ERR_UNSUPPORTED_DIR_IMPORT:eW,ERR_UNSUPPORTED_RESOLVE_REQUEST:eM}=eg,eG={}.hasOwnProperty,eq=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i,eV=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i,eB=/^\.|%|\\/,eK=/\*/g,eJ=/%2f|%5c/i,eX=new Set,eH=/[/\\]{2}/;function ez(e,r,t,n,s,o,i){if(f.noDeprecation)return;let a=y(n),l=null!==eH.exec(i?e:r);f.emitWarning(`Use of deprecated ${l?"double slash":"leading or trailing slash matching"} resolving "${e}" for module request "${r}" ${r===t?"":`matched to "${t}" `}in the "${s?"imports":"exports"}" field module resolution of the package at ${a}${o?` imported from ${y(o)}`:""}.`,"DeprecationWarning","DEP0166")}function eY(e,r,t,n){if(f.noDeprecation||"module"!==function(e,r){let t=e.protocol;return e$.call(eP,t)&&eP[t](e,r,!0)||null}(e,{parentURL:t.href}))return;let s=y(e.href),o=y(new h(".",r)),i=y(t);n?m.resolve(o,n)!==s&&f.emitWarning(`Package ${o} has a "main" field set to "${n}", excluding the full filename and extension to the resolved file at "${s.slice(o.length)}", imported from ${i}.
|
|
2
|
-
Automatic extension resolution of the "main" field is deprecated for ES modules.`,"DeprecationWarning","DEP0151"):f.emitWarning(`No "main" or "exports" field defined in the package.json for ${o} resolving the main entry point "${s.slice(o.length)}", imported from ${i}.
|
|
3
|
-
Default "index" lookups for the main are deprecated for ES modules.`,"DeprecationWarning","DEP0151")}function eQ(e){try{return p(e)}catch{}}function eZ(e){let r=p(e,{throwIfNoEntry:!1}),t=r?r.isFile():void 0;return null!=t&&t}function e0(e,r,t){return new eF(y(new h(".",r)),e,t&&y(t))}function e1(e,r,t,n,s){return r="object"==typeof r&&null!==r?JSON.stringify(r,null,""):`${r}`,new eA(y(new h(".",t)),e,r,n,s&&y(s))}function e4(e,r,t,n,s,o,i,a,l){if("string"==typeof r)return function(e,r,t,n,s,o,i,a,l){if(""!==r&&!o&&"/"!==e[e.length-1])throw e1(t,e,n,i,s);if(!e.startsWith("./")){if(i&&!e.startsWith("../")&&!e.startsWith("/")){let t=!1;try{new h(e),t=!0}catch{}if(!t)return e6(o?eI.call(eK,e,()=>r):e+r,n,l)}throw e1(t,e,n,i,s)}if(null!==eq.exec(e.slice(2))){if(null===eV.exec(e.slice(2))){if(!a){let a=o?t.replace("*",()=>r):t+r;ez(o?eI.call(eK,e,()=>r):e,a,t,n,i,s,!0)}}else throw e1(t,e,n,i,s)}let c=new h(e,n),p=c.pathname,u=new h(".",n).pathname;if(!p.startsWith(u))throw e1(t,e,n,i,s);if(""===r)return c;if(null!==eq.exec(r)){let l=o?t.replace("*",()=>r):t+r;null===eV.exec(r)?a||ez(o?eI.call(eK,e,()=>r):e,l,t,n,i,s,!1):function(e,r,t,n,s){throw new eD(e,`request is not a valid match in pattern "${r}" for the "${n?"imports":"exports"}" resolution of ${y(t)}`,s&&y(s))}(l,t,n,i,s)}return o?new h(eI.call(eK,c.href,()=>r)):new h(r,c)}(r,t,n,e,s,o,i,a,l);if(Array.isArray(r)){let c;if(0===r.length)return null;let p=-1;for(;++p<r.length;){let u;let f=r[p];try{u=e4(e,f,t,n,s,o,i,a,l)}catch(e){if(c=e,"ERR_INVALID_PACKAGE_TARGET"===e.code)continue;throw e}if(void 0!==u){if(null===u){c=null;continue}return u}}if(null==c)return null;throw c}if("object"==typeof r&&null!==r){let c=Object.getOwnPropertyNames(r),p=-1;for(;++p<c.length;)if(function(e){let r=Number(e);return`${r}`===e&&r>=0&&r<4294967295}(c[p]))throw new eS(y(e),s,'"exports" cannot contain numeric property keys.');for(p=-1;++p<c.length;){let u=c[p];if("default"===u||l&&l.has(u)){let c=e4(e,r[u],t,n,s,o,i,a,l);if(void 0===c)continue;return c}}return null}if(null===r)return null;throw e1(n,r,e,i,s)}function e5(e,r,t,n,s){let o=t.exports;if(function(e,r,t){if("string"==typeof e||Array.isArray(e))return!0;if("object"!=typeof e||null===e)return!1;let n=Object.getOwnPropertyNames(e),s=!1,o=0,i=-1;for(;++i<n.length;){let e=n[i],a=""===e||"."!==e[0];if(0==o++)s=a;else if(s!==a)throw new eS(y(r),t,"\"exports\" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.")}return s}(o,e,n)&&(o={".":o}),eG.call(o,r)&&!r.includes("*")&&!r.endsWith("/")){let t=e4(e,o[r],"",r,n,!1,!1,!1,s);if(null==t)throw e0(r,e,n);return t}let i="",a="",l=Object.getOwnPropertyNames(o),c=-1;for(;++c<l.length;){let t=l[c],s=t.indexOf("*");if(-1!==s&&r.startsWith(t.slice(0,s))){r.endsWith("/")&&function(e,r,t){if(f.noDeprecation)return;let n=y(r);eX.has(n+"|"+e)||(eX.add(n+"|"+e),f.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${n}${t?` imported from ${y(t)}`:""}. Mapping specifiers ending in "/" is no longer supported.`,"DeprecationWarning","DEP0155"))}(r,e,n);let o=t.slice(s+1);r.length>=t.length&&r.endsWith(o)&&1===e2(i,t)&&t.lastIndexOf("*")===s&&(i=t,a=r.slice(s,r.length-o.length))}}if(i){let t=e4(e,o[i],a,i,n,!0,!1,r.endsWith("/"),s);if(null==t)throw e0(r,e,n);return t}throw e0(r,e,n)}function e2(e,r){let t=e.indexOf("*"),n=r.indexOf("*"),s=-1===t?e.length:t+1,o=-1===n?r.length:n+1;return s>o?-1:o>s||-1===t?1:-1===n||e.length>r.length?-1:r.length>e.length?1:0}function e6(e,r,t){let n;if(D.includes(e))return new h("node:"+e);let{packageName:s,packageSubpath:o,isScoped:i}=function(e,r){let t=e.indexOf("/"),n=!0,s=!1;"@"===e[0]&&(s=!0,-1===t||0===e.length?n=!1:t=e.indexOf("/",t+1));let o=-1===t?e:e.slice(0,t);if(null!==eB.exec(o)&&(n=!1),!n)throw new eD(e,"is not a valid package name",y(r));return{packageName:o,packageSubpath:"."+(-1===t?"":e.slice(t)),isScoped:s}}(e,r),a=eR(r);if(a.exists){let e=g(a.pjsonPath);if(a.name===s&&void 0!==a.exports&&null!==a.exports)return e5(e,o,a,r,t)}let l=new h("./node_modules/"+s+"/package.json",r),c=y(l);do{let a=eQ(c.slice(0,-13));if(!a||!a.isDirectory()){n=c,c=y(l=new h((i?"../../../../node_modules/":"../../../node_modules/")+s+"/package.json",l));continue}let p=e_(c,{base:r,specifier:e});if(void 0!==p.exports&&null!==p.exports)return e5(l,o,p,r,t);if("."===o)return function(e,r,t){let n;if(void 0!==r.main){if(eZ(n=new h(r.main,e)))return n;let s=[`./${r.main}.js`,`./${r.main}.json`,`./${r.main}.node`,`./${r.main}/index.js`,`./${r.main}/index.json`,`./${r.main}/index.node`],o=-1;for(;++o<s.length&&!eZ(n=new h(s[o],e));)n=void 0;if(n)return eY(n,e,t,r.main),n}let s=["./index.js","./index.json","./index.node"],o=-1;for(;++o<s.length&&!eZ(n=new h(s[o],e));)n=void 0;if(n)return eY(n,e,t,r.main),n;throw new eC(y(new h(".",e)),y(t))}(l,p,r);return new h(o,l)}while(c.length!==n.length);throw new eC(s,y(r),!1)}function e3(e){return"string"!=typeof e||e.startsWith("file://")?ef(y(e)):ef(e)}function e7(e){return g(e3(e)).toString()}let e8=/* @__PURE__ */new Set(["node","import"]),e9=[".mjs",".cjs",".js",".json"],re=/* @__PURE__ */new Set(["ERR_MODULE_NOT_FOUND","ERR_UNSUPPORTED_DIR_IMPORT","MODULE_NOT_FOUND","ERR_PACKAGE_PATH_NOT_EXPORTED"]);function rr(e,r,t){try{return function(e,r,t,n){var s;let o;let i=r.protocol;if(s=e,""!==s&&("/"===s[0]||"."===s[0]&&(1===s.length||"/"===s[1]||"."===s[1]&&(2===s.length||"/"===s[2]))))try{o=new h(e,r)}catch(n){let t=new eM(e,r);throw t.cause=n,t}else if("file:"===i&&"#"===e[0])o=function(e,r,t){var n;let s;if("#"===e||e.startsWith("#/")||e.endsWith("/"))throw new eD(e,"is not a valid internal imports specifier name",y(r));let o=eR(r);if(o.exists){s=g(o.pjsonPath);let n=o.imports;if(n){if(eG.call(n,e)&&!e.includes("*")){let o=e4(s,n[e],"",e,r,!1,!0,!1,t);if(null!=o)return o}else{let o="",i="",a=Object.getOwnPropertyNames(n),l=-1;for(;++l<a.length;){let r=a[l],t=r.indexOf("*");if(-1!==t&&e.startsWith(r.slice(0,-1))){let n=r.slice(t+1);e.length>=r.length&&e.endsWith(n)&&1===e2(o,r)&&r.lastIndexOf("*")===t&&(o=r,i=e.slice(t,e.length-n.length))}}if(o){let e=e4(s,n[o],i,o,r,!0,!0,!1,t);if(null!=e)return e}}}}throw n=s,new eU(e,n&&y(new h(".",n)),y(r))}(e,r,t);else try{o=new h(e)}catch(n){if(("data:"===i||"http:"===i||"https:"===i)&&!D.includes(e)){let t=new eM(e,r);throw t.cause=n,t}o=e6(e,r,t)}return(S(void 0!==o,"expected to be defined"),"file:"!==o.protocol)?o:function(e,r,t){let n;if(null!==eJ.exec(e.pathname))throw new eD(e.pathname,'must not include encoded "/" or "\\" characters',y(r));try{n=y(e)}catch(t){throw Object.defineProperty(t,"input",{value:String(e)}),Object.defineProperty(t,"module",{value:String(r)}),t}let s=eQ(n.endsWith("/")?n.slice(-1):n);if(s&&s.isDirectory()){let t=new eW(n,y(r));throw t.url=String(e),t}if(!s||!s.isFile()){let t=new eC(n||e.pathname,r&&y(r),!0);throw t.url=String(e),t}{let r=u(n),{search:t,hash:s}=e;(e=g(r+(n.endsWith(m.sep)?"/":""))).search=t,e.hash=s}return e}(o,r)}(e,r,t)}catch(e){if(!re.has(e?.code))throw e}}function rt(e,r={}){"auto"!==r.platform&&r.platform||(r.platform="win32"===f.platform?"win32":"posix");let t=e3(function(e,r={}){var t;let n;if("string"!=typeof e){if(e instanceof URL)e=e3(e);else throw TypeError("input must be a `string` or `URL`")}if(/(node|data|http|https):/.test(e))return e;if(eu.has(e))return"node:"+e;if(e.startsWith("file://")&&(e=e3(e)),t=e,ep.test(t))try{if(p(e).isFile())return e7(e)}catch(e){if(e?.code!=="ENOENT")throw e}let s=r.conditions?new Set(r.conditions):e8,o=(Array.isArray(r.url)?r.url:[r.url]).filter(Boolean).map(e=>{var r;return new URL(("string"!=typeof(r=e.toString())&&(r=r.toString()),/(node|data|http|https|file):/.test(r))?r:eu.has(r)?"node:"+r:"file://"+encodeURI(ef(r)))});0===o.length&&o.push(new URL(e7(process.cwd())));let i=[...o];for(let e of o)"file:"===e.protocol&&i.push(new URL("./",e),new URL(ec(e.pathname,"_index.js"),e),new URL("node_modules",e));for(let t of i){if(n=rr(e,t,s))break;for(let o of["","/index"]){for(let i of r.extensions||e9)if(n=rr(e+o+i,t,s))break;if(n)break}if(n)break}if(!n){let r=Error(`Cannot find module ${e} imported from ${i.join(", ")}`);throw r.code="ERR_MODULE_NOT_FOUND",r}return e7(n)}(e,{url:r.paths}));return"win32"===r.platform?d.normalize(t):t}function rn(e,r={}){return!!function(e,r={}){try{return rt(`${e}/package.json`,r)}catch{}try{return rt(e,r)}catch(e){return"MODULE_NOT_FOUND"!==e.code&&"ERR_MODULE_NOT_FOUND"!==e.code&&console.error(e),!1}}(e,r)}let rs=async e=>{if(!M&&f.stdout.isTTY&&!rn(e)){let{confirm:r}=await import("./vendor-qDvrsjQ2.mjs").then(function(e){return e.i});await r({message:`Package is required for this config: ${e}. Do you want to install it?`})&&await import("./vendor-qDvrsjQ2.mjs").then(function(e){return e.a}).then(r=>r.installPackage(e,{dev:!0}))}return r(e)};function ro(e,r=!1){return"boolean"==typeof e?e:void 0===e?r:!!e.enable||r}function ri(e,...r){if("boolean"==typeof e||void 0===e)return;let{enable:t,...n}=e;return r.length?W(n,...r):n}function ra(e){rn(e)&&console.error(F.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`))}let rl=async(e,...r)=>{let t=[];ra("@eslint-sukka/js"),ra("@eslint-sukka/json"),ra("@eslint-sukka/ts"),ra("@eslint-sukka/legacy");let n=ro(e?.ts,rn("typescript"));t.push(K(e?.ignores),J()),ro(e?.js,!0)&&t.push(Y(ri(e?.js)),X({typescript:n}),H()),ro(e?.json,!0)&&t.push(ee()),n&&t.push(ei(ri(e?.ts)));let s=rn("next"),o=ro(e?.react,s||rn("react")||rn("@types/react"));if(o){if(n){let r=await rs("@eslint-sukka/react"),n=rn("@remix-run/node")||rn("@remix-run/react")||rn("@remix-run/serve")||rn("@remix-run/dev");t.push(r.react(ri(e?.react,{nextjs:s,remix:n,reactRefresh:{allowConstantExport:rn("vite")},reactCompiler:rn("babel-plugin-react-compiler")||rn("react-compiler-webpack")?"error":"off"}))),ro(e?.next,s)&&t.push(r.next()),ro(e?.stylex,rn("@stylexjs/stylex")||rn("stylex-webpack"))&&t.push(r.stylex(ri(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.")}return ro(e?.node,rn("@types/node")||rn("@types/bun"))&&t.push((await rs("@eslint-sukka/node")).node({...ri(e?.node),hasTypeScript:n,hasReact:o})),ro(e?.legacy)&&t.push(ea(ri(e?.legacy))),t.push(r),t.flat()};export{K as ignores,rl as sukka};
|
|
1
|
+
let e=e=>import(e);import{constants as r,memo as s,getPackageJson as t,globals as n,RESTRICTED_IMPORT_JS as o,importMetaResolve as i,RESTRICTED_IMPORT_TS as a}from"@eslint-sukka/shared";export{constants}from"@eslint-sukka/shared";import l from"node:fs";import c from"node:process";import p from"node:path";import"node:fs/promises";import{fileURLToPath as u,pathToFileURL as f}from"node:url";import m from"@eslint-community/eslint-plugin-eslint-comments";import y from"eslint-plugin-sukka";import d from"eslint-plugin-promise";import*as g from"eslint-plugin-regexp";import{configs as k}from"eslint-plugin-regexp";import w from"@eslint/js";import b from"@stylistic/eslint-plugin-js";import h from"@stylistic/eslint-plugin-plus";import j from"eslint-plugin-unused-imports";import x from"eslint-plugin-import-x";import v from"eslint-plugin-autofix";import S from"eslint-plugin-jsonc";import C from"jsonc-eslint-parser";import{configs as E}from"typescript-eslint";import L from"@stylistic/eslint-plugin-ts";import{isPackageExists as T}from"local-pkg";import O from"picocolors";import{defu as _}from"defu";import{isCI as I}from"ci-info";let P=e=>e instanceof URL?u(e):e;var A=function(e){let r=e.startsWith("!"),s=r?"!":"",t=(r?e.slice(1):e).trimEnd();if(["","**","/**","**/"].includes(t))return`${s}${t}`;let n=t.indexOf("/"),o=n<0||n===t.length-1?"**/":"",i=(0===n?t.slice(1):t).replaceAll(/(?=((?:\\.|[^{(])*))\1([{(])/guy,"$1\\$2"),a=t.endsWith("/**")?"/*":"";return`${s}${o}${i}${a}`};let D=".gitignore";function R(e={}){let r=[],{root:s=!1,files:t=s?D:function(e,{cwd:r=c.cwd(),type:s="file",stopAt:t}={}){let n=p.resolve(P(r)??""),{root:o}=p.parse(n);for(t=p.resolve(n,P(t)??o);n&&n!==t&&n!==o;){let r=p.isAbsolute(e)?e:p.join(n,e);try{let e=l.statSync(r,{throwIfNoEntry:!1});if("file"===s&&e?.isFile()||"directory"===s&&e?.isDirectory())return r}catch{}n=p.dirname(n)}}(D)||[],strict:n=!0,cwd:o=c.cwd()}=e,i=Array.isArray(t)?t:[t];for(let e of i){let s="";try{s=l.readFileSync(e,"utf8")}catch(e){if(n)throw e;continue}let t=p.relative(o,p.dirname(e)).replaceAll("\\","/"),i=s.split(/\r?\n/u).filter(e=>e&&!e.startsWith("#")).map(e=>A(e)).map(e=>(function(e,r,s){if(["",".","/"].includes(r))return e;let t=e.startsWith("!")?"!":"",n=t?e.slice(1):e;if(r.endsWith("/")||(r=`${r}/`),!r.startsWith(".."))return`${t}${r}${n}`;if(!r.match(/^(\.\.\/)+$/))throw Error("The ignore file location should be either a parent or child directory");if(n.startsWith("**"))return e;let o=p.relative(p.resolve(s,r),s).split(/[/\\]/);for(;o.length&&n.startsWith(`${o[0]}/`);)n=n.slice(o[0].length+1),o.shift();return n.startsWith("**")||0===o.length?`${t}${n}`:null})(e,t,o)).filter(e=>null!==e);r.push(...i)}if(n&&0===i.length)throw Error("No .gitignore file found");return{name:e.name||"gitignore",ignores:r}}let N=(e={})=>{let{customGlobs:s=null,gitignore:t=[".gitignore"]}=e,n=[],o=[];return!1===s||null===s?o=r.GLOB_EXCLUDE:"function"==typeof s?o=s(r.GLOB_EXCLUDE):"string"==typeof s?o.push(...r.GLOB_EXCLUDE,s):Array.isArray(s)&&o.push(...r.GLOB_EXCLUDE,...s),n.push({ignores:o}),!1===t||null===t||(!0===t?n.push(R({files:[".gitignore"],strict:!1})):("string"==typeof t||Array.isArray(t))&&n.push(R({files:t,strict:!1}))),n},F=()=>[{name:"sukka/eslint-comments",plugins:{"@eslint-community/eslint-comments":m,sukka:s(y,"eslint-plugin-sukka")},rules:{"sukka/ban-eslint-disable":["error","allow-with-description"],"@eslint-community/eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}],"@eslint-community/eslint-comments/no-aggregating-enable":"error","@eslint-community/eslint-comments/no-duplicate-disable":"error","@eslint-community/eslint-comments/no-unlimited-disable":"error","@eslint-community/eslint-comments/no-unused-disable":"error","@eslint-community/eslint-comments/no-unused-enable":"error"}}],q=({typescript:e})=>[{name:"sukka/promise",plugins:{promise:d},rules:{"promise/always-return":e?"off":["error",{ignoreLastCallback:!0}],"promise/no-return-wrap":"error","promise/param-names":"error","promise/catch-or-return":["error",{allowFinally:!0,terminationMethod:["catch","asCallback","finally"]}],"promise/no-native":"off","promise/no-nesting":"warn","promise/no-promise-in-callback":"warn","promise/no-callback-in-promise":"warn","promise/avoid-new":"off","promise/no-new-statics":"error","promise/no-return-in-finally":"warn","promise/valid-params":"warn"}}],$=()=>[{name:"sukka/regexp",plugins:{sukka:s(y,"eslint-plugin-sukka"),regexp:s(g,"eslint-plugin-regexp")},rules:{"sukka/unicorn/better-regex":"error",...k["flat/recommended"].rules,"regexp/strict":"off"}}],U=[".js",".jsx",".mjs",".cjs"],M=(e={})=>{let{files:i,disableNoConsoleInCLI:a=!0,env:l={}}=e,{browser:c=!0,webextensions:p=!1,greasemonkey:u=!1,customGlobals:f={}}=l,m=e.module??t()?.type==="module",d=[{name:"@eslint/js recommended",...w.configs.recommended},{linterOptions:{reportUnusedDisableDirectives:!0}},{name:"@eslint-sukka/js base",...i?{files:i}:{},languageOptions:{ecmaVersion:"latest",sourceType:m?"module":"commonjs",parserOptions:{ecmaVersion:"latest",sourceType:m?"module":"commonjs",ecmaFeatures:{jsx:!0}},globals:{...n.es2025,...c&&n.browser,...p&&n.webextensions,...u&&n.greasemonkey,...f}},settings:{"import-x/parsers":{espree:U},"import-x/extensions":U},plugins:{"unused-imports":s(j,"eslint-plugin-unused-imports"),"@stylistic/js":s(b,"@stylistic/eslint-plugin-js"),"@stylistic/plus":s(h,"@stylistic/eslint-plugin-plus"),sukka:s(y,"eslint-plugin-sukka"),"import-x":s(x,"eslint-plugin-import-x"),autofix:v},rules:{...x.configs.recommended.rules,"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error","class-methods-use-this":["error",{exceptMethods:[]}],curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-notation":["error",{allowKeywords:!0}],"@stylistic/js/dot-location":["error","property"],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","no-alert":"warn","no-caller":"off","autofix/no-caller":"error","no-constructor-return":"error","no-else-return":["error",{allowElseIf:!1}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","@stylistic/js/no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-octal-escape":"error","no-proto":"off","autofix/no-proto":"error","no-restricted-properties":["error",...[["isFinite","Number.isFinite"],["isNaN","Number.isNaN"]].flatMap(([e,r])=>["global","globalThis","window","self"].map(s=>({object:s,property:e,message:`Please use ${r} instead`}))),{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."}],"no-return-assign":["error","always"],"no-return-await":"off","sukka/no-return-await":"error","no-self-compare":"off","no-sequences":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-useless-call":"off","no-useless-catch":"off","autofix/no-useless-catch":"error","no-useless-concat":"off","autofix/no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":["error",{allowAsStatement:!0}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-object-has-own":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],radix:"off","autofix/radix":"error","require-await":"error","require-yield":"error","require-unicode-regexp":"off","vars-on-top":"error","@stylistic/js/wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error","no-await-in-loop":"warn","no-console":"warn","no-constant-condition":"warn","no-empty-function":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-constant-binary-expression":"error","@stylistic/js/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-loss-of-precision":"warn","no-promise-executor-return":"error","no-template-curly-in-string":"error","no-unreachable-loop":["error",{ignore:[]}],"no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-vars":"off","unused-imports/no-unused-imports":"off","no-unused-private-class-members":"error","no-useless-backreference":"error","no-negated-in-lhs":"off","require-atomic-updates":"off","use-isnan":["error",{enforceForIndexOf:!0}],"valid-typeof":"off","autofix/valid-typeof":["error",{requireStringLiterals:!0}],"no-new-native-nonconstructor":"off","autofix/no-new-native-nonconstructor":"error","@stylistic/js/arrow-spacing":["error",{before:!0,after:!0}],"@stylistic/js/generator-star-spacing":["error",{before:!0,after:!1}],"@stylistic/js/no-confusing-arrow":["error",{allowParens:!0}],"no-duplicate-imports":"off","no-restricted-exports":["error",{restrictedNamedExports:["then"]}],"no-useless-constructor":"error","no-useless-rename":["error",{ignoreDestructuring:!1,ignoreImport:!1,ignoreExport:!1}],"no-var":"warn","object-shorthand":["error","always",{ignoreConstructors:!1,avoidQuotes:!0,avoidExplicitReturnArrows:!0}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["error",{ignoreReadBeforeAssign:!0}],"prefer-numeric-literals":"error","prefer-rest-params":"error","prefer-template":"off","symbol-description":"error","@stylistic/js/template-curly-spacing":["error","never"],"@stylistic/js/yield-star-spacing":["error","before"],"@stylistic/js/array-bracket-newline":["off","consistent"],"@stylistic/js/array-bracket-spacing":["error","never"],"@stylistic/js/array-element-newline":["off",{multiline:!0,minItems:5}],"@stylistic/js/block-spacing":["error","always"],"@stylistic/js/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["warn",{properties:"never",ignoreDestructuring:!1,ignoreImports:!0,ignoreGlobals:!0,allow:["^UNSAFE_","^experimental_","^__DEV__"]}],"@stylistic/js/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"@stylistic/js/computed-property-spacing":["error","never"],"consistent-this":"off","@stylistic/js/eol-last":["error","always"],"@stylistic/js/func-call-spacing":["error","never"],"@stylistic/js/function-call-argument-newline":["off","consistent"],"@stylistic/js/function-paren-newline":["error","consistent"],"@stylistic/js/implicit-arrow-linebreak":["error","beside"],"@stylistic/js/indent":["error",2,{SwitchCase:1}],"@stylistic/plus/indent-binary-ops":["error",2],"@stylistic/js/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/linebreak-style":"error","@stylistic/js/lines-around-comment":"off","@stylistic/js/lines-around-directive":"off","@stylistic/js/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"@stylistic/js/multiline-ternary":"off","new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"@stylistic/js/newline-per-chained-call":["error",{ignoreChainWithDepth:6}],"@stylistic/js/new-parens":"error","no-bitwise":"off","no-lonely-if":"error","sukka/unicorn/no-lonely-if":"error","@stylistic/js/no-mixed-operators":["error",{groups:[["**","+"],["**","-"],["**","*"],["**","/"],["%","+"],["%","-"],["%","*"],["%","/"],["%","**"],["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"@stylistic/js/no-mixed-spaces-and-tabs":"error","no-multi-assign":"error","@stylistic/js/no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","sukka/unicorn/no-negated-condition":"warn","no-nested-ternary":"off","sukka/unicorn/no-nested-ternary":"warn","no-new-object":"off","no-object-constructor":"error","no-array-constructor":"error","@stylistic/js/no-spaced-func":"off","@stylistic/js/no-tabs":"error","no-ternary":"off","@stylistic/js/no-trailing-spaces":"error","no-unneeded-ternary":"error","@stylistic/js/no-whitespace-before-property":"error","@stylistic/js/nonblock-statement-body-position":"error","@stylistic/js/object-curly-newline":"off","@stylistic/js/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/js/one-var-declaration-per-line":"off","prefer-exponentiation-operator":"error","@stylistic/js/operator-linebreak":["error","before"],"@stylistic/js/padded-blocks":["error","never"],"@stylistic/js/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":["error","single"],"@stylistic/js/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/jsx-quotes":["error","prefer-double"],"@stylistic/js/rest-spread-spacing":["error","never"],"@stylistic/js/semi":["error","always"],"@stylistic/js/semi-spacing":["error",{before:!1,after:!0}],"@stylistic/js/semi-style":["error","last"],"@stylistic/js/space-before-blocks":"error","@stylistic/js/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-in-parens":["error","never"],"@stylistic/js/space-infix-ops":"error","@stylistic/js/space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"@stylistic/js/spaced-comment":["error","always",{line:{exceptions:["-","+"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"@stylistic/js/switch-colon-spacing":["error",{after:!0,before:!1}],"@stylistic/js/template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"@stylistic/js/wrap-regex":"off","no-label-var":"error","no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-globals":["error",{name:"isFinite",message:"Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite"},{name:"isNaN",message:"Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan"}],"no-undef-init":"error","sukka/no-expression-empty-lines":"error","sukka/array/no-unneeded-flat-map":"error","sukka/browser/prefer-location-assign":"warn","sukka/jsx/no-template-literal":"error","sukka/jsx/no-unneeded-nested":"error","sukka/string/no-locale-case":"warn","sukka/string/no-simple-template-literal":"error","sukka/type/no-instanceof-wrapper":"error","sukka/unicode/no-bidi":"warn","sukka/unicode/no-invisible":"warn","sukka/no-redundant-variable":"error","sukka/no-single-return":"error","sukka/prefer-early-return":["error",{maximumStatements:16}],"sukka/prefer-fetch":"error","sukka/prefer-timer-id":"warn","sukka/unicorn/catch-error-name":["error",{ignore:[/^(?:e|err|error|\w+Err|\w+Error)[\d_]?$/]}],"sukka/unicorn/custom-error-definition":"error","sukka/unicorn/require-array-join-separator":"warn","sukka/unicorn/no-thenable":"error","sukka/unicorn/no-invalid-remove-event-listener":"error","sukka/unicorn/consistent-function-scoping":"warn","sukka/unicorn/prefer-event-target":"warn","sukka/unicorn/prefer-keyboard-event-key":"warn","sukka/unicorn/prefer-text-content":"warn","sukka/unicorn/no-console-spaces":"warn","sukka/unicorn/no-empty-file":"warn","sukka/unicorn/no-useless-fallback-in-spread":"warn","sukka/unicorn/no-useless-length-check":"warn","sukka/unicorn/no-useless-promise-resolve-reject":"warn","sukka/unicorn/no-zero-fractions":"warn","sukka/unicorn/prefer-export-from":["warn",{ignoreUsedVariables:!0}],"sukka/unicorn/prefer-native-coercion-functions":"warn","sukka/unicorn/prefer-negative-index":"warn","sukka/unicorn/no-document-cookie":"error","sukka/unicorn/prefer-add-event-listener":"warn","sukka/unicorn/prefer-array-index-of":"warn","sukka/unicorn/prefer-blob-reading-methods":"warn","sukka/unicorn/prefer-date-now":"warn","sukka/unicorn/prefer-dom-node-dataset":"warn","sukka/unicorn/prefer-modern-math-apis":"warn","sukka/unicorn/number-literal-case":"error","sukka/unicorn/prefer-number-properties":["warn",{checkInfinity:!1}],"sukka/unicorn/prefer-reflect-apply":"warn","sukka/unicorn/prefer-set-size":"warn","sukka/unicorn/prefer-string-replace-all":"warn","sukka/unicorn/prefer-string-slice":"warn","sukka/unicorn/prefer-string-trim-start-end":"warn","sukka/unicorn/no-unreadable-iife":"warn","sukka/unicorn/throw-new-error":"warn","sukka/unicorn/escape-case":"warn","sukka/unicorn/no-hex-escape":"warn","sukka/unicorn/prefer-prototype-methods":"warn","sukka/unicorn/error-message":"error","sukka/unicorn/no-instanceof-array":"error","sukka/unicorn/prefer-type-error":"error","sukka/unicorn/consistent-destructuring":"warn","sukka/unicorn/new-for-builtins":"warn","sukka/unicorn/no-array-push-push":"warn","sukka/unicorn/no-static-only-class":"warn","sukka/unicorn/no-unreadable-array-destructuring":"error","sukka/unicorn/no-useless-spread":"error","sukka/unicorn/no-useless-switch-case":"warn","sukka/unicorn/no-useless-undefined":["error",{checkArguments:!1}],"sukka/unicorn/numeric-separators-style":["warn",{onlyIfContainsSeparator:!1,number:{minimumDigits:7,groupLength:3},binary:{minimumDigits:9,groupLength:4},octal:{minimumDigits:9,groupLength:4},hexadecimal:{minimumDigits:5,groupLength:2}}],"sukka/unicorn/prefer-array-find":"warn","sukka/unicorn/prefer-array-flat-map":"warn","sukka/unicorn/prefer-array-flat":"warn","sukka/unicorn/prefer-array-some":"warn","sukka/unicorn/prefer-code-point":"warn","sukka/unicorn/prefer-default-parameters":"warn","sukka/unicorn/prefer-logical-operator-over-ternary":"warn","sukka/unicorn/prefer-optional-catch-binding":"error","sukka/unicorn/prefer-regexp-test":"warn","sukka/unicorn/prefer-set-has":"error","sukka/unicorn/prefer-switch":"warn","sukka/unicorn/require-number-to-fixed-digits-argument":"warn","sukka/import-dedupe":"error","sukka/unicorn/prefer-string-raw":"warn","sukka/unicorn/no-single-promise-in-promise-methods":"error","sukka/unicorn/no-await-in-promise-methods":"error","sukka/unicorn/no-magic-array-flat-depth":"error","sukka/unicorn/no-object-as-default-parameter":"error","sukka/unicorn/template-indent":["warn",{tags:["outdent","dedent","gql","sql","html","styled","css"],functions:["dedent","stripIndent","strip_indent","stripTags","striptags","strip_tags","stripHtml","stripHTML","strip_html"],selectors:[],comments:["HTML","html","CSS","css","indent"]}],"sukka/unicorn/no-negation-in-equality-check":"error","sukka/unicorn/no-length-as-slice-end":"error","no-restricted-imports":["error",{paths:o}],"no-prototype-builtins":"off","autofix/no-prototype-builtins":"error"}}];if(!1!==a){let e="boolean"==typeof a?null:Array.isArray(a)?a:[a];d.push({name:"@eslint-sukka/js cli specific",files:e??[`**/scripts/${r.GLOB_SRC}`,`**/cli/${r.GLOB_SRC}`,`**/cli.${r.GLOB_SRC_EXT}`],rules:{"no-console":"off"}})}return d},B={plugins:{jsonc:s(S,"eslint-plugin-jsonc")},languageOptions:{parser:C}},W={"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":["error","never"],"jsonc/comma-style":["error","last"],"jsonc/indent":["error",2],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/object-curly-newline":"off","jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"jsonc/quote-props":"error","jsonc/quotes":"error"},G=()=>[...S.configs["flat/base"],{name:"@eslint-sukka/json json",files:[r.GLOB_JSON],rules:{...S.configs["flat/recommended-with-json"].reduce((e,r)=>({...e,...r.rules}),{}),...W}},{name:"@eslint-sukka/json json5",...B,files:[r.GLOB_JSON5],rules:{...S.configs["flat/recommended-with-json5"].reduce((e,r)=>({...e,...r.rules}),{}),...W}},{name:"@eslint-sukka/json jsonc",...B,files:[r.GLOB_JSONC],rules:{...S.configs["flat/recommended-with-jsonc"].reduce((e,r)=>({...e,...r.rules}),{}),...W}},{name:"@eslint-sukka/json package.json",...B,files:["**/package.json"],rules:{"jsonc/sort-array-values":["error",{order:{type:"asc"},pathPattern:"^files$"}],"jsonc/sort-keys":["error",{order:["$schema","publisher","name","displayName","version","private","description","funding","homepage","repository","bugs","categories","type","main","module","types","typesVersions","bin","files","exports","icon","unpkg","jsdelivr","sideEffects","activationEvents","contributes","scripts","keywords","author","license","dependencies","devDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","packageManager","engines","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$"},{order:["types","import","module","require","default"],pathPattern:"^exports.*$"}]}},{name:"@eslint-sukka/json tsconfig.json",...B,files:["**/tsconfig.json","**/tsconfig.*.json","**/tsconfig-*.json","**/jsconfig.json","**/jsconfig.*.json","**/jsconfig-*.json"],rules:{"jsonc/sort-keys":["error",{order:["$schema","extends","compilerOptions","references","files","include","exclude"],pathPattern:"^$"},{order:["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","lib","jsx","experimentalDecorators","emitDecoratorMetadata","jsxFactory","jsxFragmentFactory","jsxImportSource","reactNamespace","noLib","useDefineForClassFields","moduleDetection","module","rootDir","moduleResolution","baseUrl","paths","rootDirs","typeRoots","types","allowUmdGlobalAccess","moduleSuffixes","allowImportingTsExtensions","resolvePackageJsonExports","resolvePackageJsonImports","customConditions","resolveJsonModule","allowArbitraryExtensions","noResolve","allowJs","checkJs","maxNodeModuleJsDepth","declaration","declarationMap","emitDeclarationOnly","sourceMap","inlineSourceMap","outFile","outDir","removeComments","noEmit","importHelpers","importsNotUsedAsValues","downlevelIteration","sourceRoot","mapRoot","inlineSources","emitBOM","newLine","stripInternal","noEmitHelpers","noEmitOnError","preserveConstEnums","declarationDir","preserveValueImports","isolatedModules","verbatimModuleSyntax","allowSyntheticDefaultImports","esModuleInterop","preserveSymlinks","forceConsistentCasingInFileNames","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","skipDefaultLibCheck","skipLibCheck"],pathPattern:"^compilerOptions$"}]}}],V={"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":"off","no-redeclare":"off","@typescript-eslint/no-redeclare":"off","no-unused-vars":"off","@typescript-eslint/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"class-methods-use-this":"off","@typescript-eslint/class-methods-use-this":["error",{exceptMethods:[]}],"default-param-last":"off","@typescript-eslint/default-param-last":"error","dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"no-implied-eval":"off","@typescript-eslint/no-implied-eval":"error","no-invalid-this":"off","@typescript-eslint/no-invalid-this":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":"error","no-return-await":"off","@typescript-eslint/return-await":"error","sukka/no-return-await":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"prefer-promise-reject-errors":"off","@typescript-eslint/prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"require-await":"off","@typescript-eslint/require-await":"error","no-empty-function":"off","@typescript-eslint/no-empty-function":"error","@stylistic/js/no-extra-parens":"off","@stylistic/ts/no-extra-parens":["off","all",{conditionalAssign:!0,nestedBinaryExpressions:!1,returnAssign:!1,ignoreJSX:"all",enforceForArrowConditionals:!1}],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":"error","@stylistic/js/block-spacing":"off","@stylistic/ts/block-spacing":["error","always"],"@stylistic/js/brace-style":"off","@stylistic/ts/brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:"off","@stylistic/js/comma-dangle":"off","@stylistic/ts/comma-dangle":["error","never"],"@stylistic/js/comma-spacing":"off","@stylistic/ts/comma-spacing":["error",{before:!1,after:!0}],"@stylistic/js/func-call-spacing":"off","@stylistic/ts/func-call-spacing":["error","never"],"@stylistic/js/indent":"off","@stylistic/ts/indent":["error",2,{SwitchCase:1}],"@stylistic/js/key-spacing":"off","@stylistic/ts/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"@stylistic/js/keyword-spacing":"off","@stylistic/ts/keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"@stylistic/js/lines-around-comment":"off","@stylistic/ts/lines-around-comment":"off","@stylistic/js/lines-between-class-members":"off","@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":"error","@stylistic/js/object-curly-newline":"off","@stylistic/ts/object-curly-newline":"off","@stylistic/js/object-curly-spacing":"off","@stylistic/ts/object-curly-spacing":["error","always"],"@stylistic/js/object-property-newline":"off","@stylistic/ts/object-property-newline":"off","@stylistic/js/padding-line-between-statements":"off","@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"}],"@stylistic/js/quotes":"off","@stylistic/ts/quotes":["error","single"],"@stylistic/js/quote-props":"off","@stylistic/ts/quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],"@stylistic/js/semi":"off","@stylistic/ts/semi":["error","always"],"@stylistic/js/space-before-blocks":"off","@stylistic/ts/space-before-blocks":"error","@stylistic/js/space-before-function-paren":"off","@stylistic/ts/space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"@stylistic/js/space-infix-ops":"off","@stylistic/ts/space-infix-ops":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{functions:!1,classes:!0,variables:!0}],"no-restricted-imports":"off"},J=[".js",".jsx",".mjs",".cjs"],X=[".ts",".cts",".mts",".tsx",".d.ts"],H=[...X,...J],z=[".ts",".cts",".mts",".tsx",...J],K=(e={})=>{let{tsconfigPath:t=!0,tsconfigRootDir:n=c.cwd(),componentExtentions:o=[]}=e,l="string"==typeof __dirname?f(__dirname).href:import.meta.url,p=u(i("@typescript-eslint/parser",l)),m=u(i("eslint-import-resolver-ts-bundled",l));return[{name:"@eslint-sukka/ts base",files:[r.GLOB_TS,r.GLOB_TSX,...o.map(e=>`**/*.${e}`)],plugins:{...E.base.plugins,"@stylistic/ts":s(L,"@stylistic/eslint-plugin-ts"),"@stylistic/plus":s(h,"@stylistic/eslint-plugin-plus"),"import-x":s(x,"eslint-plugin-import-x")},languageOptions:{parser:E.base.languageOptions.parser,sourceType:"module",parserOptions:{sourceType:"module",ecmaVersion:"latest",...!0===t?{projectService:!0,allowDefaultProject:[]}:{project:t},tsconfigRootDir:n,ecmaFeatures:{jsx:!0},jsxPragma:void 0,warnOnUnsupportedTypeScriptVersion:!0}},settings:{"import-x/extensions":H,"import-x/external-module-folders":["node_modules","node_modules/@types"],"import-x/resolver":{node:{extensions:z},[m]:{alwaysTryTypes:!0,...!0===t?{}:{project:t}}},"import-x/parsers":{espree:J,[p]:X}},rules:{...E.base.rules,...E.recommendedTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...E.stylisticTypeChecked.reduce((e,r)=>({...e,...r.rules}),{}),...x.configs.typescript.rules,...V,"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:10}],"@typescript-eslint/naming-convention":["warn",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE","snake_case"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"function",format:["camelCase","PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"},{selector:"typeLike",format:["PascalCase"],leadingUnderscore:"allowSingleOrDouble",trailingUnderscore:"allowSingleOrDouble"}],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"@typescript-eslint/require-await":"error","@typescript-eslint/await-thenable":"error","@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-misused-promises":["error",{checksVoidReturn:!1}],"@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/restrict-template-expressions":["error",{allowNumber:!0,allowAny:!0,allowBoolean:!0,allowNever:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/consistent-type-imports":["warn",{prefer:"type-imports",disallowTypeAnnotations:!1,fixStyle:"separate-type-imports"}],"@typescript-eslint/no-import-type-side-effects":"warn","@typescript-eslint/consistent-type-exports":["warn",{fixMixedExportsWithInlineTypeSpecifier:!1}],"@typescript-eslint/consistent-type-definitions":"warn","@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["Error","RegExp","URL","URLSearchParams"]}],"@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extraneous-class":["warn",{allowConstructorOnly:!0,allowEmpty:!0,allowWithDecorator:!0}],"@typescript-eslint/no-invalid-void-type":["off",{allowInGenericTypeArguments:!0,allowAsThisParameter:!0}],"@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":"error","@typescript-eslint/no-unnecessary-condition":["warn",{allowConstantLoopConditions:!0}],"@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":["error",{allowBitwiseExpressions:!0}],"@typescript-eslint/prefer-nullish-coalescing":"off","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],"@typescript-eslint/prefer-for-of":"off","@typescript-eslint/prefer-function-type":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/prefer-enum-initializers":"warn","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-meaningless-void-operator":"warn","@typescript-eslint/no-unnecessary-qualifier":"warn","@typescript-eslint/array-type":["warn",{default:"array-simple"}],"@typescript-eslint/no-restricted-imports":["error",{paths:a}],"@typescript-eslint/no-empty-object-type":["error",{allowInterfaces:"with-single-extends",allowObjectTypes:"never",allowWithName:"Props$"}],"@typescript-eslint/no-unsafe-function-type":"warn","@typescript-eslint/no-restricted-types":["error",{types:{FC:{message:"To declare a component, you don't have to use FC to annotate it. To type something that accepts/is a React Component, use ComponentType<T>.",fixWith:"ComponentType"},"React.FC":{message:"To declare a component, you don't have to use React.FC to annotate it. To type something that accepts/is a React Component, use React.ComponentType<T>.",fixWith:"React.ComponentType"},ReactElement:{message:"In most cases, you want ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"ReactNode"},"React.ReactElement":{message:"In most cases, you want React.ReactNode. Only ignore this rule when you want to use cloneElement.",fixWith:"React.ReactNode"}}}],"@typescript-eslint/no-unsafe-assignment":"off","@typescript-eslint/no-unsafe-argument":"off","@typescript-eslint/no-explicit-any":"warn","@typescript-eslint/no-loop-func":"warn","@typescript-eslint/no-redundant-type-constituents":"off","@typescript-eslint/no-floating-promises":"off","@typescript-eslint/no-unsafe-call":"off","@typescript-eslint/no-unsafe-member-access":"off","@typescript-eslint/no-unsafe-return":"off","@typescript-eslint/no-unsafe-enum-comparison":"warn","@typescript-eslint/prefer-regexp-exec":"warn","@typescript-eslint/no-deprecated":"warn","@typescript-eslint/no-unnecessary-template-expression":"warn","no-restricted-syntax":["error",{message:'Unnecessary "as const"',selector:"VariableDeclarator > TSAsExpression[expression.properties.length=0] > TSTypeReference > Identifier[name=const]"},{message:'Unnecessary "as const"',selector:"VariableDeclarator[id.typeAnnotation] > TSAsExpression > TSTypeReference > Identifier[name=const]"},{message:'Static class methods requires "this: void"',selector:"MethodDefinition[static=true] > FunctionExpression:not([params.0.name=this][params.0.typeAnnotation.typeAnnotation.type=TSVoidKeyword])"}],"@stylistic/ts/member-delimiter-style":["error",{multiline:{delimiter:"comma",requireLast:!1},singleline:{delimiter:"comma",requireLast:!1}}],"@stylistic/ts/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0,exceptAfterOverload:!0}],"@stylistic/ts/padding-line-between-statements":["error",{blankLine:"always",prev:"directive",next:"*"},{blankLine:"always",prev:"*",next:["class","with"]},{blankLine:"always",prev:["class","with"],next:"*"},{blankLine:"any",prev:["interface","type"],next:["interface","type"]}],"@stylistic/ts/type-annotation-spacing":["error",{before:!1,after:!0,overrides:{arrow:{before:!0,after:!0},operator:{before:!0,after:!0}}}],"@typescript-eslint/no-namespace":"off","@typescript-eslint/prefer-string-starts-ends-with":"off","sukka/string/prefer-string-starts-ends-with":"error","@typescript-eslint/switch-exhaustiveness-check":"error","sukka/string/no-unneeded-to-string":"error","sukka/type/no-force-cast-via-top-type":"error","sukka/type/no-wrapper-type-reference":"error","sukka/no-default-error":"off","sukka/no-export-const-enum":"error","@stylistic/plus/type-generic-spacing":"error","@stylistic/plus/type-named-tuple-spacing":"error","@typescript-eslint/no-unused-vars":"off","unused-imports/no-unused-vars":["error",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_",ignoreRestSiblings:!0}],"unused-imports/no-unused-imports":"error","import-x/named":"off","import-x/no-duplicates":"off","import-x/namespace":"off","import-x/default":"off","import-x/no-named-as-default-member":"off"}},{name:"@eslint-sukka/ts dts",files:["**/*.d.ts"],plugins:{"import-x":s(x,"eslint-plugin-import-x")},rules:{"import-x/no-duplicates":"off","unused-imports/no-unused-vars":"off"}},{name:"@eslint-sukka/ts jest/mocha",files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{name:"@eslint-sukka/ts commonjs",files:["**/*.js","**/*.cjs"],plugins:E.base.plugins,rules:{"@typescript-eslint/no-require-imports":"off","@typescript-eslint/no-var-requires":"off"}}]},Q=(e={})=>[{name:"@eslint-sukka/legacy base",...e.files?{files:e.files}:{},plugins:{sukka:s(y,"eslint-plugin-sukka")},rules:{"prefer-numeric-literals":"off","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."}],"no-var":"off","prefer-object-spread":"off",strict:["error","safe"],"sukka/unicorn/prefer-default-parameters":"off","sukka/unicorn/prefer-logical-operator-over-ternary":"off","sukka/unicorn/prefer-optional-catch-binding":"off"},languageOptions:{globals:{...e.browser??!0?n.browser:{},...e.node?n.node:{}}}}],Y=async r=>{if(!I&&c.stdout.isTTY&&!T(r)){let{confirm:e}=await import("./vendor-qDvrsjQ2.mjs").then(function(e){return e.i});await e({message:`Package is required for this config: ${r}. Do you want to install it?`})&&await import("./vendor-qDvrsjQ2.mjs").then(function(e){return e.a}).then(e=>e.installPackage(r,{dev:!0}))}return e(r)};function Z(e,r=!1){return"boolean"==typeof e?e:void 0===e?r:!!e.enable||r}function ee(e,...r){if("boolean"==typeof e||void 0===e)return;let{enable:s,...t}=e;return r.length?_(t,...r):t}function er(e){T(e)&&console.error(O.yellow(`[eslint-config-sukka] "${e}" is deprecated and you should uninstall it`))}let es=async(e,...r)=>{let s=[];er("@eslint-sukka/js"),er("@eslint-sukka/json"),er("@eslint-sukka/ts"),er("@eslint-sukka/legacy");let t=Z(e?.ts,T("typescript"));s.push(N(e?.ignores),F()),Z(e?.js,!0)&&s.push(M(ee(e?.js)),q({typescript:t}),$()),Z(e?.json,!0)&&s.push(G()),t&&s.push(K(ee(e?.ts)));let n=T("next"),o=Z(e?.react,n||T("react")||T("@types/react"));if(o){if(t){let r=await Y("@eslint-sukka/react"),t=T("@remix-run/node")||T("@remix-run/react")||T("@remix-run/serve")||T("@remix-run/dev");s.push(r.react(ee(e?.react,{nextjs:n,remix:t,reactRefresh:{allowConstantExport:T("vite")},reactCompiler:T("babel-plugin-react-compiler")||T("react-compiler-webpack")?"error":"off"}))),Z(e?.next,n)&&s.push(r.next()),Z(e?.stylex,T("@stylexjs/stylex")||T("stylex-webpack"))&&s.push(r.stylex(ee(e?.stylex)))}else console.warn("[eslint-config-sukka] React preset will not be enabled when TypeScript is missing.")}return Z(e?.node,T("@types/node")||T("@types/bun"))&&s.push((await Y("@eslint-sukka/node")).node({...ee(e?.node),hasTypeScript:t,hasReact:o})),Z(e?.legacy)&&s.push(Q(ee(e?.legacy))),s.push(r),s.flat()};export{N as ignores,es as sukka};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-sukka",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Sukka's ESLint config",
|
|
5
5
|
"homepage": "https://github.com/SukkaW/eslint-config-sukka",
|
|
6
6
|
"repository": {
|
|
@@ -33,32 +33,31 @@
|
|
|
33
33
|
"@stylistic/eslint-plugin-js": "2.7.2",
|
|
34
34
|
"@stylistic/eslint-plugin-plus": "2.7.2",
|
|
35
35
|
"@stylistic/eslint-plugin-ts": "2.7.2",
|
|
36
|
-
"@typescript-eslint/parser": "8.
|
|
36
|
+
"@typescript-eslint/parser": "8.4.0",
|
|
37
37
|
"ci-info": "^4.0.0",
|
|
38
38
|
"defu": "^6.1.4",
|
|
39
|
-
"eslint-plugin-autofix": "^2.
|
|
40
|
-
"eslint-plugin-import-x": "^4.
|
|
39
|
+
"eslint-plugin-autofix": "^2.2.0",
|
|
40
|
+
"eslint-plugin-import-x": "^4.2.1",
|
|
41
41
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
42
42
|
"eslint-plugin-promise": "^7.1.0",
|
|
43
43
|
"eslint-plugin-regexp": "^2.6.0",
|
|
44
44
|
"eslint-plugin-unused-imports": "4.1.3",
|
|
45
45
|
"jsonc-eslint-parser": "^2.4.0",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"eslint
|
|
49
|
-
"@eslint-sukka/shared": "6.
|
|
50
|
-
"eslint-plugin-sukka": "6.
|
|
51
|
-
"eslint-
|
|
46
|
+
"local-pkg": "^0.5.0",
|
|
47
|
+
"picocolors": "^1.1.0",
|
|
48
|
+
"typescript-eslint": "^8.4.0",
|
|
49
|
+
"@eslint-sukka/shared": "6.3.0",
|
|
50
|
+
"eslint-plugin-sukka": "6.3.0",
|
|
51
|
+
"eslint-import-resolver-ts-bundled": "6.3.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@antfu/install-pkg": "^0.4.1",
|
|
55
55
|
"@clack/prompts": "^0.7.0",
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
56
|
+
"@typescript-eslint/eslint-plugin": "8.4.0",
|
|
57
57
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
58
|
-
"
|
|
59
|
-
"@eslint-sukka/
|
|
60
|
-
"@eslint-sukka/
|
|
61
|
-
"@eslint-sukka/rollup-config": "6.2.3"
|
|
58
|
+
"@eslint-sukka/rollup-config": "6.3.0",
|
|
59
|
+
"@eslint-sukka/react": "6.3.0",
|
|
60
|
+
"@eslint-sukka/node": "6.3.0"
|
|
62
61
|
},
|
|
63
62
|
"scripts": {
|
|
64
63
|
"codegen": "node -r @swc-node/register scripts/codegen.ts",
|