@anolilab/eslint-config 6.0.2 → 6.1.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/CHANGELOG.md +14 -0
- package/README.md +6 -5
- package/dist/config/plugins/babel.js +3 -2
- package/dist/config/plugins/babel.js.map +1 -1
- package/dist/config/plugins/babel.mjs +7 -6
- package/dist/config/plugins/babel.mjs.map +1 -1
- package/dist/config/plugins/html.js +5 -2
- package/dist/config/plugins/html.js.map +1 -1
- package/dist/config/plugins/html.mjs +5 -2
- package/dist/config/plugins/html.mjs.map +1 -1
- package/dist/config/plugins/jsdoc.js +2 -2
- package/dist/config/plugins/jsdoc.js.map +1 -1
- package/dist/config/plugins/jsdoc.mjs +2 -2
- package/dist/config/plugins/jsdoc.mjs.map +1 -1
- package/dist/config/plugins/jsonc.js +2 -4
- package/dist/config/plugins/jsonc.js.map +1 -1
- package/dist/config/plugins/jsonc.mjs +2 -4
- package/dist/config/plugins/jsonc.mjs.map +1 -1
- package/dist/config/plugins/node.js.map +1 -1
- package/dist/config/plugins/node.mjs.map +1 -1
- package/dist/config/plugins/react.js +1 -1
- package/dist/config/plugins/react.js.map +1 -1
- package/dist/config/plugins/react.mjs +1 -1
- package/dist/config/plugins/react.mjs.map +1 -1
- package/dist/config/plugins/typescript.js +2 -4
- package/dist/config/plugins/typescript.js.map +1 -1
- package/dist/config/plugins/typescript.mjs +2 -4
- package/dist/config/plugins/typescript.mjs.map +1 -1
- package/dist/config/plugins/unicorn.js +3 -3
- package/dist/config/plugins/unicorn.js.map +1 -1
- package/dist/config/plugins/unicorn.mjs +2 -2
- package/dist/config/plugins/unicorn.mjs.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/dist/postinstall.js.map +1 -1
- package/dist/postinstall.mjs.map +1 -1
- package/package.json +9 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","consoleLog","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","showUnsupportedTypeScriptVersionWarning","config","glob","typescript_default"],"mappings":"+SAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,CAAK,EAAIT,EACrB,CAAE,OAAAU,CAAO,EAAIV,EAEbP,EAAU,CAAC,UAAU,CAAC,IAEjB,OAAO,4CACR,OAAO,0CAA4C,GAEnDkB,EACI;AAAA,wLACJ,GAGJD,EAAS,OAGb,IAAME,EAAmBR,EAAa,mBAAmB,EACnDS,EAAiCT,EAAa,mCAAmC,EACjFU,EAAcd,EAAW,cAAc,EAEzCe,EAA6D,CAAC,EAE9DrB,IAEAqB,EAAuBrB,GAAM,WAAc,eAAe,GAG9D,IAAIsB,EAAmDrB,EAAI,qDAA0D,OAEjHoB,GAAuB,yCAA8C,SACrEC,EAA0CD,GAAuB,wCAGrE,IAAME,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,0BAA0B,EACpC,QAAS,CAAC,oBAAoB,EAC9B,OAAQ,4BACR,cAAe,CACX,WAAY,SACZ,aAAc,CACV,IAAK,EACT,EACA,mCAAoCD,CACxC,EACA,SAAU,CAEN,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAO,CACxD,EAGA,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,OAAQ,MAAO,Q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AAE,QAAS,sBAAuB,QAAS,SAAU,EAC9D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,MAAO,CAAE,QAAS,8BAA+B,CACrD,CACJ,CACJ,EAIA,4CAA6C,QAI7C,4CAA6C,QAI7C,qDAAsD,QAItD,mDAAoD,QAIpD,oDAAqD,QAIrD,4CAA6C,QAI7C,qDAAsD,QAItD,8CAA+C,QAI/C,uCAAwC,OAIxC,iDAAkD,QAIlD,0CAA2C,OAI3C,oCAAqC,QAIrC,kCAAmC,QAInC,6DAA8D,OAI9D,yDAA0D,QAI1D,2CAA4C,QAI5C,wCAAyC,QAIzC,mCAAoC,QAIpC,mDAAoD,QAIpD,oDAAqD,QAIrD,wCAAyC,QAIzC,0CAA2C,QAI3C,oCAAqC,QAIrC,mDAAoD,QAIpD,6CAA8C,QAI9C,sCAAuC,QAIvC,6CAA8C,QAI9C,uDAAwD,MAIxD,8CAA+C,QAI/C,0CAA2C,QAI3C,+CAAgD,QAIhD,2CAA4C,QAG5C,iDAAkD,OACtD,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi } = styleRules;\nlet { indent } = styleRules;\n\nif (hasAnyDep([\"prettier\"])) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigTypescriptPrettier) {\n global.hasAnolilabEsLintConfigTypescriptPrettier = true;\n\n consoleLog(\n \"\\nFound prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824\",\n );\n }\n\n indent = \"off\";\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet showUnsupportedTypeScriptVersionWarning: boolean = env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\";\n\nif (anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] !== undefined) {\n showUnsupportedTypeScriptVersionWarning = anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","prettierRules","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","showUnsupportedTypeScriptVersionWarning","config","glob","typescript_default"],"mappings":"mQAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAUpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,EAAM,OAAAC,CAAO,EAAIV,EAE7BW,EAAoC,CAAC,EAGrClB,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDkB,EAAgB,CACZ,0CAA2C,EAC3C,4BAA6B,EAC7B,mCAAoC,MACpC,iCAAkC,MAClC,kCAAmC,MACnC,mCAAoC,MACpC,uCAAwC,MACxC,4BAA6B,MAC7B,iCAAkC,MAClC,qCAAsC,MACtC,4CAA6C,MAC7C,qCAAsC,MACtC,mCAAoC,MACpC,0CAA2C,MAC3C,0BAA2B,MAC3B,yCAA0C,MAC1C,iDAAkD,MAClD,qCAAsC,MACtC,6CAA8C,KAClD,GAGJ,IAAMC,EAAmBR,EAAa,mBAAmB,EACnDS,EAAiCT,EAAa,mCAAmC,EACjFU,EAAcd,EAAW,cAAc,EAEzCe,EAA6D,CAAC,EAE9DrB,IAEAqB,EAAuBrB,GAAM,WAAc,eAAe,GAG9D,IAAIsB,EAAmDrB,EAAI,qDAA0D,OAEjHoB,GAAuB,yCAA8C,SACrEC,EAA0CD,GAAuB,wCAGrE,IAAME,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,0BAA0B,EAC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ACA,yBACA,uBACA,uBACA,0BACA,wBACA,wBACA,2BACA,yBACA,cACA,yBACA,4BACA,yBACJ,CACJ,CACJ,EAGA,gCAAiC,CAC7B,QACA,CACI,QAAS,QACT,SAAU,SACd,CACJ,EAKA,+BAAgC,CAC5B,QACA,CACI,MAAO,CACH,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,QAAS,CAAE,QAAS,sBAAuB,QAAS,SAAU,EAC9D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,MAAO,CAAE,QAAS,8BAA+B,CACrD,CACJ,CACJ,EAIA,4CAA6C,QAI7C,4CAA6C,QAI7C,qDAAsD,QAItD,mDAAoD,QAIpD,oDAAqD,QAIrD,4CAA6C,QAI7C,qDAAsD,QAItD,8CAA+C,QAI/C,uCAAwC,OAIxC,iDAAkD,QAIlD,0CAA2C,OAI3C,oCAAqC,QAIrC,kCAAmC,QAInC,6DAA8D,OAI9D,yDAA0D,QAI1D,2CAA4C,QAI5C,wCAAyC,QAIzC,mCAAoC,QAIpC,mDAAoD,QAIpD,oDAAqD,QAIrD,wCAAyC,QAIzC,0CAA2C,QAI3C,oCAAqC,QAIrC,mDAAoD,QAIpD,6CAA8C,QAI9C,sCAAuC,QAIvC,6CAA8C,QAI9C,uDAAwD,MAIxD,8CAA+C,QAI/C,0CAA2C,QAI3C,+CAAgD,QAIhD,2CAA4C,QAG5C,iDAAkD,QAGlD,GAAGP,CACP,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOQ,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi, indent } = styleRules;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierRules = {\n \"@typescript-eslint/lines-around-comment\": 0,\n \"@typescript-eslint/quotes\": 0,\n \"@typescript-eslint/block-spacing\": \"off\",\n \"@typescript-eslint/brace-style\": \"off\",\n \"@typescript-eslint/comma-dangle\": \"off\",\n \"@typescript-eslint/comma-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": \"off\",\n \"@typescript-eslint/indent\": \"off\",\n \"@typescript-eslint/key-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": \"off\",\n \"@typescript-eslint/member-delimiter-style\": \"off\",\n \"@typescript-eslint/no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-semi\": \"off\",\n \"@typescript-eslint/object-curly-spacing\": \"off\",\n \"@typescript-eslint/semi\": \"off\",\n \"@typescript-eslint/space-before-blocks\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-infix-ops\": \"off\",\n \"@typescript-eslint/type-annotation-spacing\": \"off\",\n };\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet showUnsupportedTypeScriptVersionWarning: boolean = env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\";\n\nif (anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] !== undefined) {\n showUnsupportedTypeScriptVersionWarning = anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n\n // Disable rules that are handled by prettier\n ...prettierRules,\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as a$5 } from '../../chunk-RWRS63WY.mjs';
|
|
2
|
-
import { b as b$1 } from '../../chunk-G7JIJH44.mjs';
|
|
3
2
|
import { a as a$4 } from '../../chunk-GPLU2T35.mjs';
|
|
4
3
|
import { a as a$3 } from '../../chunk-WSETOOIE.mjs';
|
|
5
4
|
import { a as a$2 } from '../../chunk-6ZQSXLLR.mjs';
|
|
@@ -8,9 +7,8 @@ import { a as a$1 } from '../../chunk-DJDHW6UR.mjs';
|
|
|
8
7
|
import { hasAnyDep, pkg } from '@anolilab/package-json-utils';
|
|
9
8
|
import { env } from 'process';
|
|
10
9
|
|
|
11
|
-
var t=a.rules,
|
|
12
|
-
Found prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824`)),x="off");var n=b["import/extensions"],o=b["import/no-extraneous-dependencies"],s=e["comma-dangle"],i={};pkg&&(i=pkg?.anolilab?.["eslint-config"]);var h=env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";i?.warn_on_unsupported_typescript_version!==void 0&&(h=i?.warn_on_unsupported_typescript_version);var j={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:h},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":x,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":g["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":d["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":d["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":g["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":C,semi:"off","@typescript-eslint/semi":_,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(v=>v.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error"}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},N=j;
|
|
10
|
+
var t=a.rules,m=a$1.rules,e=a$2.rules,d=a$3.rules,g=a$4.rules,r=a$5.rules,{quotes:w,semi:_,indent:j}=e,b={};hasAnyDep(["prettier"],{peerDeps:!1})&&(b={"@typescript-eslint/lines-around-comment":0,"@typescript-eslint/quotes":0,"@typescript-eslint/block-spacing":"off","@typescript-eslint/brace-style":"off","@typescript-eslint/comma-dangle":"off","@typescript-eslint/comma-spacing":"off","@typescript-eslint/func-call-spacing":"off","@typescript-eslint/indent":"off","@typescript-eslint/key-spacing":"off","@typescript-eslint/keyword-spacing":"off","@typescript-eslint/member-delimiter-style":"off","@typescript-eslint/no-extra-parens":"off","@typescript-eslint/no-extra-semi":"off","@typescript-eslint/object-curly-spacing":"off","@typescript-eslint/semi":"off","@typescript-eslint/space-before-blocks":"off","@typescript-eslint/space-before-function-paren":"off","@typescript-eslint/space-infix-ops":"off","@typescript-eslint/type-annotation-spacing":"off"});var n=g["import/extensions"],o=g["import/no-extraneous-dependencies"],s=e["comma-dangle"],i={};pkg&&(i=pkg?.anolilab?.["eslint-config"]);var x=env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";i?.warn_on_unsupported_typescript_version!==void 0&&(x=i?.warn_on_unsupported_typescript_version);var C={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:x},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":j,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":d["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":m["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":m["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":d["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":w,semi:"off","@typescript-eslint/semi":_,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(v=>v.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error",...b}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},q=C;
|
|
13
11
|
|
|
14
|
-
export {
|
|
12
|
+
export { q as default };
|
|
15
13
|
//# sourceMappingURL=out.js.map
|
|
16
14
|
//# sourceMappingURL=typescript.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","consoleLog","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","showUnsupportedTypeScriptVersionWarning","config","glob","typescript_default"],"mappings":"sTAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,CAAK,EAAIT,EACrB,CAAE,OAAAU,CAAO,EAAIV,EAEbP,EAAU,CAAC,UAAU,CAAC,IAEjB,OAAO,4CACR,OAAO,0CAA4C,GAEnDkB,EACI;AAAA,wLACJ,GAGJD,EAAS,OAGb,IAAME,EAAmBR,EAAa,mBAAmB,EACnDS,EAAiCT,EAAa,mCAAmC,EACjFU,EAAcd,EAAW,cAAc,EAEzCe,EAA6D,CAAC,EAE9DrB,IAEAqB,EAAuB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ACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi } = styleRules;\nlet { indent } = styleRules;\n\nif (hasAnyDep([\"prettier\"])) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigTypescriptPrettier) {\n global.hasAnolilabEsLintConfigTypescriptPrettier = true;\n\n consoleLog(\n \"\\nFound prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824\",\n );\n }\n\n indent = \"off\";\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet showUnsupportedTypeScriptVersionWarning: boolean = env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\";\n\nif (anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] !== undefined) {\n showUnsupportedTypeScriptVersionWarning = anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","prettierRules","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","showUnsupportedTypeScriptVersionWarning","config","glob","typescript_default"],"mappings":"yQAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAUpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,EAAM,OAAAC,CAAO,EAAIV,EAE7BW,EAAoC,CAAC,EAGrClB,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDkB,EAAgB,CACZ,0CAA2C,EAC3C,4BAA6B,EAC7B,mCAAoC,MACpC,iCAAkC,MAClC,kCAAmC,MACnC,mCAAoC,MACpC,uCAAwC,MACxC,4BAA6B,MAC7B,iCAAkC,MAClC,qCAAsC,MACtC,4CAA6C,MAC7C,qCAAsC,MACtC,m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AAqC,QAIrC,mDAAoD,QAIpD,6CAA8C,QAI9C,sCAAuC,QAIvC,6CAA8C,QAI9C,uDAAwD,MAIxD,8CAA+C,QAI/C,0CAA2C,QAI3C,+CAAgD,QAIhD,2CAA4C,QAG5C,iDAAkD,QAGlD,GAAGP,CACP,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOQ,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi, indent } = styleRules;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierRules = {\n \"@typescript-eslint/lines-around-comment\": 0,\n \"@typescript-eslint/quotes\": 0,\n \"@typescript-eslint/block-spacing\": \"off\",\n \"@typescript-eslint/brace-style\": \"off\",\n \"@typescript-eslint/comma-dangle\": \"off\",\n \"@typescript-eslint/comma-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": \"off\",\n \"@typescript-eslint/indent\": \"off\",\n \"@typescript-eslint/key-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": \"off\",\n \"@typescript-eslint/member-delimiter-style\": \"off\",\n \"@typescript-eslint/no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-semi\": \"off\",\n \"@typescript-eslint/object-curly-spacing\": \"off\",\n \"@typescript-eslint/semi\": \"off\",\n \"@typescript-eslint/space-before-blocks\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-infix-ops\": \"off\",\n \"@typescript-eslint/type-annotation-spacing\": \"off\",\n };\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet showUnsupportedTypeScriptVersionWarning: boolean = env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\";\n\nif (anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] !== undefined) {\n showUnsupportedTypeScriptVersionWarning = anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n\n // Disable rules that are handled by prettier\n ...prettierRules,\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkROX6JHFJ_js = require('../../chunk-ROX6JHFJ.js');
|
|
4
4
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
5
|
-
var
|
|
5
|
+
var t = require('semver');
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var t__default = /*#__PURE__*/_interopDefault(t);
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var i=chunkROX6JHFJ_js.a.rules,r={};packageJsonUtils.hasAnyDep(["prettier"],{peerDeps:!1})&&(r={"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"});var s={plugins:["unicorn"],extends:["plugin:unicorn/recommended"],rules:{"unicorn/prefer-node-protocol":t__default.default.gte(process.version,"v16.0.0")?"error":"off","unicorn/template-indent":["error",{indent:i.indent[1]}],"unicorn/no-array-for-each":"off","unicorn/prefer-module":packageJsonUtils.packageIsTypeModule?"error":"off","unicorn/better-regex":["error",{sortCharacterClasses:!1}],"unicorn/consistent-destructuring":"off","unicorn/no-null":"off","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prefer-json-parse-buffer":"off","unicorn/consistent-function-scoping":"off","unicorn/no-useless-undefined":"off","function-call-argument-newline":"off",...r},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"unicorn/import-style":"off"}}]},l=s;
|
|
12
12
|
|
|
13
13
|
module.exports = l;
|
|
14
14
|
//# sourceMappingURL=out.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","prettierRules","config","unicorn_default"],"mappings":"4CAAA,OAAS,aAAAA,EAAW,uBAAAC,MAA2B,+BAE/C,OAAOC,MAAY,SAInB,IAAMC,EAAaC,EAAY,MAE3BC,EAAoC,CAAC,EAGrCL,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDK,EAAgB,CACZ,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAMC,EAAwB,CAC1B,QAAS,CAAC,SAAS,EACnB,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,+BAAgCJ,EAAO,IAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MACnF,0BAA2B,CAAC,QAAS,CAAE,OAASC,EAAW,OAAoB,CAAC,CAAY,CAAC,EAC7F,4BAA6B,MAC7B,wBAAyBF,EAAsB,QAAU,MAGzD,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAGA,mCAAoC,MAGpC,kBAAmB,MAGnB,yBAA0B,CAAC,QAAS,kBAAkB,EAGtD,mCAAoC,MAGpC,sCAAuC,MAGvC,+BAAgC,MAGhC,iCAAkC,MAElC,GAAGI,CACP,EACA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { hasAnyDep, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport semver from \"semver\";\n\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierRules = {\n \"unicorn/empty-brace-spaces\": \"off\",\n \"unicorn/no-nested-ternary\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/template-indent\": \"off\",\n };\n}\n\n// @see https://github.com/sindresorhus/eslint-plugin-unicorn\nconst config: Linter.Config = {\n plugins: [\"unicorn\"],\n extends: [\"plugin:unicorn/recommended\"],\n rules: {\n \"unicorn/prefer-node-protocol\": semver.gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n \"unicorn/template-indent\": [\"error\", { indent: (styleRules[\"indent\"] as any[])[1] as number }],\n \"unicorn/no-array-for-each\": \"off\",\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\n // The character class sorting is a bit buggy at the moment.\n \"unicorn/better-regex\": [\n \"error\",\n {\n sortCharacterClasses: false,\n },\n ],\n\n // TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues\n \"unicorn/consistent-destructuring\": \"off\",\n\n // TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2021.\n \"unicorn/no-null\": \"off\",\n\n // We only enforce it for single-line statements to not be too opinionated.\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n\n ...prettierRules,\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a } from '../../chunk-6ZQSXLLR.mjs';
|
|
2
2
|
import { hasAnyDep, packageIsTypeModule } from '@anolilab/package-json-utils';
|
|
3
|
-
import
|
|
3
|
+
import t from 'semver';
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var i=a.rules,r={};hasAnyDep(["prettier"],{peerDeps:!1})&&(r={"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"});var s={plugins:["unicorn"],extends:["plugin:unicorn/recommended"],rules:{"unicorn/prefer-node-protocol":t.gte(process.version,"v16.0.0")?"error":"off","unicorn/template-indent":["error",{indent:i.indent[1]}],"unicorn/no-array-for-each":"off","unicorn/prefer-module":packageIsTypeModule?"error":"off","unicorn/better-regex":["error",{sortCharacterClasses:!1}],"unicorn/consistent-destructuring":"off","unicorn/no-null":"off","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/prefer-json-parse-buffer":"off","unicorn/consistent-function-scoping":"off","unicorn/no-useless-undefined":"off","function-call-argument-newline":"off",...r},overrides:[{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"unicorn/import-style":"off"}}]},l=s;
|
|
6
6
|
|
|
7
7
|
export { l as default };
|
|
8
8
|
//# sourceMappingURL=out.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","prettierRules","config","unicorn_default"],"mappings":"6CAAA,OAAS,aAAAA,EAAW,uBAAAC,MAA2B,+BAE/C,OAAOC,MAAY,SAInB,IAAMC,EAAaC,EAAY,MAE3BC,EAAoC,CAAC,EAGrCL,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDK,EAAgB,CACZ,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAMC,EAAwB,CAC1B,QAAS,CAAC,SAAS,EACnB,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,+BAAgCJ,EAAO,IAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MACnF,0BAA2B,CAAC,QAAS,CAAE,OAASC,EAAW,OAAoB,CAAC,CAAY,CAAC,EAC7F,4BAA6B,MAC7B,wBAAyBF,EAAsB,QAAU,MAGzD,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAGA,mCAAoC,MAGpC,kBAAmB,MAGnB,yBAA0B,CAAC,QAAS,kBAAkB,EAGtD,mCAAoC,MAGpC,sCAAuC,MAGvC,+BAAgC,MAGhC,iCAAkC,MAElC,GAAGI,CACP,EACA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { hasAnyDep, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport semver from \"semver\";\n\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierRules = {\n \"unicorn/empty-brace-spaces\": \"off\",\n \"unicorn/no-nested-ternary\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/template-indent\": \"off\",\n };\n}\n\n// @see https://github.com/sindresorhus/eslint-plugin-unicorn\nconst config: Linter.Config = {\n plugins: [\"unicorn\"],\n extends: [\"plugin:unicorn/recommended\"],\n rules: {\n \"unicorn/prefer-node-protocol\": semver.gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n \"unicorn/template-indent\": [\"error\", { indent: (styleRules[\"indent\"] as any[])[1] as number }],\n \"unicorn/no-array-for-each\": \"off\",\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\n // The character class sorting is a bit buggy at the moment.\n \"unicorn/better-regex\": [\n \"error\",\n {\n sortCharacterClasses: false,\n },\n ],\n\n // TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues\n \"unicorn/consistent-destructuring\": \"off\",\n\n // TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2021.\n \"unicorn/no-null\": \"off\",\n\n // We only enforce it for single-line statements to not be too opinionated.\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n\n ...prettierRules,\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|