@anolilab/eslint-config 9.0.2 → 9.0.4
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/dist/chunk-3Y2MNMYX.js +8 -0
- package/dist/chunk-3Y2MNMYX.js.map +1 -0
- package/dist/config/plugins/antfu.js +2 -2
- package/dist/config/plugins/array-func.js +2 -2
- package/dist/config/plugins/babel.js +2 -2
- package/dist/config/plugins/es.js +2 -2
- package/dist/config/plugins/eslint-comments.js +3 -2
- package/dist/config/plugins/eslint-comments.js.map +1 -1
- package/dist/config/plugins/etc.js +2 -2
- package/dist/config/plugins/jsonc.js +3 -3
- package/dist/config/plugins/jsonc.js.map +1 -1
- package/dist/config/plugins/markdown.js +3 -2
- package/dist/config/plugins/markdown.js.map +1 -1
- package/dist/config/plugins/mdx.js +3 -2
- package/dist/config/plugins/mdx.js.map +1 -1
- package/dist/config/plugins/perfectionist.js +2 -2
- package/dist/config/plugins/react-hooks.js +2 -2
- package/dist/config/plugins/react-redux.js +2 -2
- package/dist/config/plugins/react-usememo.js +2 -2
- package/dist/config/plugins/react.js +1 -1
- package/dist/config/plugins/react.js.map +1 -1
- package/dist/config/plugins/regexp.js +2 -2
- package/dist/config/plugins/simple-import-sort.js +3 -2
- package/dist/config/plugins/simple-import-sort.js.map +1 -1
- package/dist/config/plugins/sonarjs.js +2 -2
- package/dist/config/plugins/tailwindcss.js +2 -2
- package/dist/config/plugins/tanstack-query.js +2 -2
- package/dist/config/plugins/testing-library.js +2 -2
- package/dist/config/plugins/tsdoc.js +2 -2
- package/dist/config/plugins/typescript.js +1 -1
- package/dist/config/plugins/typescript.js.map +1 -1
- package/dist/config/plugins/you-dont-need-lodash-underscore.js +2 -2
- package/dist/config/plugins/you-dont-need-momentjs.js +2 -2
- package/dist/config/plugins/zod.js +2 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/typescript-type-checking.js +5 -3
- package/dist/typescript-type-checking.js.map +1 -1
- package/globals.js +1 -0
- package/package.json +7 -2
- package/typescript-type-checking.js +1 -0
- package/dist/chunk-YRRY5AGG.js +0 -8
- package/dist/chunk-YRRY5AGG.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasDependency","hasDevDependency","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","indent","quotes","semi","importExtensions","importNoExtraneousDependencies","commaDangle","showUnsupportedTypeScriptVersionWarning","eslint_config_default","config","glob","typescript_default"],"mappings":"+WAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAEhD,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAiBC,EAAc,UAAsC,CAAC,EAA4B,MAClGC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,OAAAC,EAAQ,KAAAC,CAAK,EAAIV,EAE7B,OAAO,8CAAgD,SAAcP,EAAc,UAAU,GAAKC,EAAiB,UAAU,KAC7H,OAAO,4CAA8C,CACjD,mCAAoC,MACpC,iCAAkC,MAClC,kCAAmC,MACnC,mCAAoC,MACpC,uCAAwC,MACxC,4BAA6B,MAC7B,iCAAkC,MAClC,qCAAsC,MACtC,0CAA2C,EAC3C,4CAA6C,MAC7C,qCAAsC,MACtC,mCAAoC,MACpC,0CAA2C,MAC3C,4BAA6B,EAC7B,0BAA2B,MAC3B,yCAA0C,MAC1C,iDAAkD,MAClD,qCAAsC,MACtC,6CAA8C,KAClD,GAGJ,IAAMiB,EAAmBP,EAAa,mBAAmB,EACnDQ,EAAiCR,EAAa,mCAAmC,EACjFS,EAAcb,EAAW,cAAc,EAEzCc,EAAmDnB,EAAI,qDAA0D,OAEjHoB,EAAqB,yCAA8C,SACnED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ency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\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.overrides as Linter.ConfigOverride[])[0] as Linter.ConfigOverride).rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { indent, quotes, semi } = styleRules;\n\nif (global.anolilabEslintConfigTypescriptPrettierRules === undefined && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.anolilabEslintConfigTypescriptPrettierRules = {\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/lines-around-comment\": 0,\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/quotes\": 0,\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 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 extends: [\n \"plugin:import/typescript\",\n // TODO: enable the rule when typescript-eslint 6.0.0 is released\n // \"plugin:@typescript-eslint/recommended\",\n // \"plugin:@typescript-eslint/stylistic\",\n // \"plugin:@typescript-eslint/strict\",\n ],\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n sourceType: \"module\",\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n plugins: [\"@typescript-eslint\"],\n rules: {\n // Disabled because of perfectionist/sort-interfaces rule\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\": \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\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 // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n Array: { message: \"Provide a more specific type\" },\n Boolean: { fixWith: \"boolean\", message: \"Use boolean instead\" },\n Number: { fixWith: \"number\", message: \"Use number instead\" },\n Object: { fixWith: \"object\", message: \"Use object instead\" },\n String: { fixWith: \"string\", message: \"Use string instead\" },\n },\n },\n ],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\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-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 \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\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 // Replace 'comma-spacing' rule with '@typescript-eslint' version\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 // 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 // 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 // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'indent' rule with '@typescript-eslint' version\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\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 // 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 // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\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 format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n selector: \"variable\",\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n format: [\"camelCase\", \"PascalCase\"],\n selector: \"function\",\n },\n\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 format: [\"PascalCase\"],\n selector: \"typeLike\",\n },\n ],\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\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 \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-empty-function' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\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 // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\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 // 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 \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-redeclare' rule with '@typescript-eslint' version\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 \"@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/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\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 // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-unused-vars' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-use-before-define' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\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 // 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 // Replace 'quotes' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'semi' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-return-await' rule with '@typescript-eslint' version\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 // 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 // Replace 'space-infix-ops' rule with '@typescript-eslint' version\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 // 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 // Append 'ts' and 'tsx' to 'import/extensions' rule\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 // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n \"@typescript-eslint/quotes\": quotes,\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n \"@typescript-eslint/semi\": semi,\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 \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\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 // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\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 \"getter-return\": \"off\",\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 \"import/named\": \"off\",\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\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 // Enforce consistent usage of type imports.\n \"import/no-unresolved\": \"off\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n\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\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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n \"no-const-assign\": \"off\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n \"no-dupe-args\": \"off\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\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\n // Require explicit accessibility modifiers on class properties and methods.\n \"no-dupe-keys\": \"off\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\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\n // Enforce using a particular method signature syntax.\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\n // Disallow non-null assertion in locations that may be confusing.\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\n // Disallow duplicate enum member values.\n \"no-func-assign\": \"off\",\n\n // Disallow using to delete operator on computed key expressions.\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\n // Disallow extra non-null assertions.\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\n // Disallow void type outside of generic or return types.\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\n // Enforce valid definition of new and constructor.\n \"no-new-func\": \"off\",\n\n // Disallow TypeScript namespaces.\n \"no-new-symbol\": \"off\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n \"no-obj-calls\": \"off\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n\n // Disallow aliasing this.\n \"no-this-before-super\": \"off\",\n\n // Disallow type assertions that do not change the type of expression.\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Disallow unnecessary constraints on generic types.\n \"no-undef\": \"off\",\n\n // Disallow calling a function with a value with type any.\n \"no-unreachable\": \"off\",\n\n // Disallow assigning a value with type any to variables and properties.\n \"no-unsafe-negation\": \"off\",\n\n // Disallow calling a value with type any.\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\n // Disallow unsafe declaration merging.\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\n // Disallow member access on a value with type any.\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\n // Disallow returning a value with type any from a function.\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\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n \"react/require-default-props\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n\n // Enforce using function types instead of interfaces with call signatures.\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\n // Enforce using the nullish coalescing operator instead of logical chaining.\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\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n \"valid-typeof\": \"off\",\n\n // Disable rules that are handled by prettier\n ...global.anolilabEslintConfigTypescriptPrettierRules,\n },\n settings: {\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 // 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 },\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":["hasDependency","hasDevDependency","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","indent","quotes","semi","importExtensions","importNoExtraneousDependencies","commaDangle","showUnsupportedTypeScriptVersionWarning","eslint_config_default","config","glob","typescript_default"],"mappings":"+WAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAEhD,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,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AAyB,MAIzB,iBAAkB,MAIlB,uBAAwB,MAIxB,yBAA0B,MAI1B,OAAQ,MAGR,8BAA+B,MAI/B,KAAM,MAIN,8BAA+B,MAI/B,kBAAmB,MAInB,OAAQ,MAER,eAAgB,MAGhB,GAAG,OAAO,2CACd,EACA,SAAU,CAEN,oBAAqB,CAAC,MAAO,OAAQ,OAAQ,MAAO,OAAQ,OAAO,EAGnE,iCAAkC,CAAC,eAAgB,qBAAqB,EAGxE,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAO,CACxD,EAGA,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,OAAQ,MAAO,QAAS,MAAO,OAAO,CAC/D,CACJ,CACJ,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\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.overrides as Linter.ConfigOverride[])[0] as Linter.ConfigOverride).rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { indent, quotes, semi } = styleRules;\n\nif (global.anolilabEslintConfigTypescriptPrettierRules === undefined && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.anolilabEslintConfigTypescriptPrettierRules = {\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/lines-around-comment\": 0,\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/quotes\": 0,\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 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 extends: [\n \"plugin:import/typescript\",\n // TODO: enable the rule when typescript-eslint 6.0.0 is released\n // \"plugin:@typescript-eslint/recommended\",\n // \"plugin:@typescript-eslint/stylistic\",\n // \"plugin:@typescript-eslint/strict\",\n ],\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n sourceType: \"module\",\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n plugins: [\"@typescript-eslint\"],\n rules: {\n // Disabled because of perfectionist/sort-interfaces rule\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\": \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\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 // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n Array: { message: \"Provide a more specific type\" },\n Boolean: { fixWith: \"boolean\", message: \"Use boolean instead\" },\n Number: { fixWith: \"number\", message: \"Use number instead\" },\n Object: { fixWith: \"object\", message: \"Use object instead\" },\n String: { fixWith: \"string\", message: \"Use string instead\" },\n },\n },\n ],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\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-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 \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\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 // Replace 'comma-spacing' rule with '@typescript-eslint' version\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 // 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 // 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 // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'indent' rule with '@typescript-eslint' version\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // Disabled because of perfectionist/sort-interfaces rule\n \"@typescript-eslint/member-ordering\": \"off\",\n\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 // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\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 format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n selector: \"variable\",\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n format: [\"camelCase\", \"PascalCase\"],\n selector: \"function\",\n },\n\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 format: [\"PascalCase\"],\n selector: \"typeLike\",\n },\n ],\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\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 \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-empty-function' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\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 // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\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 // 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 \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-redeclare' rule with '@typescript-eslint' version\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 \"@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/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\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 // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-unused-vars' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-use-before-define' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\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 // 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 // Replace 'quotes' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'semi' rule with '@typescript-eslint' version\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\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 // 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 // Replace 'no-return-await' rule with '@typescript-eslint' version\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 // 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 // Replace 'space-infix-ops' rule with '@typescript-eslint' version\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 // 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 // Append 'ts' and 'tsx' to 'import/extensions' rule\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 // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n \"@typescript-eslint/quotes\": quotes,\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n \"@typescript-eslint/semi\": semi,\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 \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\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 // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\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 \"getter-return\": \"off\",\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 \"import/named\": \"off\",\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\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 // Enforce consistent usage of type imports.\n \"import/no-unresolved\": \"off\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n\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\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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n \"no-const-assign\": \"off\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n \"no-dupe-args\": \"off\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\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\n // Require explicit accessibility modifiers on class properties and methods.\n \"no-dupe-keys\": \"off\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\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\n // Enforce using a particular method signature syntax.\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\n // Disallow non-null assertion in locations that may be confusing.\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\n // Disallow duplicate enum member values.\n \"no-func-assign\": \"off\",\n\n // Disallow using to delete operator on computed key expressions.\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\n // Disallow extra non-null assertions.\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\n // Disallow void type outside of generic or return types.\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\n // Enforce valid definition of new and constructor.\n \"no-new-func\": \"off\",\n\n // Disallow TypeScript namespaces.\n \"no-new-symbol\": \"off\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n \"no-obj-calls\": \"off\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n\n // Disallow aliasing this.\n \"no-this-before-super\": \"off\",\n\n // Disallow type assertions that do not change the type of expression.\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Disallow unnecessary constraints on generic types.\n \"no-undef\": \"off\",\n\n // Disallow calling a function with a value with type any.\n \"no-unreachable\": \"off\",\n\n // Disallow assigning a value with type any to variables and properties.\n \"no-unsafe-negation\": \"off\",\n\n // Disallow calling a value with type any.\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\n // Disallow unsafe declaration merging.\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\n // Disallow member access on a value with type any.\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\n // Disallow returning a value with type any from a function.\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\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n \"react/require-default-props\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n\n // Enforce using function types instead of interfaces with call signatures.\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\n // Enforce using the nullish coalescing operator instead of logical chaining.\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\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n \"valid-typeof\": \"off\",\n\n // Disable rules that are handled by prettier\n ...global.anolilabEslintConfigTypescriptPrettierRules,\n },\n settings: {\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 // 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 },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3Y2MNMYX_js = require('../../chunk-3Y2MNMYX.js');
|
|
4
4
|
require('../../chunk-3NVDJZNH.js');
|
|
5
5
|
|
|
6
|
-
var o=
|
|
6
|
+
var o=chunk3Y2MNMYX_js.a("all",{extends:["plugin:you-dont-need-lodash-underscore/compatible"]}),n=o;
|
|
7
7
|
|
|
8
8
|
module.exports = n;
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3Y2MNMYX_js = require('../../chunk-3Y2MNMYX.js');
|
|
4
4
|
require('../../chunk-3NVDJZNH.js');
|
|
5
5
|
|
|
6
|
-
var n=
|
|
6
|
+
var n=chunk3Y2MNMYX_js.a("all",{extends:["plugin:you-dont-need-momentjs/recommended"]}),t=n;
|
|
7
7
|
|
|
8
8
|
module.exports = t;
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3Y2MNMYX_js = require('../../chunk-3Y2MNMYX.js');
|
|
4
4
|
require('../../chunk-3NVDJZNH.js');
|
|
5
5
|
|
|
6
|
-
var e=
|
|
6
|
+
var e=chunk3Y2MNMYX_js.a("all",{plugins:["zod"],rules:{"zod/prefer-enum":"error","zod/require-strict":"error"}}),t=e;
|
|
7
7
|
|
|
8
8
|
module.exports = t;
|
|
9
9
|
//# sourceMappingURL=out.js.map
|
package/dist/index.js
CHANGED
|
@@ -5,22 +5,22 @@ var chunkX3W6J3PZ_js = require('./chunk-X3W6J3PZ.js');
|
|
|
5
5
|
require('./chunk-3NVDJZNH.js');
|
|
6
6
|
require('@rushstack/eslint-patch/modern-module-resolution');
|
|
7
7
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
8
|
-
var
|
|
8
|
+
var x = require('globals');
|
|
9
9
|
var path = require('path');
|
|
10
|
-
var
|
|
10
|
+
var k = require('semver');
|
|
11
11
|
|
|
12
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var x__default = /*#__PURE__*/_interopDefault(x);
|
|
15
|
+
var k__default = /*#__PURE__*/_interopDefault(k);
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var w=["best-practices","errors","style","es6","variables"],d=["compat","eslint-comments","import","promise","simple-import-sort","no-extend-native","node","no-secrets","sonarjs","security","regexp","jsonc","markdown","toml","yml","html","antfu","unicorn","es","perfectionist"],E=[{configName:"array-func",dependencies:["eslint-plugin-array-func"]},{configName:"jsdoc",dependencies:["eslint-plugin-jsdoc"]},{configName:"tsdoc",dependencies:["eslint-plugin-tsdoc","typescript"]},{configName:"lodash",dependencies:["lodash","eslint-plugin-lodash"]},{configName:"lodash-fp",dependencies:["lodash","eslint-plugin-lodash-fp"]},{configName:"you-dont-need-lodash-underscore",dependencies:["lodash","eslint-plugin-you-dont-need-lodash-underscore"]},{configName:"mdx",dependencies:["eslint-plugin-mdx"],oneOfDependency:["nextra","docz","@docusaurus/core","gatsby-plugin-mdx"],resolve:["@mdx-js/mdx","remark-mdx","@mdx-js/loader","@mdx-js/rollup","@mdx-js/react"]},{configName:"no-unsanitized",dependencies:["eslint-plugin-no-unsanitized"]},{configName:"react",dependencies:["react","react-dom","eslint-plugin-react"]},{configName:"react-redux",dependencies:["eslint-plugin-react-redux"],oneOfDependency:["@reduxjs/toolkit","redux"]},{configName:"jsx-a11y",dependencies:["react","react-dom","eslint-plugin-jsx-a11y"]},{configName:"react-hooks",dependencies:["react","react-dom","eslint-plugin-react-hooks"]},{configName:"react-usememo",dependencies:["react","react-dom","@arthurgeron/eslint-plugin-react-usememo"]},{configName:"you-dont-need-momentjs",dependencies:["moment","eslint-plugin-you-dont-need-momentjs"]},{configName:"you-dont-need-momentjs",dependencies:["moment-timezone","eslint-plugin-you-dont-need-momentjs"]},{configName:"tailwindcss",dependencies:["eslint-plugin-tailwindcss"]},{configName:"cypress",dependencies:["cypress","eslint-plugin-cypress"]},{configName:"jest",dependencies:["jest","eslint-plugin-jest"]},{configName:"jest-dom",dependencies:["jest","@testing-library/jest-dom","eslint-plugin-jest-dom"]},{configName:"jest-async",dependencies:["jest","eslint-plugin-jest-async"]},{configName:"jest-formatting",dependencies:["jest","eslint-plugin-jest-formatting"]},{configName:"tailwindcss",dependencies:["tailwindcss"]},{configName:"testing-library",dependencies:["@testing-library/dom","eslint-plugin-testing-library"]},{configName:"testing-library",dependencies:["react","@testing-library/react","eslint-plugin-testing-library"]},{configName:"typescript",dependencies:["typescript"]},{configName:"etc",dependencies:["typescript","eslint-plugin-etc"]},{configName:"vitest",dependencies:["vitest","eslint-plugin-vitest"]},{configName:"zod",dependencies:["zod","eslint-plugin-zod"]},{configName:"ava",dependencies:["ava","eslint-plugin-ava"]},{configName:"storybook",dependencies:["storybook","eslint-plugin-storybook"]},{configName:"playwright",dependencies:["playwright","eslint-plugin-playwright"]},{configName:"tanstack-query",dependencies:["@tanstack/react-query","@tanstack/eslint-plugin-query"]}],m=[...d],r={};E.forEach(n=>{let{configName:e,dependencies:i}=n;if(chunkX3W6J3PZ_js.a.plugin?.[e]!==!1){let a=[];i.forEach(s=>{(packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s))&&a.push(s);}),r[e]={},a.length===0&&n.resolve!==void 0&&n.resolve.forEach(s=>{packageJsonUtils.resolvePackage(s)!==void 0&&i.forEach(o=>{r[e][o]=packageJsonUtils.hasDependency(o)||packageJsonUtils.hasDevDependency(o);});}),a.length===0&&n.oneOfDependency!==void 0&&n.oneOfDependency.forEach(s=>{(packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s))&&[...i,...n.oneOfDependency].forEach(o=>{r[e][o]=packageJsonUtils.hasDependency(o)||packageJsonUtils.hasDevDependency(o);});}),a.length===i.length?(delete r[e],m.push(e)):i.forEach(s=>{r[e][s]=packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s);});}});var u=w,b=m,h=r;var D={"n/prefer-global/text-decoder":{"11.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"unicorn/prefer-spread":{"5.0.0":"off"}},y=D;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(chunkSEYYGHPU_js.b(`
|
|
18
18
|
@anolilab/eslint-config loaded the following plugins:
|
|
19
|
-
`),chunkSEYYGHPU_js.b(" @rushstack/eslint-plugin-security"),
|
|
20
|
-
Your package.json container dependencies for the "${e}" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`),Object.entries(
|
|
19
|
+
`),chunkSEYYGHPU_js.b(" @rushstack/eslint-plugin-security"),d.map(e=>e==="import"?"i":e==="node"?"n":e).forEach(e=>chunkSEYYGHPU_js.a(e)));let n=!1;Object.entries(h).forEach(([e,i])=>{Object.values(i).some(Boolean)&&(n=!0,chunkSEYYGHPU_js.b(`
|
|
20
|
+
Your package.json container dependencies for the "${e}" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`),Object.entries(i).forEach(([s,o])=>{o||chunkSEYYGHPU_js.b(` ${s}`);}));}),n&&(chunkSEYYGHPU_js.b(`
|
|
21
21
|
To disable this message, add the following to your package.json:`),chunkSEYYGHPU_js.b(` "anolilab": { "eslint-config": { plugin: { "plugin-name": false } } }
|
|
22
|
-
`)),chunkSEYYGHPU_js.b('To disable all logging, add the following to your eslint command call "NO_LOGS=true eslint ..."'),global.hasAnolilabEsLintConfigLoaded=!0;}var
|
|
23
|
-
Found prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier`));var
|
|
22
|
+
`)),chunkSEYYGHPU_js.b('To disable all logging, add the following to your eslint command call "NO_LOGS=true eslint ..."'),global.hasAnolilabEsLintConfigLoaded=!0;}var _={},f;packageJsonUtils.pkg?.engines?.node&&(f=packageJsonUtils.pkg.engines.node);Object.entries(y).forEach(([n,e])=>{Object.keys(e).sort(k__default.default.rcompare).forEach(i=>{f&&k__default.default.intersects(f,`<${i}`)&&(_[n]=e[i]);});});!global.hasAnolilabEsLintConfigPrettier&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.hasAnolilabEsLintConfigPrettier=!0,chunkX3W6J3PZ_js.a.info_on_disabling_prettier_conflict_rule!==!1&&chunkSEYYGHPU_js.b(`
|
|
23
|
+
Found prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier`));var C={extends:[...u.map(n=>path.join(__dirname,`./config/${n}.js`)),...b.map(n=>path.join(__dirname,`./config/plugins/${n}.js`))],globals:{...x__default.default.browser,...x__default.default.nodeBuiltin},ignorePatterns:["!.*",".git/","node_modules/","bower_components/","jspm_packages/",".npm/","lib-cov/","coverage/",".nyc_output/",".cache/","build/","dist/","tmp/","**/*.min.*","*.d.ts","pnpm-lock.yaml"],overrides:[{files:["**/migrations/*.{js,ts}"],rules:{"filenames/match-regex":"off"}},{files:["**/*.spec.{js,ts,tsx}","**/*.test.{js,ts,tsx}","**/__mocks__/*.{js,ts,tsx}","**/__tests__/*.{js,ts,tsx}","**/test/*.{js,ts,tsx}"],rules:{"no-magic-numbers":"off","sonarjs/no-duplicate-string":"off"}},{files:packageJsonUtils.packageIsTypeModule?["*.js","*.mjs"]:["*.mjs"],parser:"@babel/eslint-parser",parserOptions:{babelOptions:{plugins:["@babel/plugin-syntax-import-assertions"]},requireConfigFile:!1}}],parser:"",rules:{..._}},Y=C;
|
|
24
24
|
|
|
25
25
|
module.exports = Y;
|
|
26
26
|
//# sourceMappingURL=out.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasDependency","hasDevDependency","pkg","globals","join","semver","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","plugin","configName","dependencies","eslint_config_default","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"mHAYA,MAAO,mDAEP,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,OAAAC,MAAW,+BAErD,OAAOC,MAAa,UACpB,OAAS,QAAAC,MAAY,OACrB,OAAOC,MAAY,SClBnB,OAAS,iBAAAL,EAAe,oBAAAC,MAAwB,+BAKhD,IAAMK,EAAa,CAAC,iBAAkB,SAAU,QAAS,MAAO,WAAW,EAErEC,EAAuB,CACzB,SACA,kBACA,SACA,UACA,qBACA,mBACA,OAEA,aACA,UACA,WACA,SAEA,QACA,WACA,OACA,MACA,OAGA,QACA,UACA,KACA,eACJ,EAEMC,EAA6B,CAC/B,CACI,WAAY,aACZ,aAAc,CAAC,0BAA0B,CAC7C,EACA,CACI,WAAY,QACZ,aAAc,CAAC,qBAAqB,CACxC,EACA,CACI,WAAY,QACZ,aAAc,CAAC,sBAAuB,YAAY,CACtD,EACA,CACI,WAAY,SACZ,aAAc,CAAC,SAAU,sBAAsB,CACnD,EACA,CACI,WAAY,YACZ,aAAc,CAAC,SAAU,yBAAyB,CACtD,EACA,CACI,WAAY,kCACZ,aAAc,CAAC,SAAU,+CAA+C,CAC5E,EACA,CACI,WAAY,MACZ,aAA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AErCa,EAAqB,2CAAgD,IACrEQ,EAAW;AAAA,8GAAiH,GAIpI,IAAMS,EAAwB,CAO1B,QAAS,CACL,GAAGd,EAAM,IAAKN,GAAWP,EAAK,UAAW,YAAYO,CAAM,KAAK,CAAC,EAEjE,GAAGO,EAAY,IAAKP,GAAWP,EAAK,UAAW,oBAAoBO,CAAM,KAAK,CAAC,CACnF,EACA,QAAS,CACL,GAAGR,EAAQ,QACX,GAAGA,EAAQ,WACf,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,SAEA,gBACJ,EACA,UAAW,CACP,CACI,MAAO,CAAC,yBAAyB,EACjC,MAAO,CACH,wBAAyB,KAC7B,CACJ,EACA,CACI,MAAO,CAEH,wBACA,wBAGA,6BACA,6BAGA,uBACJ,EACA,MAAO,CACH,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,CACJ,EAEA,OAAQ,GAER,MAAO,CACH,GAAGuB,CACP,CACJ,EAEOM,EAAQD","sourcesContent":["/**\n * rushstack eslint-patch is used to include plugins as dev\n * dependencies instead of imposing them as peer dependencies\n *\n * {@link https://www.npmjs.com/package/@rushstack/eslint-patch}\n * {@link https://stackoverflow.com/a/74478635/1392749}\n * {@link https://github.com/eslint/eslint/issues/3458}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-1/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-2/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-3/}\n * {@link https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new}\n */\nimport \"@rushstack/eslint-patch/modern-module-resolution\";\n\nimport { hasDependency, hasDevDependency, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport globals from \"globals\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { pluginRules, possiblePluginRules, rules } from \"./config\";\nimport engineRules from \"./engine-node-overwrite\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\nimport { consoleLog, consolePlugin } from \"./utils/loggers\";\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigLoaded) {\n if (process.env[\"DEBUG\"]) {\n consoleLog(\"\\n@anolilab/eslint-config loaded the following plugins:\\n\");\n\n consoleLog(\" @rushstack/eslint-plugin-security\");\n [\n \"compat\",\n \"eslint-comments\",\n \"i\",\n \"promise\",\n \"simple-import-sort\",\n \"unicorn\",\n \"no-secrets\",\n \"sonarjs\",\n \"json\",\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"es\",\n ...pluginRules,\n ].forEach((plugin) => consolePlugin(plugin));\n }\n\n let hasLogged: boolean = false;\n\n Object.entries(possiblePluginRules).forEach(([plugin, dependencies]) => {\n const hasOneDependency = Object.values(dependencies).some(Boolean);\n\n if (hasOneDependency) {\n hasLogged = true;\n\n consoleLog(\n `\\nYour package.json container dependencies for the \"${plugin}\" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`,\n );\n\n Object.entries(dependencies).forEach(([dependency, installed]) => {\n if (!installed) {\n consoleLog(` ${dependency}`);\n }\n });\n }\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (hasLogged) {\n consoleLog(\"\\nTo disable this message, add the following to your package.json:\");\n consoleLog(' \"anolilab\": { \"eslint-config\": { plugin: { \"plugin-name\": false } } }\\n');\n }\n\n consoleLog('To disable all logging, add the following to your eslint command call \"NO_LOGS=true eslint ...\"');\n\n global.hasAnolilabEsLintConfigLoaded = true;\n}\n\nconst configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nObject.entries(engineRules).forEach(([rule, ruleConfig]) => {\n Object.keys(ruleConfig)\n .sort(semver.rcompare)\n .forEach((minVersion) => {\n if (nodeVersion && semver.intersects(nodeVersion, `<${minVersion}`)) {\n // eslint-disable-next-line security/detect-object-injection\n configRules[rule] = ruleConfig[minVersion as keyof typeof ruleConfig] as Linter.RuleEntry;\n }\n });\n});\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n\n if (anolilabEslintConfig[\"info_on_disabling_prettier_conflict_rule\"] !== false) {\n consoleLog(\"\\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier\");\n }\n}\n\nconst config: Linter.Config = {\n // After an .eslintrc.js file is loaded, ESLint will normally continue visiting all parent folders\n // to look for other .eslintrc.js files, and also consult a personal file ~/.eslintrc.js. If any files\n // are found, their options will be merged. This is difficult for humans to understand, and it will cause\n // nondeterministic behavior if files are loaded from outside the Git working folder.\n //\n // Setting root=true causes ESLint to stop looking for other config files after the first .eslintrc.js\n extends: [\n ...rules.map((plugin) => join(__dirname, `./config/${plugin}.js`)),\n\n ...pluginRules.map((plugin) => join(__dirname, `./config/plugins/${plugin}.js`)),\n ],\n globals: {\n ...globals.browser,\n ...globals.nodeBuiltin,\n },\n ignorePatterns: [\n \"!.*\",\n\n \".git/\",\n \"node_modules/\",\n \"bower_components/\",\n \"jspm_packages/\",\n \".npm/\",\n\n \"lib-cov/\",\n \"coverage/\",\n \".nyc_output/\",\n \".cache/\",\n\n \"build/\",\n \"dist/\",\n \"tmp/\",\n\n \"**/*.min.*\",\n\n // Manually authored .d.ts files are generally used to describe external APIs that are not expected\n // to follow our coding conventions. Linting those files tends to produce a lot of spurious suppressions,\n // so we simply ignore them.\n \"*.d.ts\",\n\n \"pnpm-lock.yaml\",\n ],\n overrides: [\n {\n files: [\"**/migrations/*.{js,ts}\"],\n rules: {\n \"filenames/match-regex\": \"off\",\n },\n },\n {\n files: [\n // Test files\n \"**/*.spec.{js,ts,tsx}\",\n \"**/*.test.{js,ts,tsx}\",\n\n // Facebook convention\n \"**/__mocks__/*.{js,ts,tsx}\",\n \"**/__tests__/*.{js,ts,tsx}\",\n\n // Microsoft convention\n \"**/test/*.{js,ts,tsx}\",\n ],\n rules: {\n \"no-magic-numbers\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n ],\n // Disable the parser by default\n parser: \"\",\n // is loaded.\n rules: {\n ...configRules,\n },\n};\n\nexport default config;\n","import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\n\nimport type { PackageRules } from \"./types\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\n\nconst baseConfig = [\"best-practices\", \"errors\", \"style\", \"es6\", \"variables\"];\n\nconst internalPluginConfig = [\n \"compat\",\n \"eslint-comments\",\n \"import\",\n \"promise\",\n \"simple-import-sort\",\n \"no-extend-native\",\n \"node\",\n // Security Rules\n \"no-secrets\",\n \"sonarjs\",\n \"security\",\n \"regexp\",\n // file rules\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"html\",\n\n // custom rules\n \"antfu\",\n \"unicorn\",\n \"es\",\n \"perfectionist\",\n];\n\nconst pluginConfig: PackageRules = [\n {\n configName: \"array-func\",\n dependencies: [\"eslint-plugin-array-func\"],\n },\n {\n configName: \"jsdoc\",\n dependencies: [\"eslint-plugin-jsdoc\"],\n },\n {\n configName: \"tsdoc\",\n dependencies: [\"eslint-plugin-tsdoc\", \"typescript\"],\n },\n {\n configName: \"lodash\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash\"],\n },\n {\n configName: \"lodash-fp\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash-fp\"],\n },\n {\n configName: \"you-dont-need-lodash-underscore\",\n dependencies: [\"lodash\", \"eslint-plugin-you-dont-need-lodash-underscore\"],\n },\n {\n configName: \"mdx\",\n dependencies: [\"eslint-plugin-mdx\"],\n },\n {\n configName: \"no-unsanitized\",\n dependencies: [\"eslint-plugin-no-unsanitized\"],\n },\n {\n configName: \"react\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react\"],\n },\n {\n configName: \"react-redux\",\n dependencies: [\"redux\", \"eslint-plugin-react-redux\"],\n },\n {\n configName: \"react-redux\",\n dependencies: [\"@reduxjs/toolkit\", \"eslint-plugin-react-redux\"],\n },\n {\n configName: \"jsx-a11y\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-jsx-a11y\"],\n },\n {\n configName: \"react-hooks\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react-hooks\"],\n },\n {\n configName: \"react-usememo\",\n dependencies: [\"react\", \"react-dom\", \"@arthurgeron/eslint-plugin-react-usememo\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment-timezone\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"eslint-plugin-tailwindcss\"],\n },\n {\n configName: \"cypress\",\n dependencies: [\"cypress\", \"eslint-plugin-cypress\"],\n },\n {\n configName: \"jest\",\n dependencies: [\"jest\", \"eslint-plugin-jest\"],\n },\n {\n configName: \"jest-dom\",\n dependencies: [\"jest\", \"@testing-library/jest-dom\", \"eslint-plugin-jest-dom\"],\n },\n {\n configName: \"jest-async\",\n dependencies: [\"jest\", \"eslint-plugin-jest-async\"],\n },\n {\n configName: \"jest-formatting\",\n dependencies: [\"jest\", \"eslint-plugin-jest-formatting\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"tailwindcss\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"@testing-library/dom\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"react\", \"@testing-library/react\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"typescript\",\n dependencies: [\"typescript\"],\n },\n {\n configName: \"etc\",\n dependencies: [\"typescript\", \"eslint-plugin-etc\"],\n },\n {\n configName: \"vitest\",\n dependencies: [\"vitest\", \"eslint-plugin-vitest\"],\n },\n {\n configName: \"zod\",\n dependencies: [\"zod\", \"eslint-plugin-zod\"],\n },\n {\n configName: \"ava\",\n dependencies: [\"ava\", \"eslint-plugin-ava\"],\n },\n {\n configName: \"storybook\",\n dependencies: [\"storybook\", \"eslint-plugin-storybook\"],\n },\n {\n configName: \"playwright\",\n dependencies: [\"playwright\", \"eslint-plugin-playwright\"],\n },\n {\n configName: \"tanstack-query\",\n dependencies: [\"@tanstack/react-query\", \"@tanstack/eslint-plugin-query\"],\n },\n];\n\nconst loadedPlugins: string[] = [...internalPluginConfig];\nconst possiblePlugins: { [rule: string]: { [packageName: string]: boolean } } = {};\n\npluginConfig.forEach((plugin) => {\n const { configName, dependencies } = plugin;\n\n // eslint-disable-next-line security/detect-object-injection\n if ((anolilabEslintConfig as unknown as { [key: string]: { [key: string]: false | undefined } })[\"plugin\"]?.[configName] !== false) {\n const foundDependencies = [];\n\n dependencies.forEach((dependency) => {\n if (hasDependency(dependency) || hasDevDependency(dependency)) {\n foundDependencies.push(dependency);\n }\n });\n\n if (foundDependencies.length === dependencies.length) {\n loadedPlugins.push(configName);\n } else {\n // eslint-disable-next-line security/detect-object-injection\n possiblePlugins[configName] = {};\n\n dependencies.forEach((dependency) => {\n // eslint-disable-next-line security/detect-object-injection\n (possiblePlugins[configName] as { [key: string]: boolean })[dependency] = hasDependency(dependency) || hasDevDependency(dependency);\n });\n }\n }\n});\n\nexport const rules = baseConfig;\nexport const pluginRules = loadedPlugins;\n\nexport const possiblePluginRules = possiblePlugins;\n","/**\nDefine the rules config that are overwritten only for specific version of Node.js based on `engines.node` in package.json or the `nodeVersion` option.\n\nThe keys are rule names and the values are an Object with a valid semver (`4.0.0` is valid `4` is not) as keys and the rule configuration as values.\n\nEach entry define the rule config and the maximum Node.js version for which to set it.\nThe entry with the lowest version that is compliant with the `engines.node`/`nodeVersion` range will be used.\n\n@type {Object}\n\n@example\n```\n{\n 'plugin/rule': {\n '6.0.0': ['error', {prop: 'node-6-conf'}],\n '8.0.0': ['error', {prop: 'node-8-conf'}]\n }\n}\n```\n\nWith `engines.node` set to `>=4` the rule `plugin/rule` will not be used.\nWith `engines.node` set to `>=6` the rule `plugin/rule` will be used with the config `{prop: 'node-6-conf'}`.\nWith `engines.node` set to `>=8` the rule `plugin/rule` will be used with the config `{prop: 'node-8-conf'}`.\n*/\nconst engineRules = {\n \"n/prefer-global/text-decoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/text-encoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/url\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-global/url-search-params\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-promises/dns\": {\n \"11.14.0\": \"off\",\n },\n \"n/prefer-promises/fs\": {\n \"11.14.0\": \"off\",\n },\n \"no-useless-catch\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-destructuring\": {\n \"6.0.0\": \"off\",\n },\n \"prefer-named-capture-group\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-object-spread\": {\n \"8.3.0\": \"off\",\n },\n \"prefer-rest-params\": {\n \"6.0.0\": \"off\",\n },\n \"promise/prefer-await-to-then\": {\n \"7.6.0\": \"off\",\n },\n \"unicorn/no-new-buffer\": {\n \"5.10.0\": \"off\",\n },\n \"unicorn/prefer-flat-map\": {\n \"11.0.0\": \"off\",\n },\n \"unicorn/prefer-spread\": {\n \"5.0.0\": \"off\",\n },\n};\n\nexport default engineRules;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasDependency","hasDevDependency","packageIsTypeModule","pkg","globals","join","semver","resolvePackage","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","plugin","configName","dependencies","eslint_config_default","foundDependencies","dependency","rdependency","oneOfdependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","name","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"mHAYA,MAAO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CAAI,EAAIC,EAAWC,CAAqC,EAE5E,CAAC,CACT,CAAC,EAGG,CAAC,OAAO,kCAAoCnC,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,GAErCe,EAAqB,2CAAgD,IACrEU,EAAW;AAAA,8GAAiH,GAIpI,IAAMU,EAAwB,CAO1B,QAAS,CACL,GAAGf,EAAM,IAAKR,GAAWR,EAAK,UAAW,YAAYQ,CAAM,KAAK,CAAC,EAEjE,GAAGS,EAAY,IAAKT,GAAWR,EAAK,UAAW,oBAAoBQ,CAAM,KAAK,CAAC,CACnF,EACA,QAAS,CACL,GAAGT,EAAQ,QACX,GAAGA,EAAQ,WACf,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,SAEA,gBACJ,EACA,UAAW,CACP,CACI,MAAO,CAAC,yBAAyB,EACjC,MAAO,CACH,wBAAyB,KAC7B,CACJ,EACA,CACI,MAAO,CAEH,wBACA,wBAGA,6BACA,6BAGA,uBACJ,EACA,MAAO,CACH,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,EAEA,CACI,MAAOF,EAAsB,CAAC,OAAQ,OAAO,EAAI,CAAC,OAAO,EACzD,OAAQ,uBACR,cAAe,CACX,aAAc,CACV,QAAS,CAAC,wCAAwC,CACtD,EACA,kBAAmB,EACvB,CACJ,CACJ,EAEA,OAAQ,GAER,MAAO,CACH,GAAG6B,CACP,CACJ,EAEOM,EAAQD","sourcesContent":["/**\n * rushstack eslint-patch is used to include plugins as dev\n * dependencies instead of imposing them as peer dependencies\n *\n * {@link https://www.npmjs.com/package/@rushstack/eslint-patch}\n * {@link https://stackoverflow.com/a/74478635/1392749}\n * {@link https://github.com/eslint/eslint/issues/3458}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-1/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-2/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-3/}\n * {@link https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new}\n */\nimport \"@rushstack/eslint-patch/modern-module-resolution\";\n\nimport { hasDependency, hasDevDependency, packageIsTypeModule, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport globals from \"globals\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { internalPluginConfig, pluginRules, possiblePluginRules, rules } from \"./config\";\nimport engineRules from \"./engine-node-overwrite\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\nimport { consoleLog, consolePlugin } from \"./utils/loggers\";\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigLoaded) {\n if (process.env[\"DEBUG\"]) {\n consoleLog(\"\\n@anolilab/eslint-config loaded the following plugins:\\n\");\n\n consoleLog(\" @rushstack/eslint-plugin-security\");\n internalPluginConfig\n .map((name: string) => {\n if (name === \"import\") {\n return \"i\";\n }\n\n if (name === \"node\") {\n return \"n\";\n }\n\n return name;\n })\n .forEach((plugin) => consolePlugin(plugin));\n }\n\n let hasLogged: boolean = false;\n\n Object.entries(possiblePluginRules).forEach(([plugin, dependencies]) => {\n const hasOneDependency = Object.values(dependencies).some(Boolean);\n\n if (hasOneDependency) {\n hasLogged = true;\n\n consoleLog(\n `\\nYour package.json container dependencies for the \"${plugin}\" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`,\n );\n\n Object.entries(dependencies).forEach(([dependency, installed]) => {\n if (!installed) {\n consoleLog(` ${dependency}`);\n }\n });\n }\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (hasLogged) {\n consoleLog(\"\\nTo disable this message, add the following to your package.json:\");\n consoleLog(' \"anolilab\": { \"eslint-config\": { plugin: { \"plugin-name\": false } } }\\n');\n }\n\n consoleLog('To disable all logging, add the following to your eslint command call \"NO_LOGS=true eslint ...\"');\n\n global.hasAnolilabEsLintConfigLoaded = true;\n}\n\nconst configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nObject.entries(engineRules).forEach(([rule, ruleConfig]) => {\n Object.keys(ruleConfig)\n .sort(semver.rcompare)\n .forEach((minVersion) => {\n if (nodeVersion && semver.intersects(nodeVersion, `<${minVersion}`)) {\n // eslint-disable-next-line security/detect-object-injection\n configRules[rule] = ruleConfig[minVersion as keyof typeof ruleConfig] as Linter.RuleEntry;\n }\n });\n});\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n\n if (anolilabEslintConfig[\"info_on_disabling_prettier_conflict_rule\"] !== false) {\n consoleLog(\"\\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier\");\n }\n}\n\nconst config: Linter.Config = {\n // After an .eslintrc.js file is loaded, ESLint will normally continue visiting all parent folders\n // to look for other .eslintrc.js files, and also consult a personal file ~/.eslintrc.js. If any files\n // are found, their options will be merged. This is difficult for humans to understand, and it will cause\n // nondeterministic behavior if files are loaded from outside the Git working folder.\n //\n // Setting root=true causes ESLint to stop looking for other config files after the first .eslintrc.js\n extends: [\n ...rules.map((plugin) => join(__dirname, `./config/${plugin}.js`)),\n\n ...pluginRules.map((plugin) => join(__dirname, `./config/plugins/${plugin}.js`)),\n ],\n globals: {\n ...globals.browser,\n ...globals.nodeBuiltin,\n },\n ignorePatterns: [\n \"!.*\",\n\n \".git/\",\n \"node_modules/\",\n \"bower_components/\",\n \"jspm_packages/\",\n \".npm/\",\n\n \"lib-cov/\",\n \"coverage/\",\n \".nyc_output/\",\n \".cache/\",\n\n \"build/\",\n \"dist/\",\n \"tmp/\",\n\n \"**/*.min.*\",\n\n // Manually authored .d.ts files are generally used to describe external APIs that are not expected\n // to follow our coding conventions. Linting those files tends to produce a lot of spurious suppressions,\n // so we simply ignore them.\n \"*.d.ts\",\n\n \"pnpm-lock.yaml\",\n ],\n overrides: [\n {\n files: [\"**/migrations/*.{js,ts}\"],\n rules: {\n \"filenames/match-regex\": \"off\",\n },\n },\n {\n files: [\n // Test files\n \"**/*.spec.{js,ts,tsx}\",\n \"**/*.test.{js,ts,tsx}\",\n\n // Facebook convention\n \"**/__mocks__/*.{js,ts,tsx}\",\n \"**/__tests__/*.{js,ts,tsx}\",\n\n // Microsoft convention\n \"**/test/*.{js,ts,tsx}\",\n ],\n rules: {\n \"no-magic-numbers\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n // Fixes https://github.com/eslint/eslint/discussions/15305\n {\n files: packageIsTypeModule ? [\"*.js\", \"*.mjs\"] : [\"*.mjs\"],\n parser: \"@babel/eslint-parser\",\n parserOptions: {\n babelOptions: {\n plugins: [\"@babel/plugin-syntax-import-assertions\"],\n },\n requireConfigFile: false,\n },\n },\n ],\n // Disable the parser by default\n parser: \"\",\n // is loaded.\n rules: {\n ...configRules,\n },\n};\n\nexport default config;\n","import { hasDependency, hasDevDependency, resolvePackage } from \"@anolilab/package-json-utils\";\n\nimport type { PackageRules } from \"./types\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\n\nconst baseConfig = [\"best-practices\", \"errors\", \"style\", \"es6\", \"variables\"];\n\n// eslint-disable-next-line import/exports-last\nexport const internalPluginConfig = [\n \"compat\",\n \"eslint-comments\",\n \"import\",\n \"promise\",\n \"simple-import-sort\",\n \"no-extend-native\",\n \"node\",\n // Security Rules\n \"no-secrets\",\n \"sonarjs\",\n \"security\",\n \"regexp\",\n // file rules\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"html\",\n\n // custom rules\n \"antfu\",\n \"unicorn\",\n \"es\",\n \"perfectionist\",\n];\n\nconst pluginConfig: PackageRules = [\n {\n configName: \"array-func\",\n dependencies: [\"eslint-plugin-array-func\"],\n },\n {\n configName: \"jsdoc\",\n dependencies: [\"eslint-plugin-jsdoc\"],\n },\n {\n configName: \"tsdoc\",\n dependencies: [\"eslint-plugin-tsdoc\", \"typescript\"],\n },\n {\n configName: \"lodash\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash\"],\n },\n {\n configName: \"lodash-fp\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash-fp\"],\n },\n {\n configName: \"you-dont-need-lodash-underscore\",\n dependencies: [\"lodash\", \"eslint-plugin-you-dont-need-lodash-underscore\"],\n },\n {\n configName: \"mdx\",\n dependencies: [\"eslint-plugin-mdx\"],\n oneOfDependency: [\"nextra\", \"docz\", \"@docusaurus/core\", \"gatsby-plugin-mdx\"],\n resolve: [\"@mdx-js/mdx\", \"remark-mdx\", \"@mdx-js/loader\", \"@mdx-js/rollup\", \"@mdx-js/react\"],\n },\n {\n configName: \"no-unsanitized\",\n dependencies: [\"eslint-plugin-no-unsanitized\"],\n },\n {\n configName: \"react\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react\"],\n },\n {\n configName: \"react-redux\",\n dependencies: [\"eslint-plugin-react-redux\"],\n oneOfDependency: [\"@reduxjs/toolkit\", \"redux\"],\n },\n {\n configName: \"jsx-a11y\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-jsx-a11y\"],\n },\n {\n configName: \"react-hooks\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react-hooks\"],\n },\n {\n configName: \"react-usememo\",\n dependencies: [\"react\", \"react-dom\", \"@arthurgeron/eslint-plugin-react-usememo\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment-timezone\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"eslint-plugin-tailwindcss\"],\n },\n {\n configName: \"cypress\",\n dependencies: [\"cypress\", \"eslint-plugin-cypress\"],\n },\n {\n configName: \"jest\",\n dependencies: [\"jest\", \"eslint-plugin-jest\"],\n },\n {\n configName: \"jest-dom\",\n dependencies: [\"jest\", \"@testing-library/jest-dom\", \"eslint-plugin-jest-dom\"],\n },\n {\n configName: \"jest-async\",\n dependencies: [\"jest\", \"eslint-plugin-jest-async\"],\n },\n {\n configName: \"jest-formatting\",\n dependencies: [\"jest\", \"eslint-plugin-jest-formatting\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"tailwindcss\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"@testing-library/dom\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"react\", \"@testing-library/react\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"typescript\",\n dependencies: [\"typescript\"],\n },\n {\n configName: \"etc\",\n dependencies: [\"typescript\", \"eslint-plugin-etc\"],\n },\n {\n configName: \"vitest\",\n dependencies: [\"vitest\", \"eslint-plugin-vitest\"],\n },\n {\n configName: \"zod\",\n dependencies: [\"zod\", \"eslint-plugin-zod\"],\n },\n {\n configName: \"ava\",\n dependencies: [\"ava\", \"eslint-plugin-ava\"],\n },\n {\n configName: \"storybook\",\n dependencies: [\"storybook\", \"eslint-plugin-storybook\"],\n },\n {\n configName: \"playwright\",\n dependencies: [\"playwright\", \"eslint-plugin-playwright\"],\n },\n {\n configName: \"tanstack-query\",\n dependencies: [\"@tanstack/react-query\", \"@tanstack/eslint-plugin-query\"],\n },\n];\n\nconst loadedPlugins: string[] = [...internalPluginConfig];\nconst possiblePlugins: { [rule: string]: { [packageName: string]: boolean } } = {};\n\n// eslint-disable-next-line sonarjs/cognitive-complexity\npluginConfig.forEach((plugin) => {\n const { configName, dependencies } = plugin;\n\n // eslint-disable-next-line security/detect-object-injection\n if ((anolilabEslintConfig as unknown as { [key: string]: { [key: string]: false | undefined } })[\"plugin\"]?.[configName] !== false) {\n const foundDependencies = [];\n\n dependencies.forEach((dependency) => {\n if (hasDependency(dependency) || hasDevDependency(dependency)) {\n foundDependencies.push(dependency);\n }\n });\n\n // eslint-disable-next-line security/detect-object-injection\n possiblePlugins[configName] = {};\n\n if (foundDependencies.length === 0 && plugin.resolve !== undefined) {\n plugin.resolve.forEach((rdependency) => {\n if (resolvePackage(rdependency) !== undefined) {\n dependencies.forEach((dependency) => {\n // eslint-disable-next-line security/detect-object-injection\n (possiblePlugins[configName] as { [key: string]: boolean })[dependency] = hasDependency(dependency) || hasDevDependency(dependency);\n });\n }\n });\n }\n\n if (foundDependencies.length === 0 && plugin.oneOfDependency !== undefined) {\n plugin.oneOfDependency.forEach((oneOfdependency) => {\n if (hasDependency(oneOfdependency) || hasDevDependency(oneOfdependency)) {\n [...dependencies, ...(plugin.oneOfDependency as string[])].forEach((dependency) => {\n // eslint-disable-next-line security/detect-object-injection\n (possiblePlugins[configName] as { [key: string]: boolean })[dependency] = hasDependency(dependency) || hasDevDependency(dependency);\n });\n }\n });\n }\n\n if (foundDependencies.length === dependencies.length) {\n // eslint-disable-next-line security/detect-object-injection,@typescript-eslint/no-dynamic-delete\n delete possiblePlugins[configName];\n\n loadedPlugins.push(configName);\n } else {\n dependencies.forEach((dependency) => {\n // eslint-disable-next-line security/detect-object-injection\n (possiblePlugins[configName] as { [key: string]: boolean })[dependency] = hasDependency(dependency) || hasDevDependency(dependency);\n });\n }\n }\n});\n\nexport const rules = baseConfig;\nexport const pluginRules = loadedPlugins;\n\nexport const possiblePluginRules = possiblePlugins;\n","/**\nDefine the rules config that are overwritten only for specific version of Node.js based on `engines.node` in package.json or the `nodeVersion` option.\n\nThe keys are rule names and the values are an Object with a valid semver (`4.0.0` is valid `4` is not) as keys and the rule configuration as values.\n\nEach entry define the rule config and the maximum Node.js version for which to set it.\nThe entry with the lowest version that is compliant with the `engines.node`/`nodeVersion` range will be used.\n\n@type {Object}\n\n@example\n```\n{\n 'plugin/rule': {\n '6.0.0': ['error', {prop: 'node-6-conf'}],\n '8.0.0': ['error', {prop: 'node-8-conf'}]\n }\n}\n```\n\nWith `engines.node` set to `>=4` the rule `plugin/rule` will not be used.\nWith `engines.node` set to `>=6` the rule `plugin/rule` will be used with the config `{prop: 'node-6-conf'}`.\nWith `engines.node` set to `>=8` the rule `plugin/rule` will be used with the config `{prop: 'node-8-conf'}`.\n*/\nconst engineRules = {\n \"n/prefer-global/text-decoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/text-encoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/url\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-global/url-search-params\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-promises/dns\": {\n \"11.14.0\": \"off\",\n },\n \"n/prefer-promises/fs\": {\n \"11.14.0\": \"off\",\n },\n \"no-useless-catch\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-destructuring\": {\n \"6.0.0\": \"off\",\n },\n \"prefer-named-capture-group\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-object-spread\": {\n \"8.3.0\": \"off\",\n },\n \"prefer-rest-params\": {\n \"6.0.0\": \"off\",\n },\n \"promise/prefer-await-to-then\": {\n \"7.6.0\": \"off\",\n },\n \"unicorn/no-new-buffer\": {\n \"5.10.0\": \"off\",\n },\n \"unicorn/prefer-flat-map\": {\n \"11.0.0\": \"off\",\n },\n \"unicorn/prefer-spread\": {\n \"5.0.0\": \"off\",\n },\n};\n\nexport default engineRules;\n"]}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkX3W6J3PZ_js = require('./chunk-X3W6J3PZ.js');
|
|
3
4
|
var chunkMQFZFF2T_js = require('./chunk-MQFZFF2T.js');
|
|
4
|
-
var
|
|
5
|
+
var chunk3Y2MNMYX_js = require('./chunk-3Y2MNMYX.js');
|
|
5
6
|
require('./chunk-3NVDJZNH.js');
|
|
7
|
+
var process = require('process');
|
|
6
8
|
|
|
7
|
-
var
|
|
9
|
+
var r=chunkMQFZFF2T_js.a.rules,s=process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";chunkX3W6J3PZ_js.a.warn_on_unsupported_typescript_version!==void 0&&(s=chunkX3W6J3PZ_js.a.warn_on_unsupported_typescript_version);var o=chunk3Y2MNMYX_js.a("typescript",{parser:"@typescript-eslint/parser",parserOptions:{ecmaFeatures:{jsx:!0},sourceType:"module",warnOnUnsupportedTypeScriptVersion:s},plugins:["@typescript-eslint"],rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["RegExp"]}],"@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!1}],"@typescript-eslint/no-floating-promises":["error",{ignoreIIFE:!0,ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":r["no-implied-eval"],"@typescript-eslint/no-meaningless-void-operator":["error",{checkNever:!0}],"@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksVoidReturn:{arguments:!0,attributes:!1,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-throw-literal":r["no-throw-literal"],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/require-await":r["require-await"],"@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}],"dot-notation":"off","no-implied-eval":"off","no-new-func":"off","no-throw-literal":"off","require-await":"off"}}),u=o;
|
|
8
10
|
|
|
9
|
-
module.exports =
|
|
11
|
+
module.exports = u;
|
|
10
12
|
//# sourceMappingURL=out.js.map
|
|
11
13
|
//# sourceMappingURL=typescript-type-checking.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["bestPracticesRules","best_practices_default","config","createConfig","typescript_type_checking_default"],"mappings":"4GAKA,IAAMA,EAAqBC,EAAoB,MAEzCC,EAASC,EAAa,aAAc,CAOtC,MAAO,CAEH,oCAAqC,QAErC,6CAA8C,CAC1C,QACA,CACI,uCAAwC,EAC5C,CACJ,EAGA,kCAAmC,CAAC,QAAS,CAAE,cAAe,EAAK,CAAC,EAEpE,uCAAwC,CACpC,QACA,CACI,iBAAkB,CAAC,QAAQ,CAC/B,CACJ,EAGA,kDAAmD,CAC/C,QACA,CACI,qBAAsB,GACtB,mBAAoB,EACxB,CACJ,EAGA,0CAA2C,CACvC,QACA,CACI,WAAY,GACZ,WAAY,EAChB,CACJ,EAGA,qCAAsC,QAEtC,qCAAsCH,EAAmB,iBAAiB,EAI1E,kDAAmD,CAAC,QAAS,CAAE,WAAY,EAAK,CAAC,EAEjF,yCAA0C,CACtC,QACA,CACI,mBAAoB,GACpB,iBAAkB,CACd,UAAW,GACX,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,UAAW,EACf,CACJ,CACJ,EAGA,sCAAuCA,EAAmB,kBAAkB,EAE5E,8CAA+C,QAE/C,8CAA+C,QAI/C,mDAAoD,QAIpD,mDAAoD,MAIpD,qCAAsC,QAItC,+CAAgD,CAC5C,QACA,CACI,uBAAwB,GACxB,8BAA+B,EACnC,CACJ,EAGA,qCAAsC,CAAC,QAAS,CAAE,kBAAmB,EAAM,CAAC,EAI5E,kDAAmD,QAInD,wCAAyC,QAIzC,6CAA8C,QAI9C,oDAAqD,QAErD,4CAA6C,QAG7C,gDAAiD,CAC7C,QACA,CACI,mBAAoB,EACxB,CACJ,EAEA,mCAAoCA,EAAmB,eAAe,EAGtE,4CAA6C,QAG7C,kCAAmC,CAAC,QAAS,QAAQ,EAGrD,iDAAkD,QAIlD,oCAAqC,CAAC,QAAS,CAAE,aAAc,EAAM,CAAC,EAGtE,eAAgB,MAIhB,kBAAmB,MAGnB,cAAe,MAGf,mBAAoB,MAIpB,gBAAiB,KACrB,CACJ,CAAC,EAEMI,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport bestPracticesConfig from \"./config/best-practices\";\nimport { createConfig } from \"./utils/create-config\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\n\nconst config = createConfig(\"typescript\", {\n // TODO: enable the rule when typescript-eslint 6.0.0 is released\n // extends: [\n // \"plugin:@typescript-eslint/recommended-type-checked\",\n // \"plugin:@typescript-eslint/strict-type-checked\",\n // \"plugin:@typescript-eslint/stylistic-type-checked\"\n // ],\n rules: {\n // Disallows awaiting a value that is not a Thenable\n \"@typescript-eslint/await-thenable\": \"error\",\n\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: true,\n },\n ],\n\n // Replace 'dot-notation' rule with '@typescript-eslint' version\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md\n \"@typescript-eslint/no-base-to-string\": [\n \"error\",\n {\n ignoredTypeNames: [\"RegExp\"],\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md\n \"@typescript-eslint/no-confusing-void-expression\": [\n \"error\",\n {\n ignoreArrowShorthand: true,\n ignoreVoidOperator: false,\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n {\n ignoreIIFE: true,\n ignoreVoid: true,\n },\n ],\n\n // Disallow iterating over an array with a for-in loop\n \"@typescript-eslint/no-for-in-array\": \"error\",\n\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\n\n // Replace 'no-throw-literal' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-promises.md\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksVoidReturn: {\n arguments: true,\n attributes: false,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\n \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md\n \"@typescript-eslint/no-unnecessary-qualifier\": \"error\",\n\n // Disallow the void operator except when used to discard a value.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n\n // Disallow Promises in places not designed to handle them.\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Warns if a type assertion does not change the type of an expression\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-includes.md\n \"@typescript-eslint/prefer-includes\": \"error\",\n\n // Enforce includes method over indexOf method.\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\": [\n \"error\",\n {\n ignoreConditionalTests: true,\n ignoreMixedLogicalExpressions: true,\n },\n ],\n\n // Requires that private members are marked as readonly if they're never modified outside of the constructor\n \"@typescript-eslint/prefer-readonly\": [\"error\", { onlyInlineLambdas: false }],\n\n // Enforce RegExp#exec over String#match if no global flag is provided.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n\n // Enforce that this is used when only this type is returned.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n\n // Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\n\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\n // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"@typescript-eslint/return-await\": [\"error\", \"always\"],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n\n // Disallow unnecessary namespace qualifiers.\n // Enforces unbound methods are called with their expected scope\n \"@typescript-eslint/unbound-method\": [\"error\", { ignoreStatic: false }],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md\n \"no-implied-eval\": \"off\",\n\n // Disallow type arguments that are equal to the default.\n \"no-new-func\": \"off\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md\n \"no-throw-literal\": \"off\",\n\n // Enforce using type parameter when calling Array#reduce instead of casting.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n },\n});\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["env","bestPracticesRules","best_practices_default","showUnsupportedTypeScriptVersionWarning","eslint_config_default","config","createConfig","typescript_type_checking_default"],"mappings":"oJACA,OAAS,OAAAA,MAAW,UAMpB,IAAMC,EAAqBC,EAAoB,MAE3CC,EAAmDH,EAAI,qDAA0D,OAEjHI,EAAqB,yCAA8C,SACnED,EAA0CC,EAAqB,wCAGnE,IAAMC,EAASC,EAAa,aAAc,CAOtC,OAAQ,4BACR,cAAe,CACX,aAAc,CACV,IAAK,EACT,EACA,WAAY,SACZ,mCAAoCH,CAC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\";\n\nimport bestPracticesConfig from \"./config/best-practices\";\nimport { createConfig } from \"./utils/create-config\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\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 = createConfig(\"typescript\", {\n // TODO: enable the rule when typescript-eslint 6.0.0 is released\n // extends: [\n // \"plugin:@typescript-eslint/recommended-type-checked\",\n // \"plugin:@typescript-eslint/strict-type-checked\",\n // \"plugin:@typescript-eslint/stylistic-type-checked\"\n // ],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n sourceType: \"module\",\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n plugins: [\"@typescript-eslint\"],\n rules: {\n // Disallows awaiting a value that is not a Thenable\n \"@typescript-eslint/await-thenable\": \"error\",\n\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: true,\n },\n ],\n\n // Replace 'dot-notation' rule with '@typescript-eslint' version\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md\n \"@typescript-eslint/no-base-to-string\": [\n \"error\",\n {\n ignoredTypeNames: [\"RegExp\"],\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md\n \"@typescript-eslint/no-confusing-void-expression\": [\n \"error\",\n {\n ignoreArrowShorthand: true,\n ignoreVoidOperator: false,\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n {\n ignoreIIFE: true,\n ignoreVoid: true,\n },\n ],\n\n // Disallow iterating over an array with a for-in loop\n \"@typescript-eslint/no-for-in-array\": \"error\",\n\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\n\n // Replace 'no-throw-literal' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-promises.md\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksVoidReturn: {\n arguments: true,\n attributes: false,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\n \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md\n \"@typescript-eslint/no-unnecessary-qualifier\": \"error\",\n\n // Disallow the void operator except when used to discard a value.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n\n // Disallow Promises in places not designed to handle them.\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Warns if a type assertion does not change the type of an expression\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-includes.md\n \"@typescript-eslint/prefer-includes\": \"error\",\n\n // Enforce includes method over indexOf method.\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\": [\n \"error\",\n {\n ignoreConditionalTests: true,\n ignoreMixedLogicalExpressions: true,\n },\n ],\n\n // Requires that private members are marked as readonly if they're never modified outside of the constructor\n \"@typescript-eslint/prefer-readonly\": [\"error\", { onlyInlineLambdas: false }],\n\n // Enforce RegExp#exec over String#match if no global flag is provided.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n\n // Enforce that this is used when only this type is returned.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n\n // Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\n\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\n // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"@typescript-eslint/return-await\": [\"error\", \"always\"],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n\n // Disallow unnecessary namespace qualifiers.\n // Enforces unbound methods are called with their expected scope\n \"@typescript-eslint/unbound-method\": [\"error\", { ignoreStatic: false }],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md\n \"no-implied-eval\": \"off\",\n\n // Disallow type arguments that are equal to the default.\n \"no-new-func\": \"off\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md\n \"no-throw-literal\": \"off\",\n\n // Enforce using type parameter when calling Array#reduce instead of casting.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n },\n});\n\nexport default config;\n"]}
|
package/globals.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("./dist/globals");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/eslint-config",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -104,6 +104,8 @@
|
|
|
104
104
|
"types": "dist/index.d.ts",
|
|
105
105
|
"files": [
|
|
106
106
|
"dist",
|
|
107
|
+
"globals.js",
|
|
108
|
+
"typescript-type-checking.js",
|
|
107
109
|
"README.md",
|
|
108
110
|
"CHANGELOG.md",
|
|
109
111
|
"LICENSE.md"
|
|
@@ -116,6 +118,8 @@
|
|
|
116
118
|
},
|
|
117
119
|
"dependencies": {
|
|
118
120
|
"@anolilab/package-json-utils": "2.0.1",
|
|
121
|
+
"@babel/eslint-parser": "^7.22.6",
|
|
122
|
+
"@babel/plugin-syntax-import-assertions": "^7.22.5",
|
|
119
123
|
"@html-eslint/eslint-plugin": "^0.19.0",
|
|
120
124
|
"@html-eslint/parser": "^0.19.0",
|
|
121
125
|
"@rushstack/eslint-patch": "^1.3.2",
|
|
@@ -157,6 +161,7 @@
|
|
|
157
161
|
},
|
|
158
162
|
"devDependencies": {
|
|
159
163
|
"@anolilab/semantic-release-preset": "5.0.1",
|
|
164
|
+
"@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",
|
|
160
165
|
"@testing-library/dom": "^9.3.1",
|
|
161
166
|
"@total-typescript/ts-reset": "^0.4.2",
|
|
162
167
|
"@types/confusing-browser-globals": "^1.0.0",
|
|
@@ -178,7 +183,6 @@
|
|
|
178
183
|
"eslint-plugin-react": "^7.32.2",
|
|
179
184
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
180
185
|
"eslint-plugin-react-redux": "^4.0.0",
|
|
181
|
-
"@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",
|
|
182
186
|
"eslint-plugin-storybook": "^0.6.12",
|
|
183
187
|
"eslint-plugin-tailwindcss": "^3.13.0",
|
|
184
188
|
"eslint-plugin-testing-library": "^5.11.0",
|
|
@@ -199,6 +203,7 @@
|
|
|
199
203
|
"eslint": "^8.15.0"
|
|
200
204
|
},
|
|
201
205
|
"optionalDependencies": {
|
|
206
|
+
"@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",
|
|
202
207
|
"@tanstack/eslint-plugin-query": "^4.29.9",
|
|
203
208
|
"eslint-plugin-array-func": "^3.1.8",
|
|
204
209
|
"eslint-plugin-ava": "^14.0.0",
|