@anolilab/eslint-config 7.1.0 → 7.2.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## @anolilab/eslint-config [7.2.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@7.1.0...@anolilab/eslint-config@7.2.0) (2023-06-25)
2
+
3
+
4
+ ### Features
5
+
6
+ * added support for etc and @tanstack/eslint-plugin-query ([0b686cc](https://github.com/anolilab/javascript-style-guide/commit/0b686ccb7a2123287fa9b9a0f989f7d35b3b86a3))
7
+
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * optimized seo of packages ([7331a1d](https://github.com/anolilab/javascript-style-guide/commit/7331a1da817ef2e31d4ec224aff096585a87dd04))
12
+
1
13
  ## @anolilab/eslint-config [7.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@7.0.1...@anolilab/eslint-config@7.1.0) (2023-06-24)
2
14
 
3
15
 
@@ -0,0 +1,5 @@
1
+ import { Linter } from 'eslint';
2
+
3
+ declare const config: Linter.Config;
4
+
5
+ export { config as default };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var chunkVJL7NPM4_js = require('../../chunk-VJL7NPM4.js');
4
+
5
+ var t=chunkVJL7NPM4_js.a("typescript",{plugins:["etc"],extends:["plugin:etc/recommended"]}),n=t;
6
+
7
+ module.exports = n;
8
+ //# sourceMappingURL=out.js.map
9
+ //# sourceMappingURL=etc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/plugins/etc.ts"],"names":["config","createConfig","etc_default"],"mappings":"4CAIA,IAAMA,EAAwBC,EAAa,aAAc,CACrD,QAAS,CAAC,KAAK,EACf,QAAS,CAAC,wBAAwB,CACtC,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfig } from \"../../utils/create-config\";\n\nconst config: Linter.Config = createConfig(\"typescript\", {\n plugins: [\"etc\"],\n extends: [\"plugin:etc/recommended\"],\n});\n\nexport default config;\n"]}
@@ -0,0 +1,7 @@
1
+ import { a } from '../../chunk-5IW32NSH.mjs';
2
+
3
+ var t=a("typescript",{plugins:["etc"],extends:["plugin:etc/recommended"]}),n=t;
4
+
5
+ export { n as default };
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=etc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/plugins/etc.ts"],"names":["config","createConfig","etc_default"],"mappings":"6CAIA,IAAMA,EAAwBC,EAAa,aAAc,CACrD,QAAS,CAAC,KAAK,EACf,QAAS,CAAC,wBAAwB,CACtC,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfig } from \"../../utils/create-config\";\n\nconst config: Linter.Config = createConfig(\"typescript\", {\n plugins: [\"etc\"],\n extends: [\"plugin:etc/recommended\"],\n});\n\nexport default config;\n"]}
@@ -0,0 +1,5 @@
1
+ import { Linter } from 'eslint';
2
+
3
+ declare const config: Linter.Config;
4
+
5
+ export { config as default };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var chunkVJL7NPM4_js = require('../../chunk-VJL7NPM4.js');
4
+
5
+ var t=chunkVJL7NPM4_js.a("all",{extends:["plugin:@tanstack/eslint-plugin-query/recommended"]}),i=t;
6
+
7
+ module.exports = i;
8
+ //# sourceMappingURL=out.js.map
9
+ //# sourceMappingURL=tanstack-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/plugins/tanstack-query.ts"],"names":["config","createConfig","tanstack_query_default"],"mappings":"4CAKA,IAAMA,EAAwBC,EAAa,MAAO,CAC9C,QAAS,CAAC,kDAAkD,CAChE,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfig } from \"../../utils/create-config\";\n\n// @see https://tanstack.com/query/v4/docs/react/eslint/eslint-plugin-query\nconst config: Linter.Config = createConfig(\"all\", {\n extends: [\"plugin:@tanstack/eslint-plugin-query/recommended\"],\n});\n\nexport default config;\n"]}
@@ -0,0 +1,7 @@
1
+ import { a } from '../../chunk-5IW32NSH.mjs';
2
+
3
+ var t=a("all",{extends:["plugin:@tanstack/eslint-plugin-query/recommended"]}),i=t;
4
+
5
+ export { i as default };
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=tanstack-query.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/plugins/tanstack-query.ts"],"names":["config","createConfig","tanstack_query_default"],"mappings":"6CAKA,IAAMA,EAAwBC,EAAa,MAAO,CAC9C,QAAS,CAAC,kDAAkD,CAChE,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfig } from \"../../utils/create-config\";\n\n// @see https://tanstack.com/query/v4/docs/react/eslint/eslint-plugin-query\nconst config: Linter.Config = createConfig(\"all\", {\n extends: [\"plugin:@tanstack/eslint-plugin-query/recommended\"],\n});\n\nexport default config;\n"]}
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
 
