@anolilab/eslint-config 5.0.9 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +226 -73
- package/dist/chunk-3XUVOUJE.mjs +5 -0
- package/dist/chunk-3XUVOUJE.mjs.map +1 -0
- package/dist/chunk-6E2RGUNG.js +7 -0
- package/dist/chunk-6E2RGUNG.js.map +1 -0
- package/dist/chunk-ARKJLBXP.js +7 -0
- package/dist/chunk-ARKJLBXP.js.map +1 -0
- package/dist/chunk-B7GQAMYJ.js +9 -0
- package/dist/chunk-B7GQAMYJ.js.map +1 -0
- package/dist/chunk-DJDHW6UR.mjs +5 -0
- package/dist/chunk-DJDHW6UR.mjs.map +1 -0
- package/dist/chunk-F6JHPR4L.mjs +7 -0
- package/dist/chunk-F6JHPR4L.mjs.map +1 -0
- package/dist/chunk-G7JIJH44.mjs +5 -0
- package/dist/chunk-G7JIJH44.mjs.map +1 -0
- package/dist/chunk-NO36P4BR.js +9 -0
- package/dist/chunk-NO36P4BR.js.map +1 -0
- package/dist/chunk-PCIKFIV2.js +7 -0
- package/dist/chunk-PCIKFIV2.js.map +1 -0
- package/dist/chunk-RWRS63WY.mjs +7 -0
- package/dist/chunk-RWRS63WY.mjs.map +1 -0
- package/dist/chunk-SV64EPVP.js +7 -0
- package/dist/chunk-SV64EPVP.js.map +1 -0
- package/dist/chunk-UJAIXHCQ.js +13 -0
- package/dist/chunk-UJAIXHCQ.js.map +1 -0
- package/dist/chunk-WDMF75TJ.mjs +5 -0
- package/dist/chunk-WDMF75TJ.mjs.map +1 -0
- package/dist/chunk-WSETOOIE.mjs +5 -0
- package/dist/chunk-WSETOOIE.mjs.map +1 -0
- package/dist/chunk-XND2BWC4.mjs +7 -0
- package/dist/chunk-XND2BWC4.mjs.map +1 -0
- package/dist/chunk-YMWD4DNM.js +8 -0
- package/dist/chunk-YMWD4DNM.js.map +1 -0
- package/dist/config/best-practices.d.ts +5 -0
- package/dist/config/best-practices.js +9 -0
- package/dist/config/best-practices.js.map +1 -0
- package/dist/config/best-practices.mjs +3 -0
- package/dist/config/best-practices.mjs.map +1 -0
- package/dist/config/errors.d.ts +5 -0
- package/dist/config/errors.js +9 -0
- package/dist/config/errors.js.map +1 -0
- package/dist/config/errors.mjs +3 -0
- package/dist/config/errors.mjs.map +1 -0
- package/dist/config/es6.d.ts +5 -0
- package/dist/config/es6.js +9 -0
- package/dist/config/es6.js.map +1 -0
- package/dist/config/es6.mjs +3 -0
- package/dist/config/es6.mjs.map +1 -0
- package/dist/config/plugins/antfu.d.ts +5 -0
- package/dist/config/plugins/antfu.js +10 -0
- package/dist/config/plugins/antfu.js.map +1 -0
- package/dist/config/plugins/antfu.mjs +8 -0
- package/dist/config/plugins/antfu.mjs.map +1 -0
- package/dist/config/plugins/array-func.d.ts +5 -0
- package/dist/config/plugins/array-func.js +9 -0
- package/dist/config/plugins/array-func.js.map +1 -0
- package/dist/config/plugins/array-func.mjs +7 -0
- package/dist/config/plugins/array-func.mjs.map +1 -0
- package/dist/config/plugins/ava.d.ts +5 -0
- package/dist/config/plugins/ava.js +7 -0
- package/dist/config/plugins/ava.js.map +1 -0
- package/dist/config/plugins/ava.mjs +5 -0
- package/dist/config/plugins/ava.mjs.map +1 -0
- package/dist/config/plugins/babel.d.ts +5 -0
- package/dist/config/plugins/babel.js +12 -0
- package/dist/config/plugins/babel.js.map +1 -0
- package/dist/config/plugins/babel.mjs +10 -0
- package/dist/config/plugins/babel.mjs.map +1 -0
- package/dist/config/plugins/compat.d.ts +5 -0
- package/dist/config/plugins/compat.js +7 -0
- package/dist/config/plugins/compat.js.map +1 -0
- package/dist/config/plugins/compat.mjs +5 -0
- package/dist/config/plugins/compat.mjs.map +1 -0
- package/dist/config/plugins/cypress.d.ts +5 -0
- package/dist/config/plugins/cypress.js +7 -0
- package/dist/config/plugins/cypress.js.map +1 -0
- package/dist/config/plugins/cypress.mjs +5 -0
- package/dist/config/plugins/cypress.mjs.map +1 -0
- package/dist/config/plugins/es.d.ts +5 -0
- package/dist/config/plugins/es.js +7 -0
- package/dist/config/plugins/es.js.map +1 -0
- package/dist/config/plugins/es.mjs +5 -0
- package/dist/config/plugins/es.mjs.map +1 -0
- package/dist/config/plugins/eslint-comments.d.ts +5 -0
- package/dist/config/plugins/eslint-comments.js +7 -0
- package/dist/config/plugins/eslint-comments.js.map +1 -0
- package/dist/config/plugins/eslint-comments.mjs +5 -0
- package/dist/config/plugins/eslint-comments.mjs.map +1 -0
- package/dist/config/plugins/html.d.ts +5 -0
- package/dist/config/plugins/html.js +7 -0
- package/dist/config/plugins/html.js.map +1 -0
- package/dist/config/plugins/html.mjs +5 -0
- package/dist/config/plugins/html.mjs.map +1 -0
- package/dist/config/plugins/import.d.ts +5 -0
- package/dist/config/plugins/import.js +9 -0
- package/dist/config/plugins/import.js.map +1 -0
- package/dist/config/plugins/import.mjs +3 -0
- package/dist/config/plugins/import.mjs.map +1 -0
- package/dist/config/plugins/jest-async.d.ts +5 -0
- package/dist/config/plugins/jest-async.js +7 -0
- package/dist/config/plugins/jest-async.js.map +1 -0
- package/dist/config/plugins/jest-async.mjs +5 -0
- package/dist/config/plugins/jest-async.mjs.map +1 -0
- package/dist/config/plugins/jest-dom.d.ts +5 -0
- package/dist/config/plugins/jest-dom.js +7 -0
- package/dist/config/plugins/jest-dom.js.map +1 -0
- package/dist/config/plugins/jest-dom.mjs +5 -0
- package/dist/config/plugins/jest-dom.mjs.map +1 -0
- package/dist/config/plugins/jest-formatting.d.ts +5 -0
- package/dist/config/plugins/jest-formatting.js +7 -0
- package/dist/config/plugins/jest-formatting.js.map +1 -0
- package/dist/config/plugins/jest-formatting.mjs +5 -0
- package/dist/config/plugins/jest-formatting.mjs.map +1 -0
- package/dist/config/plugins/jest.d.ts +5 -0
- package/dist/config/plugins/jest.js +7 -0
- package/dist/config/plugins/jest.js.map +1 -0
- package/dist/config/plugins/jest.mjs +5 -0
- package/dist/config/plugins/jest.mjs.map +1 -0
- package/dist/config/plugins/jsdoc.d.ts +5 -0
- package/dist/config/plugins/jsdoc.js +11 -0
- package/dist/config/plugins/jsdoc.js.map +1 -0
- package/dist/config/plugins/jsdoc.mjs +9 -0
- package/dist/config/plugins/jsdoc.mjs.map +1 -0
- package/dist/config/plugins/jsonc.d.ts +5 -0
- package/dist/config/plugins/jsonc.js +11 -0
- package/dist/config/plugins/jsonc.js.map +1 -0
- package/dist/config/plugins/jsonc.mjs +9 -0
- package/dist/config/plugins/jsonc.mjs.map +1 -0
- package/dist/config/plugins/jsx-a11y.d.ts +5 -0
- package/dist/config/plugins/jsx-a11y.js +7 -0
- package/dist/config/plugins/jsx-a11y.js.map +1 -0
- package/dist/config/plugins/jsx-a11y.mjs +5 -0
- package/dist/config/plugins/jsx-a11y.mjs.map +1 -0
- package/dist/config/plugins/lodash-fp.d.ts +5 -0
- package/dist/config/plugins/lodash-fp.js +7 -0
- package/dist/config/plugins/lodash-fp.js.map +1 -0
- package/dist/config/plugins/lodash-fp.mjs +5 -0
- package/dist/config/plugins/lodash-fp.mjs.map +1 -0
- package/dist/config/plugins/lodash.d.ts +5 -0
- package/dist/config/plugins/lodash.js +7 -0
- package/dist/config/plugins/lodash.js.map +1 -0
- package/dist/config/plugins/lodash.mjs +5 -0
- package/dist/config/plugins/lodash.mjs.map +1 -0
- package/dist/config/plugins/markdown.d.ts +5 -0
- package/dist/config/plugins/markdown.js +7 -0
- package/dist/config/plugins/markdown.js.map +1 -0
- package/dist/config/plugins/markdown.mjs +5 -0
- package/dist/config/plugins/markdown.mjs.map +1 -0
- package/dist/config/plugins/mdx.d.ts +5 -0
- package/dist/config/plugins/mdx.js +7 -0
- package/dist/config/plugins/mdx.js.map +1 -0
- package/dist/config/plugins/mdx.mjs +5 -0
- package/dist/config/plugins/mdx.mjs.map +1 -0
- package/dist/config/plugins/no-extend-native.d.ts +5 -0
- package/dist/config/plugins/no-extend-native.js +7 -0
- package/dist/config/plugins/no-extend-native.js.map +1 -0
- package/dist/config/plugins/no-extend-native.mjs +5 -0
- package/dist/config/plugins/no-extend-native.mjs.map +1 -0
- package/dist/config/plugins/no-loops.d.ts +5 -0
- package/dist/config/plugins/no-loops.js +7 -0
- package/dist/config/plugins/no-loops.js.map +1 -0
- package/dist/config/plugins/no-loops.mjs +5 -0
- package/dist/config/plugins/no-loops.mjs.map +1 -0
- package/dist/config/plugins/no-secrets.d.ts +5 -0
- package/dist/config/plugins/no-secrets.js +7 -0
- package/dist/config/plugins/no-secrets.js.map +1 -0
- package/dist/config/plugins/no-secrets.mjs +5 -0
- package/dist/config/plugins/no-secrets.mjs.map +1 -0
- package/dist/config/plugins/no-unsanitized.d.ts +5 -0
- package/dist/config/plugins/no-unsanitized.js +7 -0
- package/dist/config/plugins/no-unsanitized.js.map +1 -0
- package/dist/config/plugins/no-unsanitized.mjs +5 -0
- package/dist/config/plugins/no-unsanitized.mjs.map +1 -0
- package/dist/config/plugins/node.d.ts +5 -0
- package/dist/config/plugins/node.js +9 -0
- package/dist/config/plugins/node.js.map +1 -0
- package/dist/config/plugins/node.mjs +7 -0
- package/dist/config/plugins/node.mjs.map +1 -0
- package/dist/config/plugins/optimize-regex.d.ts +5 -0
- package/dist/config/plugins/optimize-regex.js +7 -0
- package/dist/config/plugins/optimize-regex.js.map +1 -0
- package/dist/config/plugins/optimize-regex.mjs +5 -0
- package/dist/config/plugins/optimize-regex.mjs.map +1 -0
- package/dist/config/plugins/promise.d.ts +5 -0
- package/dist/config/plugins/promise.js +7 -0
- package/dist/config/plugins/promise.js.map +1 -0
- package/dist/config/plugins/promise.mjs +5 -0
- package/dist/config/plugins/promise.mjs.map +1 -0
- package/dist/config/plugins/react-hooks.d.ts +5 -0
- package/dist/config/plugins/react-hooks.js +7 -0
- package/dist/config/plugins/react-hooks.js.map +1 -0
- package/dist/config/plugins/react-hooks.mjs +5 -0
- package/dist/config/plugins/react-hooks.mjs.map +1 -0
- package/dist/config/plugins/react-redux.d.ts +5 -0
- package/dist/config/plugins/react-redux.js +7 -0
- package/dist/config/plugins/react-redux.js.map +1 -0
- package/dist/config/plugins/react-redux.mjs +5 -0
- package/dist/config/plugins/react-redux.mjs.map +1 -0
- package/dist/config/plugins/react.d.ts +5 -0
- package/dist/config/plugins/react.js +21 -0
- package/dist/config/plugins/react.js.map +1 -0
- package/dist/config/plugins/react.mjs +15 -0
- package/dist/config/plugins/react.mjs.map +1 -0
- package/dist/config/plugins/security.d.ts +5 -0
- package/dist/config/plugins/security.js +7 -0
- package/dist/config/plugins/security.js.map +1 -0
- package/dist/config/plugins/security.mjs +5 -0
- package/dist/config/plugins/security.mjs.map +1 -0
- package/dist/config/plugins/simple-import-sort.d.ts +5 -0
- package/dist/config/plugins/simple-import-sort.js +7 -0
- package/dist/config/plugins/simple-import-sort.js.map +1 -0
- package/dist/config/plugins/simple-import-sort.mjs +5 -0
- package/dist/config/plugins/simple-import-sort.mjs.map +1 -0
- package/dist/config/plugins/sonarjs.d.ts +5 -0
- package/dist/config/plugins/sonarjs.js +7 -0
- package/dist/config/plugins/sonarjs.js.map +1 -0
- package/dist/config/plugins/sonarjs.mjs +5 -0
- package/dist/config/plugins/sonarjs.mjs.map +1 -0
- package/dist/config/plugins/sort-keys-fix.d.ts +5 -0
- package/dist/config/plugins/sort-keys-fix.js +7 -0
- package/dist/config/plugins/sort-keys-fix.js.map +1 -0
- package/dist/config/plugins/sort-keys-fix.mjs +5 -0
- package/dist/config/plugins/sort-keys-fix.mjs.map +1 -0
- package/dist/config/plugins/tailwindcss.d.ts +5 -0
- package/dist/config/plugins/tailwindcss.js +7 -0
- package/dist/config/plugins/tailwindcss.js.map +1 -0
- package/dist/config/plugins/tailwindcss.mjs +5 -0
- package/dist/config/plugins/tailwindcss.mjs.map +1 -0
- package/dist/config/plugins/testing-library.d.ts +5 -0
- package/dist/config/plugins/testing-library.js +10 -0
- package/dist/config/plugins/testing-library.js.map +1 -0
- package/dist/config/plugins/testing-library.mjs +8 -0
- package/dist/config/plugins/testing-library.mjs.map +1 -0
- package/dist/config/plugins/toml.d.ts +5 -0
- package/dist/config/plugins/toml.js +7 -0
- package/dist/config/plugins/toml.js.map +1 -0
- package/dist/config/plugins/toml.mjs +5 -0
- package/dist/config/plugins/toml.mjs.map +1 -0
- package/dist/config/plugins/tsdoc.d.ts +5 -0
- package/dist/config/plugins/tsdoc.js +9 -0
- package/dist/config/plugins/tsdoc.js.map +1 -0
- package/dist/config/plugins/tsdoc.mjs +7 -0
- package/dist/config/plugins/tsdoc.mjs.map +1 -0
- package/dist/config/plugins/typescript-sort-keys.d.ts +5 -0
- package/dist/config/plugins/typescript-sort-keys.js +7 -0
- package/dist/config/plugins/typescript-sort-keys.js.map +1 -0
- package/dist/config/plugins/typescript-sort-keys.mjs +5 -0
- package/dist/config/plugins/typescript-sort-keys.mjs.map +1 -0
- package/dist/config/plugins/typescript.d.ts +5 -0
- package/dist/config/plugins/typescript.js +18 -0
- package/dist/config/plugins/typescript.js.map +1 -0
- package/dist/config/plugins/typescript.mjs +16 -0
- package/dist/config/plugins/typescript.mjs.map +1 -0
- package/dist/config/plugins/unicorn.d.ts +5 -0
- package/dist/config/plugins/unicorn.js +15 -0
- package/dist/config/plugins/unicorn.js.map +1 -0
- package/dist/config/plugins/unicorn.mjs +9 -0
- package/dist/config/plugins/unicorn.mjs.map +1 -0
- package/dist/config/plugins/vitest.d.ts +5 -0
- package/dist/config/plugins/vitest.js +7 -0
- package/dist/config/plugins/vitest.js.map +1 -0
- package/dist/config/plugins/vitest.mjs +5 -0
- package/dist/config/plugins/vitest.mjs.map +1 -0
- package/dist/config/plugins/yml.d.ts +5 -0
- package/dist/config/plugins/yml.js +7 -0
- package/dist/config/plugins/yml.js.map +1 -0
- package/dist/config/plugins/yml.mjs +5 -0
- package/dist/config/plugins/yml.mjs.map +1 -0
- package/dist/config/plugins/you-dont-need-lodash-underscore.d.ts +5 -0
- package/dist/config/plugins/you-dont-need-lodash-underscore.js +7 -0
- package/dist/config/plugins/you-dont-need-lodash-underscore.js.map +1 -0
- package/dist/config/plugins/you-dont-need-lodash-underscore.mjs +5 -0
- package/dist/config/plugins/you-dont-need-lodash-underscore.mjs.map +1 -0
- package/dist/config/plugins/you-dont-need-momentjs.d.ts +5 -0
- package/dist/config/plugins/you-dont-need-momentjs.js +7 -0
- package/dist/config/plugins/you-dont-need-momentjs.js.map +1 -0
- package/dist/config/plugins/you-dont-need-momentjs.mjs +5 -0
- package/dist/config/plugins/you-dont-need-momentjs.mjs.map +1 -0
- package/dist/config/plugins/zod.d.ts +5 -0
- package/dist/config/plugins/zod.js +7 -0
- package/dist/config/plugins/zod.js.map +1 -0
- package/dist/config/plugins/zod.mjs +5 -0
- package/dist/config/plugins/zod.mjs.map +1 -0
- package/dist/config/style.d.ts +5 -0
- package/dist/config/style.js +9 -0
- package/dist/config/style.js.map +1 -0
- package/dist/config/style.mjs +3 -0
- package/dist/config/style.mjs.map +1 -0
- package/dist/config/variables.d.ts +5 -0
- package/dist/config/variables.js +9 -0
- package/dist/config/variables.js.map +1 -0
- package/dist/config/variables.mjs +3 -0
- package/dist/config/variables.mjs.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +16 -0
- package/dist/index.mjs.map +1 -0
- package/dist/postinstall.d.ts +2 -0
- package/dist/postinstall.js +65 -0
- package/dist/postinstall.js.map +1 -0
- package/dist/postinstall.mjs +63 -0
- package/dist/postinstall.mjs.map +1 -0
- package/dist/typescript-type-checking.d.ts +5 -0
- package/dist/typescript-type-checking.js +10 -0
- package/dist/typescript-type-checking.js.map +1 -0
- package/dist/typescript-type-checking.mjs +8 -0
- package/dist/typescript-type-checking.mjs.map +1 -0
- package/package.json +106 -50
- package/config.cjs +0 -88
- package/index.cjs +0 -58
- package/lib/check-missing.cjs +0 -57
- package/lib/is-module-available.cjs +0 -8
- package/lib/loggers.cjs +0 -12
- package/lib/postinstall.cjs +0 -115
- package/lib/show-loaded.cjs +0 -21
- package/lib/utils.cjs +0 -90
- package/rules/best-practices.cjs +0 -395
- package/rules/errors.cjs +0 -177
- package/rules/es6.cjs +0 -217
- package/rules/plugins/array-func.cjs +0 -13
- package/rules/plugins/babel.cjs +0 -36
- package/rules/plugins/compat.cjs +0 -3
- package/rules/plugins/cypress.cjs +0 -13
- package/rules/plugins/eslint-comments.cjs +0 -11
- package/rules/plugins/html.cjs +0 -3
- package/rules/plugins/import.cjs +0 -265
- package/rules/plugins/jest-async.cjs +0 -6
- package/rules/plugins/jest-dom.cjs +0 -3
- package/rules/plugins/jest-formatting.cjs +0 -3
- package/rules/plugins/jest.cjs +0 -43
- package/rules/plugins/jsdoc.cjs +0 -4
- package/rules/plugins/json.cjs +0 -40
- package/rules/plugins/jsonc.cjs +0 -70
- package/rules/plugins/jsx-a11y.cjs +0 -261
- package/rules/plugins/lodash-fp.cjs +0 -7
- package/rules/plugins/lodash.cjs +0 -52
- package/rules/plugins/markdown.cjs +0 -32
- package/rules/plugins/mdx.cjs +0 -4
- package/rules/plugins/no-loops.cjs +0 -7
- package/rules/plugins/no-secrets.cjs +0 -20
- package/rules/plugins/no-unsanitized.cjs +0 -8
- package/rules/plugins/node.cjs +0 -44
- package/rules/plugins/optimize-regex.cjs +0 -6
- package/rules/plugins/promise.cjs +0 -9
- package/rules/plugins/react-hooks.cjs +0 -20
- package/rules/plugins/react-redux.cjs +0 -9
- package/rules/plugins/react.cjs +0 -659
- package/rules/plugins/simple-import-sort.cjs +0 -10
- package/rules/plugins/sonarjs.cjs +0 -5
- package/rules/plugins/sort-keys-fix.cjs +0 -6
- package/rules/plugins/tailwindcss.cjs +0 -4
- package/rules/plugins/testing-library.cjs +0 -34
- package/rules/plugins/toml.cjs +0 -9
- package/rules/plugins/typescript-sort-keys.cjs +0 -19
- package/rules/plugins/typescript.cjs +0 -427
- package/rules/plugins/unicorn.cjs +0 -20
- package/rules/plugins/yml.cjs +0 -12
- package/rules/plugins/you-dont-need-lodash-underscore.cjs +0 -3
- package/rules/plugins/you-dont-need-momentjs.cjs +0 -3
- package/rules/style.cjs +0 -629
- package/rules/variables.cjs +0 -54
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["packageIsTypeModule","pkg","join","semver","hasAnyDep","hasDependency","hasDevDependency","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","anolilabEslintConfig","plugin","dependencies","configName","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"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","sourcesContent":["/**\n * @rushstack/eslint-patch is used to include plugins as dev\n * dependencies instead of imposing them as peer dependencies\n *\n * https://www.npmjs.com/package/@rushstack/eslint-patch\n */\nimport \"@rushstack/eslint-patch/modern-module-resolution\";\n\nimport { packageIsTypeModule, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { pluginRules, possiblePluginRules, rules } from \"./config\";\nimport engineRules from \"./engine-node-overwrite\";\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 \"optimize-regex\",\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 Object.entries(possiblePluginRules).forEach(([plugin, dependencies]) => {\n const hasOneDependency = Object.values(dependencies).some(Boolean);\n\n if (hasOneDependency) {\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 if (Object.keys(possiblePluginRules).length > 0) {\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 = {};\n\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 configRules[rule] = ruleConfig[minVersion as keyof typeof ruleConfig] as Linter.RuleEntry;\n }\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 // is loaded.\n root: true,\n // Disable the parser by default\n parser: \"\",\n\n extends: [\n ...rules\n\n .map((plugin) => join(__dirname, `./config/${plugin}.${packageIsTypeModule ? \"m\" : \"\"}js`)),\n\n ...pluginRules.map((plugin) => join(__dirname, `./config/plugins/${plugin}.${packageIsTypeModule ? \"m\" : \"\"}js`)),\n ],\n rules: {\n ...configRules,\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 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};\n\nexport default config;\n","import {\n hasAnyDep, hasDependency, hasDevDependency, pkg,\n} from \"@anolilab/package-json-utils\";\n\nimport type { PackageRules } from \"./types\";\n\nconst baseConfig = [\"best-practices\", \"errors\", \"style\", \"es6\", \"variables\"];\n\nconst internalPluginConfig = [\n \"compat\",\n \"eslint-comments\",\n \"import\",\n \"optimize-regex\",\n \"promise\",\n \"simple-import-sort\",\n \"no-extend-native\",\n \"node\",\n // Security Rules\n \"no-secrets\",\n \"sonarjs\",\n \"security\",\n // file rules\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"html\",\n\n // custom rules\n \"antfu\",\n \"unicorn\",\n \"es\",\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: [\"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: \"you-dont-need-momentjs\",\n dependencies: [\"moment\", \"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: [\"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: \"typescript\",\n dependencies: [\"typescript\"],\n },\n {\n configName: \"typescript-sort-keys\",\n dependencies: [\"typescript\", \"eslint-plugin-typescript-sort-keys\"],\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\nconst loadedPlugins: string[] = [...internalPluginConfig];\nconst possiblePlugins: { [rule: string]: { [packageName: string]: boolean } } = {};\n\nlet anolilabEslintConfig: { [key: string]: { [key: string]: false | undefined} } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\npluginConfig.forEach((plugin) => {\n const { dependencies, configName } = plugin;\n\n if (anolilabEslintConfig?.[\"plugin\"]?.[configName] !== false) {\n if (\n hasAnyDep(dependencies, {\n peerDeps: false,\n strict: true,\n })\n ) {\n loadedPlugins.push(configName);\n } else {\n possiblePlugins[configName] = {};\n\n dependencies.forEach((dependency) => {\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 \"unicorn/prefer-spread\": {\n \"5.0.0\": \"off\",\n },\n \"unicorn/no-new-buffer\": {\n \"5.10.0\": \"off\",\n },\n \"prefer-rest-params\": {\n \"6.0.0\": \"off\",\n },\n \"prefer-destructuring\": {\n \"6.0.0\": \"off\",\n },\n \"promise/prefer-await-to-then\": {\n \"7.6.0\": \"off\",\n },\n \"prefer-object-spread\": {\n \"8.3.0\": \"off\",\n },\n \"n/prefer-global/url-search-params\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-global/url\": {\n \"10.0.0\": \"off\",\n },\n \"no-useless-catch\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-named-capture-group\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-global/text-encoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/text-decoder\": {\n \"11.0.0\": \"off\",\n },\n \"unicorn/prefer-flat-map\": {\n \"11.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};\n\nexport default engineRules;\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
4
|
+
var fs = require('fs');
|
|
5
|
+
var path = require('path');
|
|
6
|
+
var util = require('util');
|
|
7
|
+
|
|
8
|
+
process.env.CI&&process.exit(0);var p=util.promisify(fs.writeFile);console.log("Configuring @anolilab/eslint-config",packageJsonUtils.projectPath,`
|
|
9
|
+
`);var h=()=>{let t=path.join(packageJsonUtils.projectPath,".eslintrc.js"),i="",l=`
|
|
10
|
+
parserOptions: {
|
|
11
|
+
ecmaVersion: "latest",
|
|
12
|
+
sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
|
|
13
|
+
},`,a=path.join(packageJsonUtils.projectPath,"tsconfig.json");if(fs.existsSync(a)){let c=JSON.parse(fs.readFileSync(a,"utf8")),e="latest";c.compilerOptions?.target&&(e=c.compilerOptions.target,e=e.toLowerCase()==="es2022"||e.toLowerCase()==="esnext"?"latest":e.toLowerCase().replace("es",""),e!=="latest"&&e!=="2022"&&e!=="2021"&&e!=="2021"&&e!=="6"&&(i=`, "plugin:es/restrict-to-es${e}"`)),l=`
|
|
14
|
+
parserOptions: {
|
|
15
|
+
project: "./tsconfig.json",
|
|
16
|
+
ecmaVersion: ${e==="latest"?`"${e}"`:e},
|
|
17
|
+
sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
|
|
18
|
+
},`;}let f=`/** @ts-check */
|
|
19
|
+
/** @type {import('eslint').Linter.Config} */
|
|
20
|
+
${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} {
|
|
21
|
+
root: true,
|
|
22
|
+
extends: ["@anolilab/eslint-config"${i}],
|
|
23
|
+
ignorePatterns: ["!**/*"],
|
|
24
|
+
env: {
|
|
25
|
+
// Your environments (which contains several predefined global variables)
|
|
26
|
+
// Most environments are loaded automatically if our rules are added
|
|
27
|
+
},${l}
|
|
28
|
+
globals: {
|
|
29
|
+
// Your global variables (setting to false means it's not allowed to be reassigned)
|
|
30
|
+
// myGlobal: false
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
// Customize your rules
|
|
34
|
+
},
|
|
35
|
+
overrides: [
|
|
36
|
+
{
|
|
37
|
+
files: [
|
|
38
|
+
"*.ts",
|
|
39
|
+
"*.tsx",
|
|
40
|
+
"*.mts",
|
|
41
|
+
"*.cts",
|
|
42
|
+
"*.js",
|
|
43
|
+
"*.jsx",
|
|
44
|
+
],
|
|
45
|
+
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
|
|
46
|
+
parserOptions: {},
|
|
47
|
+
rules: {},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
|
|
51
|
+
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
|
|
52
|
+
parserOptions: {},
|
|
53
|
+
rules: {},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
files: ["*.js", "*.jsx"],
|
|
57
|
+
rules: {},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
`;return fs.existsSync(t)?(console.warn(`\u26A0\uFE0F .eslintrc.cjs already exists;
|
|
62
|
+
Make sure that it includes the following for @anolilab/eslint-config'
|
|
63
|
+
to work as it should: { extends: ["@anolilab/eslint-config"] }.`),Promise.resolve()):p(t,f,"utf-8")},d=()=>{let t=path.join(packageJsonUtils.projectPath,".eslintignore");return fs.existsSync(t)?(console.warn("\u26A0\uFE0F .eslintignore already exists"),Promise.resolve()):p(t,"","utf-8")};(async()=>{try{await Promise.all([h(),d()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();
|
|
64
|
+
//# sourceMappingURL=out.js.map
|
|
65
|
+
//# sourceMappingURL=postinstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","readFileSync","writeFile","join","promisify","writeFileAsync","writeEslintRc","eslintPath","pluginExtends","parserOptions","tsconfigPath","tsConfig","ecmaVersion","content","writeEslintIgnore","eslintIgnorePath","error"],"mappings":"AAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,gBAAAC,EAAc,aAAAC,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,sCAAuCH,EAAa;AAAA,CAAI,EAMpE,IAAMO,EAAgB,IAAM,CACxB,IAAMC,EAAaJ,EAAKJ,EAAa,cAAc,EAE/CS,EAAgB,GAChBC,EAAgB;AAAA;AAAA;AAAA,sBAGFX,EAAsB,WAAa;AAAA,QAG/CY,EAAeP,EAAKJ,EAAa,eAAe,EAEtD,GAAIC,EAAWU,CAAY,EAAG,CAE1B,IAAMC,EAAW,KAAK,MAAMV,EAAaS,EAAc,MAAM,CAAC,EAE1DE,EAAc,SAGdD,EAAS,iBAAiB,SAE1BC,EAAcD,EAAS,gBAAgB,OAEvCC,EAAcA,EAAY,YAAY,IAAM,UAAYA,EAAY,YAAY,IAAM,SAAW,SAAWA,EAAY,YAAY,EAAE,QAAQ,KAAM,EAAE,EAElJA,IAAgB,UAAYA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,MAC1HJ,EAAgB,8BAA8BI,OAItDH,EAAgB;AAAA;AAAA;AAAA,uBAGDG,IAAgB,SAAW,IAAIA,KAAiBA;AAAA,sBACjDd,EAAsB,WAAa;AAAA,QAIrD,IAAMe,EAAU;AAAA;AAAA,EAElBf,EAAsB,iBAAmB;AAAA;AAAA,yCAEFU;AAAA;AAAA;AAAA;AAAA;AAAA,QAKjCC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoCJ,OAAIT,EAAWO,CAAU,GACrB,QAAQ,KAAK;AAAA;AAAA,gEAE2C,EAEjD,QAAQ,QAAQ,GAGpBF,EAAeE,EAAYM,EAAS,OAAO,CACtD,EAKMC,EAAoB,IAAM,CAC5B,IAAMC,EAAmBZ,EAAKJ,EAAa,eAAe,EAE1D,OAAIC,EAAWe,CAAgB,GAC3B,QAAQ,KAAK,4CAAkC,EAExC,QAAQ,QAAQ,GAGpBV,EAAeU,EAAkB,GAAI,OAAO,CACvD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACT,EAAc,EAAGQ,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\n\");\n\n/**\n * Writes .eslintrc.js if it doesn't exist. Warns if it exists.\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst writeEslintRc = () => {\n const eslintPath = join(projectPath, \".eslintrc.js\");\n\n let pluginExtends = \"\";\n let parserOptions = `\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n\n const tsconfigPath = join(projectPath, \"tsconfig.json\");\n\n if (existsSync(tsconfigPath)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const tsConfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n\n let ecmaVersion = \"latest\";\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (tsConfig.compilerOptions?.target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n ecmaVersion = tsConfig.compilerOptions.target;\n\n ecmaVersion = ecmaVersion.toLowerCase() === \"es2022\" || ecmaVersion.toLowerCase() === \"esnext\" ? \"latest\" : ecmaVersion.toLowerCase().replace(\"es\", \"\");\n\n if (ecmaVersion !== \"latest\" && ecmaVersion !== \"2022\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"6\") {\n pluginExtends = `, \"plugin:es/restrict-to-es${ecmaVersion}\"`;\n }\n }\n\n parserOptions = `\n parserOptions: {\n project: \"./tsconfig.json\",\n ecmaVersion: ${ecmaVersion === \"latest\" ? `\"${ecmaVersion}\"` : ecmaVersion},\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n }\n\n const content = `/** @ts-check */\n/** @type {import('eslint').Linter.Config} */\n${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n root: true,\n extends: [\"@anolilab/eslint-config\"${pluginExtends}],\n ignorePatterns: [\"!**/*\"],\n env: {\n // Your environments (which contains several predefined global variables)\n // Most environments are loaded automatically if our rules are added\n },${parserOptions}\n globals: {\n // Your global variables (setting to false means it's not allowed to be reassigned)\n // myGlobal: false\n },\n rules: {\n // Customize your rules\n },\n overrides: [\n {\n files: [\n \"*.ts\",\n \"*.tsx\",\n \"*.mts\",\n \"*.cts\",\n \"*.js\",\n \"*.jsx\",\n ],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.js\", \"*.jsx\"],\n rules: {},\n },\n ],\n};\n`;\n\n if (existsSync(eslintPath)) {\n console.warn(`⚠️ .eslintrc.cjs already exists;\nMake sure that it includes the following for @anolilab/eslint-config'\nto work as it should: { extends: [\"@anolilab/eslint-config\"] }.`);\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .eslintignore if it doesn't exist. Warns if it exists.\n */\nconst writeEslintIgnore = () => {\n const eslintIgnorePath = join(projectPath, \".eslintignore\");\n\n if (existsSync(eslintIgnorePath)) {\n console.warn(\"⚠️ .eslintignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintIgnorePath, \"\", \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writeEslintRc(), writeEslintIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
|
|
2
|
+
import { writeFile, existsSync, readFileSync } from 'fs';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
|
|
6
|
+
process.env.CI&&process.exit(0);var p=promisify(writeFile);console.log("Configuring @anolilab/eslint-config",projectPath,`
|
|
7
|
+
`);var h=()=>{let t=join(projectPath,".eslintrc.js"),i="",l=`
|
|
8
|
+
parserOptions: {
|
|
9
|
+
ecmaVersion: "latest",
|
|
10
|
+
sourceType: ${packageIsTypeModule?'"module"':'"commonjs"'},
|
|
11
|
+
},`,a=join(projectPath,"tsconfig.json");if(existsSync(a)){let c=JSON.parse(readFileSync(a,"utf8")),e="latest";c.compilerOptions?.target&&(e=c.compilerOptions.target,e=e.toLowerCase()==="es2022"||e.toLowerCase()==="esnext"?"latest":e.toLowerCase().replace("es",""),e!=="latest"&&e!=="2022"&&e!=="2021"&&e!=="2021"&&e!=="6"&&(i=`, "plugin:es/restrict-to-es${e}"`)),l=`
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: "./tsconfig.json",
|
|
14
|
+
ecmaVersion: ${e==="latest"?`"${e}"`:e},
|
|
15
|
+
sourceType: ${packageIsTypeModule?'"module"':'"commonjs"'},
|
|
16
|
+
},`;}let f=`/** @ts-check */
|
|
17
|
+
/** @type {import('eslint').Linter.Config} */
|
|
18
|
+
${packageIsTypeModule?"export default":"module.exports ="} {
|
|
19
|
+
root: true,
|
|
20
|
+
extends: ["@anolilab/eslint-config"${i}],
|
|
21
|
+
ignorePatterns: ["!**/*"],
|
|
22
|
+
env: {
|
|
23
|
+
// Your environments (which contains several predefined global variables)
|
|
24
|
+
// Most environments are loaded automatically if our rules are added
|
|
25
|
+
},${l}
|
|
26
|
+
globals: {
|
|
27
|
+
// Your global variables (setting to false means it's not allowed to be reassigned)
|
|
28
|
+
// myGlobal: false
|
|
29
|
+
},
|
|
30
|
+
rules: {
|
|
31
|
+
// Customize your rules
|
|
32
|
+
},
|
|
33
|
+
overrides: [
|
|
34
|
+
{
|
|
35
|
+
files: [
|
|
36
|
+
"*.ts",
|
|
37
|
+
"*.tsx",
|
|
38
|
+
"*.mts",
|
|
39
|
+
"*.cts",
|
|
40
|
+
"*.js",
|
|
41
|
+
"*.jsx",
|
|
42
|
+
],
|
|
43
|
+
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
|
|
44
|
+
parserOptions: {},
|
|
45
|
+
rules: {},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
|
|
49
|
+
// Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
|
|
50
|
+
parserOptions: {},
|
|
51
|
+
rules: {},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
files: ["*.js", "*.jsx"],
|
|
55
|
+
rules: {},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
`;return existsSync(t)?(console.warn(`\u26A0\uFE0F .eslintrc.cjs already exists;
|
|
60
|
+
Make sure that it includes the following for @anolilab/eslint-config'
|
|
61
|
+
to work as it should: { extends: ["@anolilab/eslint-config"] }.`),Promise.resolve()):p(t,f,"utf-8")},d=()=>{let t=join(projectPath,".eslintignore");return existsSync(t)?(console.warn("\u26A0\uFE0F .eslintignore already exists"),Promise.resolve()):p(t,"","utf-8")};(async()=>{try{await Promise.all([h(),d()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();
|
|
62
|
+
//# sourceMappingURL=out.js.map
|
|
63
|
+
//# sourceMappingURL=postinstall.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","readFileSync","writeFile","join","promisify","writeFileAsync","writeEslintRc","eslintPath","pluginExtends","parserOptions","tsconfigPath","tsConfig","ecmaVersion","content","writeEslintIgnore","eslintIgnorePath","error"],"mappings":"AAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,gBAAAC,EAAc,aAAAC,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,sCAAuCH,EAAa;AAAA,CAAI,EAMpE,IAAMO,EAAgB,IAAM,CACxB,IAAMC,EAAaJ,EAAKJ,EAAa,cAAc,EAE/CS,EAAgB,GAChBC,EAAgB;AAAA;AAAA;AAAA,sBAGFX,EAAsB,WAAa;AAAA,QAG/CY,EAAeP,EAAKJ,EAAa,eAAe,EAEtD,GAAIC,EAAWU,CAAY,EAAG,CAE1B,IAAMC,EAAW,KAAK,MAAMV,EAAaS,EAAc,MAAM,CAAC,EAE1DE,EAAc,SAGdD,EAAS,iBAAiB,SAE1BC,EAAcD,EAAS,gBAAgB,OAEvCC,EAAcA,EAAY,YAAY,IAAM,UAAYA,EAAY,YAAY,IAAM,SAAW,SAAWA,EAAY,YAAY,EAAE,QAAQ,KAAM,EAAE,EAElJA,IAAgB,UAAYA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,MAC1HJ,EAAgB,8BAA8BI,OAItDH,EAAgB;AAAA;AAAA;AAAA,uBAGDG,IAAgB,SAAW,IAAIA,KAAiBA;AAAA,sBACjDd,EAAsB,WAAa;AAAA,QAIrD,IAAMe,EAAU;AAAA;AAAA,EAElBf,EAAsB,iBAAmB;AAAA;AAAA,yCAEFU;AAAA;AAAA;AAAA;AAAA;AAAA,QAKjCC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoCJ,OAAIT,EAAWO,CAAU,GACrB,QAAQ,KAAK;AAAA;AAAA,gEAE2C,EAEjD,QAAQ,QAAQ,GAGpBF,EAAeE,EAAYM,EAAS,OAAO,CACtD,EAKMC,EAAoB,IAAM,CAC5B,IAAMC,EAAmBZ,EAAKJ,EAAa,eAAe,EAE1D,OAAIC,EAAWe,CAAgB,GAC3B,QAAQ,KAAK,4CAAkC,EAExC,QAAQ,QAAQ,GAGpBV,EAAeU,EAAkB,GAAI,OAAO,CACvD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACT,EAAc,EAAGQ,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\n\");\n\n/**\n * Writes .eslintrc.js if it doesn't exist. Warns if it exists.\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst writeEslintRc = () => {\n const eslintPath = join(projectPath, \".eslintrc.js\");\n\n let pluginExtends = \"\";\n let parserOptions = `\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n\n const tsconfigPath = join(projectPath, \"tsconfig.json\");\n\n if (existsSync(tsconfigPath)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const tsConfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\"));\n\n let ecmaVersion = \"latest\";\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (tsConfig.compilerOptions?.target) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n ecmaVersion = tsConfig.compilerOptions.target;\n\n ecmaVersion = ecmaVersion.toLowerCase() === \"es2022\" || ecmaVersion.toLowerCase() === \"esnext\" ? \"latest\" : ecmaVersion.toLowerCase().replace(\"es\", \"\");\n\n if (ecmaVersion !== \"latest\" && ecmaVersion !== \"2022\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"6\") {\n pluginExtends = `, \"plugin:es/restrict-to-es${ecmaVersion}\"`;\n }\n }\n\n parserOptions = `\n parserOptions: {\n project: \"./tsconfig.json\",\n ecmaVersion: ${ecmaVersion === \"latest\" ? `\"${ecmaVersion}\"` : ecmaVersion},\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n }\n\n const content = `/** @ts-check */\n/** @type {import('eslint').Linter.Config} */\n${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n root: true,\n extends: [\"@anolilab/eslint-config\"${pluginExtends}],\n ignorePatterns: [\"!**/*\"],\n env: {\n // Your environments (which contains several predefined global variables)\n // Most environments are loaded automatically if our rules are added\n },${parserOptions}\n globals: {\n // Your global variables (setting to false means it's not allowed to be reassigned)\n // myGlobal: false\n },\n rules: {\n // Customize your rules\n },\n overrides: [\n {\n files: [\n \"*.ts\",\n \"*.tsx\",\n \"*.mts\",\n \"*.cts\",\n \"*.js\",\n \"*.jsx\",\n ],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.js\", \"*.jsx\"],\n rules: {},\n },\n ],\n};\n`;\n\n if (existsSync(eslintPath)) {\n console.warn(`⚠️ .eslintrc.cjs already exists;\nMake sure that it includes the following for @anolilab/eslint-config'\nto work as it should: { extends: [\"@anolilab/eslint-config\"] }.`);\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .eslintignore if it doesn't exist. Warns if it exists.\n */\nconst writeEslintIgnore = () => {\n const eslintIgnorePath = join(projectPath, \".eslintignore\");\n\n if (existsSync(eslintIgnorePath)) {\n console.warn(\"⚠️ .eslintignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintIgnorePath, \"\", \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writeEslintRc(), writeEslintIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6E2RGUNG_js = require('./chunk-6E2RGUNG.js');
|
|
4
|
+
var chunkARKJLBXP_js = require('./chunk-ARKJLBXP.js');
|
|
5
|
+
|
|
6
|
+
var e=chunk6E2RGUNG_js.a.rules,i=chunkARKJLBXP_js.a("typescript",{rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"dot-notation":"off","@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","no-throw-literal":"off","@typescript-eslint/no-throw-literal":e["no-throw-literal"],"no-implied-eval":"off","no-new-func":"off","@typescript-eslint/no-implied-eval":e["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-unnecessary-type-assertion":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","require-await":"off","@typescript-eslint/require-await":e["require-await"],"@typescript-eslint/promise-function-async":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error"}}),o=i;
|
|
7
|
+
|
|
8
|
+
module.exports = o;
|
|
9
|
+
//# sourceMappingURL=out.js.map
|
|
10
|
+
//# sourceMappingURL=typescript-type-checking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["bestPracticesRules","best_practices_default","config","create_config_default","typescript_type_checking_default"],"mappings":"gFAKA,IAAMA,EAAqBC,EAAoB,MAEzCC,EAASC,EAAa,aAAc,CACtC,MAAO,CAEH,oCAAqC,QAErC,6CAA8C,CAC1C,QACA,CACI,uCAAwC,EAC5C,CACJ,EAIA,eAAgB,MAChB,kCAAmC,CAAC,QAAS,CAAE,cAAe,EAAK,CAAC,EAGpE,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,QAItC,mBAAoB,MACpB,sCAAuCH,EAAmB,kBAAkB,EAI5E,kBAAmB,MACnB,cAAe,MACf,qCAAsCA,EAAmB,iBAAiB,EAI1E,kDAAmD,CAAC,QAAS,CAAE,WAAY,EAAK,CAAC,EAIjF,yCAA0C,CACtC,QACA,CACI,mBAAoB,GACpB,iBAAkB,CACd,UAAW,GACX,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,UAAW,EACf,CACJ,CACJ,EAIA,mDAAoD,MAIpD,qCAAsC,QAGtC,+CAAgD,CAC5C,QACA,CACI,uBAAwB,GACxB,8BAA+B,EACnC,CACJ,EAIA,wCAAyC,QAIzC,6CAA8C,QAI9C,oDAAqD,QAIrD,gBAAiB,MACjB,mCAAoCA,EAAmB,eAAe,EAGtE,4CAA6C,QAG7C,oCAAqC,CAAC,QAAS,CAAE,aAAc,EAAM,CAAC,EAGtE,gDAAiD,CAC7C,QACA,CACI,mBAAoB,EACxB,CACJ,EAGA,kCAAmC,CAAC,QAAS,QAAQ,EAGrD,iDAAkD,QAIlD,8CAA+C,QAG/C,4CAA6C,QAI7C,8CAA+C,QAI/C,mDAAoD,QAGpD,qCAAsC,CAAC,QAAS,CAAE,kBAAmB,EAAM,CAAC,EAI5E,kDAAmD,OACvD,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 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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n\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 // Replace 'no-throw-literal' rule with '@typescript-eslint' version\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 \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\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 \"no-new-func\": \"off\",\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\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-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n\n // Disallow Promises in places not designed to handle them.\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 // Warns if a type assertion does not change the type of an expression\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Enforce includes method over indexOf method.\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 // 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 // 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-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"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-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"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-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\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 // 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/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\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 // 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 // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\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\n // Disallow type arguments that are equal to the default.\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 // 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 using type parameter when calling Array#reduce instead of casting.\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});\n\nexport default config;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a } from './chunk-WDMF75TJ.mjs';
|
|
2
|
+
import { a as a$1 } from './chunk-3XUVOUJE.mjs';
|
|
3
|
+
|
|
4
|
+
var e=a.rules,i=a$1("typescript",{rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"dot-notation":"off","@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","no-throw-literal":"off","@typescript-eslint/no-throw-literal":e["no-throw-literal"],"no-implied-eval":"off","no-new-func":"off","@typescript-eslint/no-implied-eval":e["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-unnecessary-type-assertion":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","require-await":"off","@typescript-eslint/require-await":e["require-await"],"@typescript-eslint/promise-function-async":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error"}}),o=i;
|
|
5
|
+
|
|
6
|
+
export { o as default };
|
|
7
|
+
//# sourceMappingURL=out.js.map
|
|
8
|
+
//# sourceMappingURL=typescript-type-checking.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["bestPracticesRules","best_practices_default","config","create_config_default","typescript_type_checking_default"],"mappings":"kFAKA,IAAMA,EAAqBC,EAAoB,MAEzCC,EAASC,EAAa,aAAc,CACtC,MAAO,CAEH,oCAAqC,QAErC,6CAA8C,CAC1C,QACA,CACI,uCAAwC,EAC5C,CACJ,EAIA,eAAgB,MAChB,kCAAmC,CAAC,QAAS,CAAE,cAAe,EAAK,CAAC,EAGpE,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,QAItC,mBAAoB,MACpB,sCAAuCH,EAAmB,kBAAkB,EAI5E,kBAAmB,MACnB,cAAe,MACf,qCAAsCA,EAAmB,iBAAiB,EAI1E,kDAAmD,CAAC,QAAS,CAAE,WAAY,EAAK,CAAC,EAIjF,yCAA0C,CACtC,QACA,CACI,mBAAoB,GACpB,iBAAkB,CACd,UAAW,GACX,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,UAAW,EACf,CACJ,CACJ,EAIA,mDAAoD,MAIpD,qCAAsC,QAGtC,+CAAgD,CAC5C,QACA,CACI,uBAAwB,GACxB,8BAA+B,EACnC,CACJ,EAIA,wCAAyC,QAIzC,6CAA8C,QAI9C,oDAAqD,QAIrD,gBAAiB,MACjB,mCAAoCA,EAAmB,eAAe,EAGtE,4CAA6C,QAG7C,oCAAqC,CAAC,QAAS,CAAE,aAAc,EAAM,CAAC,EAGtE,gDAAiD,CAC7C,QACA,CACI,mBAAoB,EACxB,CACJ,EAGA,kCAAmC,CAAC,QAAS,QAAQ,EAGrD,iDAAkD,QAIlD,8CAA+C,QAG/C,4CAA6C,QAI7C,8CAA+C,QAI/C,mDAAoD,QAGpD,qCAAsC,CAAC,QAAS,CAAE,kBAAmB,EAAM,CAAC,EAI5E,kDAAmD,OACvD,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 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 // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n\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 // Replace 'no-throw-literal' rule with '@typescript-eslint' version\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 \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\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 \"no-new-func\": \"off\",\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\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-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n\n // Disallow Promises in places not designed to handle them.\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 // Warns if a type assertion does not change the type of an expression\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Enforce includes method over indexOf method.\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 // 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 // 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-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"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-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"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-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\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 // 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/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\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 // 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 // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\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\n // Disallow type arguments that are equal to the default.\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 // 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 using type parameter when calling Array#reduce instead of casting.\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});\n\nexport default config;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -37,66 +37,78 @@
|
|
|
37
37
|
"name": "Daniel Bannert",
|
|
38
38
|
"email": "d.bannert@anolilab.de"
|
|
39
39
|
},
|
|
40
|
-
"type": "module",
|
|
41
40
|
"exports": {
|
|
42
|
-
".":
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"./
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"require": "./dist/index.js",
|
|
44
|
+
"import": "./dist/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./typescript-type-checking": {
|
|
47
|
+
"require": "./dist/typescript-type-checking.js",
|
|
48
|
+
"import": "./dist/typescript-type-checking.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./package.json": "./package.json"
|
|
48
51
|
},
|
|
49
|
-
"main": "index.
|
|
52
|
+
"main": "dist/index.js",
|
|
53
|
+
"module": "dist/index.mjs",
|
|
54
|
+
"types": "dist/index.d.ts",
|
|
50
55
|
"files": [
|
|
51
|
-
"
|
|
52
|
-
"config.cjs",
|
|
53
|
-
"rules",
|
|
54
|
-
"lib",
|
|
56
|
+
"dist",
|
|
55
57
|
"README.md",
|
|
56
58
|
"CHANGELOG.md",
|
|
57
59
|
"LICENSE.md"
|
|
58
60
|
],
|
|
59
61
|
"scripts": {
|
|
60
|
-
"
|
|
62
|
+
"build": "cross-env NODE_ENV=development tsup",
|
|
63
|
+
"build:prod": "cross-env NODE_ENV=production tsup",
|
|
64
|
+
"clean": "rimraf node_modules dist",
|
|
65
|
+
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
61
66
|
},
|
|
62
67
|
"dependencies": {
|
|
68
|
+
"@anolilab/package-json-utils": "1.3.0",
|
|
69
|
+
"@rushstack/eslint-patch": "^1.3.1",
|
|
63
70
|
"@rushstack/eslint-plugin-security": "^0.6.0",
|
|
71
|
+
"@typescript-eslint/eslint-plugin": ">=5.55.0",
|
|
72
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
64
73
|
"confusing-browser-globals": "^1.0.11",
|
|
65
74
|
"eslint-import-resolver-node": "^0.3.7",
|
|
75
|
+
"eslint-plugin-antfu": "^0.39.5",
|
|
66
76
|
"eslint-plugin-compat": "^4.1.4",
|
|
77
|
+
"eslint-plugin-es": "^4.1.0",
|
|
67
78
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
68
|
-
"eslint-plugin-
|
|
79
|
+
"eslint-plugin-html": "^7.1.0",
|
|
80
|
+
"eslint-plugin-i": "^2.27.5",
|
|
69
81
|
"eslint-plugin-jsonc": "^2.8.0",
|
|
70
82
|
"eslint-plugin-markdown": "^3.0.0",
|
|
83
|
+
"eslint-plugin-mdx": "^2.1.0",
|
|
71
84
|
"eslint-plugin-no-loops": "^0.3.0",
|
|
72
85
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
86
|
+
"eslint-plugin-no-use-extend-native": "^0.5.0",
|
|
73
87
|
"eslint-plugin-optimize-regex": "^1.2.1",
|
|
74
88
|
"eslint-plugin-promise": "^6.1.1",
|
|
75
89
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
76
90
|
"eslint-plugin-sonarjs": "^0.19.0",
|
|
77
91
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
78
92
|
"eslint-plugin-toml": "^0.5.0",
|
|
93
|
+
"eslint-plugin-typescript-sort-keys": "^2.3.0",
|
|
79
94
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
80
95
|
"eslint-plugin-yml": "^1.7.0",
|
|
81
|
-
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
82
|
-
"eslint-plugin-you-dont-need-momentjs": "^1.6.0",
|
|
83
96
|
"find-up": "5.0.0",
|
|
84
97
|
"jsonc-eslint-parser": "^2.3.0",
|
|
85
|
-
"
|
|
86
|
-
"object.assign": "^4.1.4",
|
|
87
|
-
"read-pkg-up": "7.0.1",
|
|
98
|
+
"read-pkg-up": "^7.0.1",
|
|
88
99
|
"semver": "^7.5.1",
|
|
89
100
|
"toml-eslint-parser": "^0.6.0",
|
|
90
101
|
"yaml-eslint-parser": "^1.2.2"
|
|
91
102
|
},
|
|
92
103
|
"devDependencies": {
|
|
93
|
-
"semantic-release": "^21.0.4",
|
|
94
104
|
"@anolilab/semantic-release-preset": "3.1.1",
|
|
95
105
|
"@testing-library/dom": "^9.3.0",
|
|
96
|
-
"@
|
|
97
|
-
"@
|
|
106
|
+
"@types/confusing-browser-globals": "^1.0.0",
|
|
107
|
+
"@types/eslint": "^8.40.2",
|
|
108
|
+
"@types/semver": "^7.5.0",
|
|
98
109
|
"eslint": "^8.42.0",
|
|
99
110
|
"eslint-find-rules": "^4.1.0",
|
|
111
|
+
"eslint-import-resolver-typescript": "^3.5.5",
|
|
100
112
|
"eslint-plugin-babel": "^5.3.1",
|
|
101
113
|
"eslint-plugin-cypress": "^2.13.3",
|
|
102
114
|
"eslint-plugin-jest": "^27.2.1",
|
|
@@ -104,9 +116,8 @@
|
|
|
104
116
|
"eslint-plugin-jest-dom": "^5.0.1",
|
|
105
117
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
106
118
|
"eslint-plugin-jsdoc": "^46.2.6",
|
|
107
|
-
"eslint-plugin-json": "^3.1.0",
|
|
108
119
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
109
|
-
"eslint-plugin-
|
|
120
|
+
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
110
121
|
"eslint-plugin-node": "^11.1.0",
|
|
111
122
|
"eslint-plugin-prefer-object-spread": "^1.2.1",
|
|
112
123
|
"eslint-plugin-react": "^7.32.2",
|
|
@@ -114,18 +125,21 @@
|
|
|
114
125
|
"eslint-plugin-react-redux": "^4.0.0",
|
|
115
126
|
"eslint-plugin-tailwindcss": "^3.12.1",
|
|
116
127
|
"eslint-plugin-testing-library": "^5.11.0",
|
|
117
|
-
"eslint-plugin-
|
|
128
|
+
"eslint-plugin-vitest": "^0.1.5",
|
|
129
|
+
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
130
|
+
"eslint-plugin-you-dont-need-momentjs": "^1.6.0",
|
|
131
|
+
"eslint-plugin-zod": "^1.4.0",
|
|
118
132
|
"jest": "^29.5.0",
|
|
119
133
|
"react": "^18.2.0",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
134
|
+
"semantic-release": "^21.0.4",
|
|
135
|
+
"typescript": "^5.1.3"
|
|
122
136
|
},
|
|
123
137
|
"peerDependencies": {
|
|
124
138
|
"eslint": "^8.15.0"
|
|
125
139
|
},
|
|
126
140
|
"optionalDependencies": {
|
|
127
|
-
"
|
|
128
|
-
"
|
|
141
|
+
"eslint-plugin-array-func": "^3.1.8",
|
|
142
|
+
"eslint-plugin-ava": "^14.0.0",
|
|
129
143
|
"eslint-plugin-babel": "^5.3.1",
|
|
130
144
|
"eslint-plugin-cypress": "^2.13.3",
|
|
131
145
|
"eslint-plugin-jest": "^27.2.1",
|
|
@@ -133,17 +147,18 @@
|
|
|
133
147
|
"eslint-plugin-jest-dom": "^5.0.1",
|
|
134
148
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
135
149
|
"eslint-plugin-jsdoc": "^46.2.6",
|
|
136
|
-
"eslint-plugin-json": "^3.1.0",
|
|
137
150
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
138
|
-
"eslint-plugin-
|
|
139
|
-
"eslint-plugin-
|
|
151
|
+
"eslint-plugin-n": "^16.0.0",
|
|
152
|
+
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
140
153
|
"eslint-plugin-prefer-object-spread": "^1.2.1",
|
|
141
154
|
"eslint-plugin-react": "^7.32.2",
|
|
142
155
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
143
156
|
"eslint-plugin-react-redux": "^4.0.0",
|
|
144
157
|
"eslint-plugin-tailwindcss": "^3.12.1",
|
|
145
158
|
"eslint-plugin-testing-library": "^5.11.0",
|
|
146
|
-
"eslint-plugin-
|
|
159
|
+
"eslint-plugin-tsdoc": "^0.2.17",
|
|
160
|
+
"eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
|
|
161
|
+
"eslint-plugin-you-dont-need-momentjs": "^1.6.0"
|
|
147
162
|
},
|
|
148
163
|
"engines": {
|
|
149
164
|
"node": ">=16"
|
|
@@ -152,20 +167,61 @@
|
|
|
152
167
|
"access": "public",
|
|
153
168
|
"provenance": true
|
|
154
169
|
},
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
"sources": [
|
|
171
|
+
"src/config/best-practices.ts",
|
|
172
|
+
"src/config/errors.ts",
|
|
173
|
+
"src/config/es6.ts",
|
|
174
|
+
"src/config/plugins/antfu.ts",
|
|
175
|
+
"src/config/plugins/array-func.ts",
|
|
176
|
+
"src/config/plugins/ava.ts",
|
|
177
|
+
"src/config/plugins/babel.ts",
|
|
178
|
+
"src/config/plugins/compat.ts",
|
|
179
|
+
"src/config/plugins/cypress.ts",
|
|
180
|
+
"src/config/plugins/es.ts",
|
|
181
|
+
"src/config/plugins/eslint-comments.ts",
|
|
182
|
+
"src/config/plugins/html.ts",
|
|
183
|
+
"src/config/plugins/import.ts",
|
|
184
|
+
"src/config/plugins/jest-async.ts",
|
|
185
|
+
"src/config/plugins/jest-dom.ts",
|
|
186
|
+
"src/config/plugins/jest-formatting.ts",
|
|
187
|
+
"src/config/plugins/jest.ts",
|
|
188
|
+
"src/config/plugins/jsdoc.ts",
|
|
189
|
+
"src/config/plugins/jsonc.ts",
|
|
190
|
+
"src/config/plugins/jsx-a11y.ts",
|
|
191
|
+
"src/config/plugins/lodash-fp.ts",
|
|
192
|
+
"src/config/plugins/lodash.ts",
|
|
193
|
+
"src/config/plugins/markdown.ts",
|
|
194
|
+
"src/config/plugins/mdx.ts",
|
|
195
|
+
"src/config/plugins/no-extend-native.ts",
|
|
196
|
+
"src/config/plugins/no-loops.ts",
|
|
197
|
+
"src/config/plugins/no-secrets.ts",
|
|
198
|
+
"src/config/plugins/no-unsanitized.ts",
|
|
199
|
+
"src/config/plugins/node.ts",
|
|
200
|
+
"src/config/plugins/optimize-regex.ts",
|
|
201
|
+
"src/config/plugins/promise.ts",
|
|
202
|
+
"src/config/plugins/react-hooks.ts",
|
|
203
|
+
"src/config/plugins/react-redux.ts",
|
|
204
|
+
"src/config/plugins/react.ts",
|
|
205
|
+
"src/config/plugins/security.ts",
|
|
206
|
+
"src/config/plugins/simple-import-sort.ts",
|
|
207
|
+
"src/config/plugins/sonarjs.ts",
|
|
208
|
+
"src/config/plugins/sort-keys-fix.ts",
|
|
209
|
+
"src/config/plugins/tailwindcss.ts",
|
|
210
|
+
"src/config/plugins/testing-library.ts",
|
|
211
|
+
"src/config/plugins/toml.ts",
|
|
212
|
+
"src/config/plugins/tsdoc.ts",
|
|
213
|
+
"src/config/plugins/typescript-sort-keys.ts",
|
|
214
|
+
"src/config/plugins/typescript.ts",
|
|
215
|
+
"src/config/plugins/unicorn.ts",
|
|
216
|
+
"src/config/plugins/vitest.ts",
|
|
217
|
+
"src/config/plugins/yml.ts",
|
|
218
|
+
"src/config/plugins/you-dont-need-lodash-underscore.ts",
|
|
219
|
+
"src/config/plugins/you-dont-need-momentjs.ts",
|
|
220
|
+
"src/config/plugins/zod.ts",
|
|
221
|
+
"src/config/style.ts",
|
|
222
|
+
"src/config/variables.ts",
|
|
223
|
+
"src/index.ts",
|
|
224
|
+
"src/postinstall.ts",
|
|
225
|
+
"src/typescript-type-checking.ts"
|
|
226
|
+
]
|
|
171
227
|
}
|