11
11
  var N__default = /*#__PURE__*/_interopDefault(N);
12
12
 
13
- var v=["best-practices","errors","style","es6","variables"],E=["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"],L=[{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"]},{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"]},{configName:"jsx-a11y",dependencies:["react","react-dom","eslint-plugin-jsx-a11y"]},{configName:"react-hooks",dependencies:["react","react-dom","eslint-plugin-react-hooks"]},{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:["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:"typescript-sort-keys",dependencies:["typescript","eslint-plugin-typescript-sort-keys"]},{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"]}],u=[...E],f={},y={};packageJsonUtils.pkg&&(y=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);L.forEach(e=>{let{dependencies:n,configName:o}=e;if(y?.plugin?.[o]!==!1){let r=[];n.forEach(s=>{(packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s))&&r.push(s);}),r.length===n.length?u.push(o):(f[o]={},n.forEach(s=>{f[o][s]=packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s);}));}});var b=v,l=u,h=f;var R={"unicorn/prefer-spread":{"5.0.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/text-decoder":{"11.0.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"}},j=R;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(chunkYMWD4DNM_js.b(`
13
+ var v=["best-practices","errors","style","es6","variables"],E=["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"],L=[{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"]},{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"]},{configName:"jsx-a11y",dependencies:["react","react-dom","eslint-plugin-jsx-a11y"]},{configName:"react-hooks",dependencies:["react","react-dom","eslint-plugin-react-hooks"]},{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:["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"]},{configName:"typescript-sort-keys",dependencies:["typescript","eslint-plugin-typescript-sort-keys"]},{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"]}],u=[...E],f={},y={};packageJsonUtils.pkg&&(y=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);L.forEach(e=>{let{dependencies:n,configName:o}=e;if(y?.plugin?.[o]!==!1){let r=[];n.forEach(s=>{(packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s))&&r.push(s);}),r.length===n.length?u.push(o):(f[o]={},n.forEach(s=>{f[o][s]=packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s);}));}});var b=v,l=u,h=f;var R={"unicorn/prefer-spread":{"5.0.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/text-decoder":{"11.0.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"}},j=R;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(chunkYMWD4DNM_js.b(`
14
14
  @anolilab/eslint-config loaded the following plugins:
15
15
  `),chunkYMWD4DNM_js.b(" @rushstack/eslint-plugin-security"),["compat","eslint-comments","i","promise","simple-import-sort","unicorn","no-secrets","sonarjs","json","jsonc","markdown","toml","yml","es",...l].forEach(n=>chunkYMWD4DNM_js.a(n)));let e=!1;Object.entries(h).forEach(([n,o])=>{Object.values(o).some(Boolean)&&(e=!0,chunkYMWD4DNM_js.b(`
16
16
  Your package.json container dependencies for the "${n}" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`),Object.entries(o).forEach(([s,_])=>{_||chunkYMWD4DNM_js.b(` ${s}`);}));}),e&&(chunkYMWD4DNM_js.b(`
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasAnyDep","packageIsTypeModule","pkg","join","semver","hasDependency","hasDevDependency","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","anolilabEslintConfig","plugin","dependencies","configName","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_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,MACvB,2BAA4B,MAC5B,kBAAmB,MACnB,0BAA2B,MAC3B,qBAAsB,MACtB,gCAAiC,MACjC,mCAAoC,MACpC,uBAAwB,MACxB,uBAAwB,MACxB,0BAA2B,MAC3B,+BAAgC,MAChC,qBAAsB,MACtB,gBAAiB,MACjB,cAAe,MACf,sBAAuB,MACvB,KAAM,MACN,eAAgB,MAChB,aAAc,MACd,sBAAuB,MACvB,8BAA+B,MAC/B,kBAAmB,MACnB,kBAAmB,MACnB,kBAAmB,MACnB,uBAAwB,MACxB,yBAA0B,MAC1B,uBAAwB,MACxB,cAAe,MACf,YAAa,MACb,aAAc,MACd,qBAAsB,KAC1B,GAGJ,IAAMK,EAAwB,CAQ1B,KAAM,GAEN,OAAQ,GAER,QAAS,CACL,GAAGd,EAAM,IAAKL,GAAWV,EAAK,UAAW,YAAYU,KAAUZ,EAAsB,IAAM,MAAM,CAAC,EAElG,GAAGkB,EAAY,IAAKN,GAAWV,EAAK,UAAW,oBAAoBU,KAAUZ,EAAsB,IAAM,MAAM,CAAC,CACpH,EACA,MAAO,CACH,GAAG0B,CACP,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,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,QACJ,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 { hasAnyDep, 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 \"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 = 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 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 (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\nlet configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nlet anolilabEslintConfig: { [key: string]: boolean | 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\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\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigPrettier) {\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\n configRules = {\n ...configRules,\n\n // The following rules can be used in some cases. See the README for more\n // information. (These are marked with `0` instead of `\"off\"` so that a\n // script can distinguish them.)\n curly: 0,\n \"lines-around-comment\": 0,\n \"max-len\": 0,\n \"no-confusing-arrow\": 0,\n \"no-mixed-operators\": 0,\n \"no-tabs\": 0,\n \"no-unexpected-multiline\": 0,\n quotes: 0,\n\n // The rest are rules that you never need to enable when using Prettier.\n \"array-bracket-newline\": \"off\",\n \"array-bracket-spacing\": \"off\",\n \"array-element-newline\": \"off\",\n \"arrow-parens\": \"off\",\n \"arrow-spacing\": \"off\",\n \"block-spacing\": \"off\",\n \"brace-style\": \"off\",\n \"comma-dangle\": \"off\",\n \"comma-spacing\": \"off\",\n \"comma-style\": \"off\",\n \"computed-property-spacing\": \"off\",\n \"dot-location\": \"off\",\n \"eol-last\": \"off\",\n \"func-call-spacing\": \"off\",\n \"function-call-argument-newline\": \"off\",\n \"function-paren-newline\": \"off\",\n \"generator-star-spacing\": \"off\",\n \"implicit-arrow-linebreak\": \"off\",\n indent: \"off\",\n \"jsx-quotes\": \"off\",\n \"key-spacing\": \"off\",\n \"keyword-spacing\": \"off\",\n \"linebreak-style\": \"off\",\n \"multiline-ternary\": \"off\",\n \"newline-per-chained-call\": \"off\",\n \"new-parens\": \"off\",\n \"no-extra-parens\": \"off\",\n \"no-extra-semi\": \"off\",\n \"no-floating-decimal\": \"off\",\n \"no-mixed-spaces-and-tabs\": \"off\",\n \"no-multi-spaces\": \"off\",\n \"no-multiple-empty-lines\": \"off\",\n \"no-trailing-spaces\": \"off\",\n \"no-whitespace-before-property\": \"off\",\n \"nonblock-statement-body-position\": \"off\",\n \"object-curly-newline\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"object-property-newline\": \"off\",\n \"one-var-declaration-per-line\": \"off\",\n \"operator-linebreak\": \"off\",\n \"padded-blocks\": \"off\",\n \"quote-props\": \"off\",\n \"rest-spread-spacing\": \"off\",\n semi: \"off\",\n \"semi-spacing\": \"off\",\n \"semi-style\": \"off\",\n \"space-before-blocks\": \"off\",\n \"space-before-function-paren\": \"off\",\n \"space-in-parens\": \"off\",\n \"space-infix-ops\": \"off\",\n \"space-unary-ops\": \"off\",\n \"switch-colon-spacing\": \"off\",\n \"template-curly-spacing\": \"off\",\n \"template-tag-spacing\": \"off\",\n \"unicode-bom\": \"off\",\n \"wrap-iife\": \"off\",\n \"wrap-regex\": \"off\",\n \"yield-star-spacing\": \"off\",\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.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 { hasDependency, hasDevDependency, pkg } 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 \"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];\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\", \"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: [\"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: \"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 configName: \"storybook\",\n dependencies: [\"storybook\", \"eslint-plugin-storybook\"],\n },\n {\n configName: \"playwright\",\n dependencies: [\"playwright\", \"eslint-plugin-playwright\"],\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 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 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"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasAnyDep","packageIsTypeModule","pkg","join","semver","hasDependency","hasDevDependency","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","anolilabEslintConfig","plugin","dependencies","configName","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"+CAYA,MAAO,mDAEP,OAAS,aAAAA,EAAW,uBAAAC,EAAqB,OAAAC,MAAW,+BAEpD,OAAS,QAAAC,MAAY,OACrB,OAAOC,MAAY,SCjBnB,OAAS,iBAAAC,EAAe,oBAAAC,EAAkB,OAAAJ,MAAW,+BAIrD,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,IACJ,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,aAAc,CAAC,mBAAmB,CACtC,EACA,CACI,WAAY,iBACZ,aAAc,CAAC,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ACP,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,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,QACJ,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 { hasAnyDep, 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 \"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 = 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 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 (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\nlet configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nlet anolilabEslintConfig: { [key: string]: boolean | 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\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\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigPrettier) {\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\n configRules = {\n ...configRules,\n\n // The following rules can be used in some cases. See the README for more\n // information. (These are marked with `0` instead of `\"off\"` so that a\n // script can distinguish them.)\n curly: 0,\n \"lines-around-comment\": 0,\n \"max-len\": 0,\n \"no-confusing-arrow\": 0,\n \"no-mixed-operators\": 0,\n \"no-tabs\": 0,\n \"no-unexpected-multiline\": 0,\n quotes: 0,\n\n // The rest are rules that you never need to enable when using Prettier.\n \"array-bracket-newline\": \"off\",\n \"array-bracket-spacing\": \"off\",\n \"array-element-newline\": \"off\",\n \"arrow-parens\": \"off\",\n \"arrow-spacing\": \"off\",\n \"block-spacing\": \"off\",\n \"brace-style\": \"off\",\n \"comma-dangle\": \"off\",\n \"comma-spacing\": \"off\",\n \"comma-style\": \"off\",\n \"computed-property-spacing\": \"off\",\n \"dot-location\": \"off\",\n \"eol-last\": \"off\",\n \"func-call-spacing\": \"off\",\n \"function-call-argument-newline\": \"off\",\n \"function-paren-newline\": \"off\",\n \"generator-star-spacing\": \"off\",\n \"implicit-arrow-linebreak\": \"off\",\n indent: \"off\",\n \"jsx-quotes\": \"off\",\n \"key-spacing\": \"off\",\n \"keyword-spacing\": \"off\",\n \"linebreak-style\": \"off\",\n \"multiline-ternary\": \"off\",\n \"newline-per-chained-call\": \"off\",\n \"new-parens\": \"off\",\n \"no-extra-parens\": \"off\",\n \"no-extra-semi\": \"off\",\n \"no-floating-decimal\": \"off\",\n \"no-mixed-spaces-and-tabs\": \"off\",\n \"no-multi-spaces\": \"off\",\n \"no-multiple-empty-lines\": \"off\",\n \"no-trailing-spaces\": \"off\",\n \"no-whitespace-before-property\": \"off\",\n \"nonblock-statement-body-position\": \"off\",\n \"object-curly-newline\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"object-property-newline\": \"off\",\n \"one-var-declaration-per-line\": \"off\",\n \"operator-linebreak\": \"off\",\n \"padded-blocks\": \"off\",\n \"quote-props\": \"off\",\n \"rest-spread-spacing\": \"off\",\n semi: \"off\",\n \"semi-spacing\": \"off\",\n \"semi-style\": \"off\",\n \"space-before-blocks\": \"off\",\n \"space-before-function-paren\": \"off\",\n \"space-in-parens\": \"off\",\n \"space-infix-ops\": \"off\",\n \"space-unary-ops\": \"off\",\n \"switch-colon-spacing\": \"off\",\n \"template-curly-spacing\": \"off\",\n \"template-tag-spacing\": \"off\",\n \"unicode-bom\": \"off\",\n \"wrap-iife\": \"off\",\n \"wrap-regex\": \"off\",\n \"yield-star-spacing\": \"off\",\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.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 { hasDependency, hasDevDependency, pkg } 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 \"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];\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\", \"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: [\"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\"],\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 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\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 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 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"]}
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import { pkg, hasDependency, hasDevDependency, hasAnyDep, packageIsTypeModule }
4
4
  import { join } from 'path';
5
5
  import N from 'semver';
6
6
 
7
- var v=["best-practices","errors","style","es6","variables"],E=["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"],L=[{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"]},{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"]},{configName:"jsx-a11y",dependencies:["react","react-dom","eslint-plugin-jsx-a11y"]},{configName:"react-hooks",dependencies:["react","react-dom","eslint-plugin-react-hooks"]},{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:["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:"typescript-sort-keys",dependencies:["typescript","eslint-plugin-typescript-sort-keys"]},{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"]}],u=[...E],f={},y={};pkg&&(y=pkg?.anolilab?.["eslint-config"]);L.forEach(e=>{let{dependencies:n,configName:o}=e;if(y?.plugin?.[o]!==!1){let r=[];n.forEach(s=>{(hasDependency(s)||hasDevDependency(s))&&r.push(s);}),r.length===n.length?u.push(o):(f[o]={},n.forEach(s=>{f[o][s]=hasDependency(s)||hasDevDependency(s);}));}});var b=v,l=u,h=f;var R={"unicorn/prefer-spread":{"5.0.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/text-decoder":{"11.0.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"}},j=R;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(b$1(`
7
+ var v=["best-practices","errors","style","es6","variables"],E=["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"],L=[{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"]},{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"]},{configName:"jsx-a11y",dependencies:["react","react-dom","eslint-plugin-jsx-a11y"]},{configName:"react-hooks",dependencies:["react","react-dom","eslint-plugin-react-hooks"]},{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:["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"]},{configName:"typescript-sort-keys",dependencies:["typescript","eslint-plugin-typescript-sort-keys"]},{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"]}],u=[...E],f={},y={};pkg&&(y=pkg?.anolilab?.["eslint-config"]);L.forEach(e=>{let{dependencies:n,configName:o}=e;if(y?.plugin?.[o]!==!1){let r=[];n.forEach(s=>{(hasDependency(s)||hasDevDependency(s))&&r.push(s);}),r.length===n.length?u.push(o):(f[o]={},n.forEach(s=>{f[o][s]=hasDependency(s)||hasDevDependency(s);}));}});var b=v,l=u,h=f;var R={"unicorn/prefer-spread":{"5.0.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/text-decoder":{"11.0.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"}},j=R;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(b$1(`
8
8
  @anolilab/eslint-config loaded the following plugins:
9
9
  `),b$1(" @rushstack/eslint-plugin-security"),["compat","eslint-comments","i","promise","simple-import-sort","unicorn","no-secrets","sonarjs","json","jsonc","markdown","toml","yml","es",...l].forEach(n=>a$1(n)));let e=!1;Object.entries(h).forEach(([n,o])=>{Object.values(o).some(Boolean)&&(e=!0,b$1(`
10
10
  Your package.json container dependencies for the "${n}" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`),Object.entries(o).forEach(([s,_])=>{_||b$1(` ${s}`);}));}),e&&(b$1(`
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasAnyDep","packageIsTypeModule","pkg","join","semver","hasDependency","hasDevDependency","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","anolilabEslintConfig","plugin","dependencies","configName","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"gDAYA,MAAO,mDAEP,OAAS,aAAAA,EAAW,uBAAAC,EAAqB,OAAAC,MAAW,+BAEpD,OAAS,Q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,uBAAwB,MACxB,uBAAwB,MACxB,0BAA2B,MAC3B,+BAAgC,MAChC,qBAAsB,MACtB,gBAAiB,MACjB,cAAe,MACf,sBAAuB,MACvB,KAAM,MACN,eAAgB,MAChB,aAAc,MACd,sBAAuB,MACvB,8BAA+B,MAC/B,kBAAmB,MACnB,kBAAmB,MACnB,kBAAmB,MACnB,uBAAwB,MACxB,yBAA0B,MAC1B,uBAAwB,MACxB,cAAe,MACf,YAAa,MACb,aAAc,MACd,qBAAsB,KAC1B,GAGJ,IAAMK,EAAwB,CAQ1B,KAAM,GAEN,OAAQ,GAER,QAAS,CACL,GAAGd,EAAM,IAAKL,GAAWV,EAAK,UAAW,YAAYU,KAAUZ,EAAsB,IAAM,MAAM,CAAC,EAElG,GAAGkB,EAAY,IAAKN,GAAWV,EAAK,UAAW,oBAAoBU,KAAUZ,EAAsB,IAAM,MAAM,CAAC,CACpH,EACA,MAAO,CACH,GAAG0B,CACP,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,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,QACJ,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 { hasAnyDep, 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 \"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 = 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 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 (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\nlet configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nlet anolilabEslintConfig: { [key: string]: boolean | 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\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\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigPrettier) {\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\n configRules = {\n ...configRules,\n\n // The following rules can be used in some cases. See the README for more\n // information. (These are marked with `0` instead of `\"off\"` so that a\n // script can distinguish them.)\n curly: 0,\n \"lines-around-comment\": 0,\n \"max-len\": 0,\n \"no-confusing-arrow\": 0,\n \"no-mixed-operators\": 0,\n \"no-tabs\": 0,\n \"no-unexpected-multiline\": 0,\n quotes: 0,\n\n // The rest are rules that you never need to enable when using Prettier.\n \"array-bracket-newline\": \"off\",\n \"array-bracket-spacing\": \"off\",\n \"array-element-newline\": \"off\",\n \"arrow-parens\": \"off\",\n \"arrow-spacing\": \"off\",\n \"block-spacing\": \"off\",\n \"brace-style\": \"off\",\n \"comma-dangle\": \"off\",\n \"comma-spacing\": \"off\",\n \"comma-style\": \"off\",\n \"computed-property-spacing\": \"off\",\n \"dot-location\": \"off\",\n \"eol-last\": \"off\",\n \"func-call-spacing\": \"off\",\n \"function-call-argument-newline\": \"off\",\n \"function-paren-newline\": \"off\",\n \"generator-star-spacing\": \"off\",\n \"implicit-arrow-linebreak\": \"off\",\n indent: \"off\",\n \"jsx-quotes\": \"off\",\n \"key-spacing\": \"off\",\n \"keyword-spacing\": \"off\",\n \"linebreak-style\": \"off\",\n \"multiline-ternary\": \"off\",\n \"newline-per-chained-call\": \"off\",\n \"new-parens\": \"off\",\n \"no-extra-parens\": \"off\",\n \"no-extra-semi\": \"off\",\n \"no-floating-decimal\": \"off\",\n \"no-mixed-spaces-and-tabs\": \"off\",\n \"no-multi-spaces\": \"off\",\n \"no-multiple-empty-lines\": \"off\",\n \"no-trailing-spaces\": \"off\",\n \"no-whitespace-before-property\": \"off\",\n \"nonblock-statement-body-position\": \"off\",\n \"object-curly-newline\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"object-property-newline\": \"off\",\n \"one-var-declaration-per-line\": \"off\",\n \"operator-linebreak\": \"off\",\n \"padded-blocks\": \"off\",\n \"quote-props\": \"off\",\n \"rest-spread-spacing\": \"off\",\n semi: \"off\",\n \"semi-spacing\": \"off\",\n \"semi-style\": \"off\",\n \"space-before-blocks\": \"off\",\n \"space-before-function-paren\": \"off\",\n \"space-in-parens\": \"off\",\n \"space-infix-ops\": \"off\",\n \"space-unary-ops\": \"off\",\n \"switch-colon-spacing\": \"off\",\n \"template-curly-spacing\": \"off\",\n \"template-tag-spacing\": \"off\",\n \"unicode-bom\": \"off\",\n \"wrap-iife\": \"off\",\n \"wrap-regex\": \"off\",\n \"yield-star-spacing\": \"off\",\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.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 { hasDependency, hasDevDependency, pkg } 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 \"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];\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\", \"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: [\"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: \"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 configName: \"storybook\",\n dependencies: [\"storybook\", \"eslint-plugin-storybook\"],\n },\n {\n configName: \"playwright\",\n dependencies: [\"playwright\", \"eslint-plugin-playwright\"],\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 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 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"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasAnyDep","packageIsTypeModule","pkg","join","semver","hasDependency","hasDevDependency","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","anolilabEslintConfig","plugin","dependencies","configName","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"gDAYA,MAAO,mDAEP,OAAS,aAAAA,EAAW,uBAAAC,EAAqB,OAAAC,MAAW,+BAEpD,OAAS,QAAAC,MAAY,OACrB,OAAOC,MAAY,SCjBnB,OAAS,iBAAAC,EAAe,oBAAAC,EAAkB,OAAAJ,MAAW,+BAIrD,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,IACJ,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,aAAc,CAAC,mBAAmB,CACtC,EACA,CACI,WAAY,iBACZ,aAAc,CAAC,8BAA8B,CACjD,EACA,CACI,WAAY,QACZ,aAAc,CAAC,QAAS,YAAa,qBAAqB,CAC9D,EACA,CACI,WAAY,cACZ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AO,CAEH,wBACA,wBAGA,6BACA,6BAGA,uBACJ,EACA,MAAO,CACH,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,CACJ,EACA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,QACJ,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 { hasAnyDep, 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 \"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 = 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 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 (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\nlet configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nlet anolilabEslintConfig: { [key: string]: boolean | 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\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\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigPrettier) {\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\n configRules = {\n ...configRules,\n\n // The following rules can be used in some cases. See the README for more\n // information. (These are marked with `0` instead of `\"off\"` so that a\n // script can distinguish them.)\n curly: 0,\n \"lines-around-comment\": 0,\n \"max-len\": 0,\n \"no-confusing-arrow\": 0,\n \"no-mixed-operators\": 0,\n \"no-tabs\": 0,\n \"no-unexpected-multiline\": 0,\n quotes: 0,\n\n // The rest are rules that you never need to enable when using Prettier.\n \"array-bracket-newline\": \"off\",\n \"array-bracket-spacing\": \"off\",\n \"array-element-newline\": \"off\",\n \"arrow-parens\": \"off\",\n \"arrow-spacing\": \"off\",\n \"block-spacing\": \"off\",\n \"brace-style\": \"off\",\n \"comma-dangle\": \"off\",\n \"comma-spacing\": \"off\",\n \"comma-style\": \"off\",\n \"computed-property-spacing\": \"off\",\n \"dot-location\": \"off\",\n \"eol-last\": \"off\",\n \"func-call-spacing\": \"off\",\n \"function-call-argument-newline\": \"off\",\n \"function-paren-newline\": \"off\",\n \"generator-star-spacing\": \"off\",\n \"implicit-arrow-linebreak\": \"off\",\n indent: \"off\",\n \"jsx-quotes\": \"off\",\n \"key-spacing\": \"off\",\n \"keyword-spacing\": \"off\",\n \"linebreak-style\": \"off\",\n \"multiline-ternary\": \"off\",\n \"newline-per-chained-call\": \"off\",\n \"new-parens\": \"off\",\n \"no-extra-parens\": \"off\",\n \"no-extra-semi\": \"off\",\n \"no-floating-decimal\": \"off\",\n \"no-mixed-spaces-and-tabs\": \"off\",\n \"no-multi-spaces\": \"off\",\n \"no-multiple-empty-lines\": \"off\",\n \"no-trailing-spaces\": \"off\",\n \"no-whitespace-before-property\": \"off\",\n \"nonblock-statement-body-position\": \"off\",\n \"object-curly-newline\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"object-property-newline\": \"off\",\n \"one-var-declaration-per-line\": \"off\",\n \"operator-linebreak\": \"off\",\n \"padded-blocks\": \"off\",\n \"quote-props\": \"off\",\n \"rest-spread-spacing\": \"off\",\n semi: \"off\",\n \"semi-spacing\": \"off\",\n \"semi-style\": \"off\",\n \"space-before-blocks\": \"off\",\n \"space-before-function-paren\": \"off\",\n \"space-in-parens\": \"off\",\n \"space-infix-ops\": \"off\",\n \"space-unary-ops\": \"off\",\n \"switch-colon-spacing\": \"off\",\n \"template-curly-spacing\": \"off\",\n \"template-tag-spacing\": \"off\",\n \"unicode-bom\": \"off\",\n \"wrap-iife\": \"off\",\n \"wrap-regex\": \"off\",\n \"yield-star-spacing\": \"off\",\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.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 { hasDependency, hasDevDependency, pkg } 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 \"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];\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\", \"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: [\"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\"],\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 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\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 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 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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "7.1.0",
3
+ "version": "7.2.0",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -8,13 +8,61 @@
8
8
  "styleguide",
9
9
  "eslint",
10
10
  "eslintconfig",
11
+ "eslint-config",
11
12
  "config",
12
13
  "javascript",
13
14
  "es2015",
14
15
  "es2016",
15
16
  "es2017",
16
17
  "es2018",
17
- "es2020"
18
+ "es2020",
19
+ "eslint-import-resolver-node",
20
+ "eslint-import-resolver-typescript",
21
+ "eslint-plugin-antfu",
22
+ "eslint-plugin-compat",
23
+ "eslint-plugin-es",
24
+ "eslint-plugin-eslint-comments",
25
+ "eslint-plugin-html",
26
+ "eslint-plugin-i",
27
+ "eslint-plugin-jsonc",
28
+ "eslint-plugin-markdown",
29
+ "eslint-plugin-mdx",
30
+ "eslint-plugin-no-loops",
31
+ "eslint-plugin-no-secrets",
32
+ "eslint-plugin-no-use-extend-native",
33
+ "eslint-plugin-promise",
34
+ "eslint-plugin-regexp",
35
+ "eslint-plugin-simple-import-sort",
36
+ "eslint-plugin-sonarjs",
37
+ "eslint-plugin-sort-keys-fix",
38
+ "eslint-plugin-toml",
39
+ "eslint-plugin-typescript-sort-keys",
40
+ "eslint-plugin-unicorn",
41
+ "eslint-plugin-yml",
42
+ "eslint-plugin-array-func",
43
+ "eslint-plugin-ava",
44
+ "eslint-plugin-babel",
45
+ "eslint-plugin-cypress",
46
+ "eslint-plugin-jest",
47
+ "eslint-plugin-jest-async",
48
+ "eslint-plugin-jest-dom",
49
+ "eslint-plugin-jest-formatting",
50
+ "eslint-plugin-playwright",
51
+ "eslint-plugin-jsdoc",
52
+ "eslint-plugin-jsx-a11y",
53
+ "eslint-plugin-n",
54
+ "eslint-plugin-no-unsanitized",
55
+ "eslint-plugin-prefer-object-spread",
56
+ "eslint-plugin-react",
57
+ "eslint-plugin-react-hooks",
58
+ "eslint-plugin-react-redux",
59
+ "eslint-plugin-storybook",
60
+ "eslint-plugin-tailwindcss",
61
+ "eslint-plugin-testing-library",
62
+ "eslint-plugin-tsdoc",
63
+ "eslint-plugin-etc",
64
+ "eslint-plugin-you-dont-need-lodash-underscore",
65
+ "eslint-plugin-you-dont-need-momentjs"
18
66
  ],
19
67
  "homepage": "https://anolilab.com/nodejs/packages/eslint-config",
20
68
  "repository": {
@@ -128,6 +176,7 @@
128
176
  "eslint-plugin-react-redux": "^4.0.0",
129
177
  "eslint-plugin-storybook": "^0.6.11",
130
178
  "eslint-plugin-tailwindcss": "^3.12.1",
179
+ "eslint-plugin-etc": "^2.0.3",
131
180
  "eslint-plugin-testing-library": "^5.11.0",
132
181
  "eslint-plugin-vitest": "^0.2.6",
133
182
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.12.0",
@@ -157,6 +206,7 @@
157
206
  "eslint-plugin-n": "^16.0.0",
158
207
  "eslint-plugin-no-unsanitized": "^4.0.2",
159
208
  "eslint-plugin-prefer-object-spread": "^1.2.1",
209
+ "@tanstack/eslint-plugin-query": "^4.29.9",
160
210
  "eslint-plugin-react": "^7.32.2",
161
211
  "eslint-plugin-react-hooks": "^4.6.0",
162
212
  "eslint-plugin-react-redux": "^4.0.0",
@@ -186,6 +236,7 @@
186
236
  "src/config/plugins/cypress.ts",
187
237
  "src/config/plugins/es.ts",
188
238
  "src/config/plugins/eslint-comments.ts",
239
+ "src/config/plugins/etc.ts",
189
240
  "src/config/plugins/html.ts",
190
241
  "src/config/plugins/import.ts",
191
242
  "src/config/plugins/jest-async.ts",
@@ -216,6 +267,7 @@
216
267
  "src/config/plugins/sort-keys-fix.ts",
217
268
  "src/config/plugins/storybook.ts",
218
269
  "src/config/plugins/tailwindcss.ts",
270
+ "src/config/plugins/tanstack-query.ts",
219
271
  "src/config/plugins/testing-library.ts",
220
272
  "src/config/plugins/toml.ts",
221
273
  "src/config/plugins/tsdoc.ts",