@anolilab/eslint-config 7.3.2 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +38 -27
  3. package/dist/chunk-3NVDJZNH.js +7 -0
  4. package/dist/chunk-3NVDJZNH.js.map +1 -0
  5. package/dist/{chunk-SV64EPVP.js → chunk-6COSQA7M.js} +2 -2
  6. package/dist/chunk-6COSQA7M.js.map +1 -0
  7. package/dist/chunk-H7VQP3ZD.js +8 -0
  8. package/dist/chunk-H7VQP3ZD.js.map +1 -0
  9. package/dist/chunk-KKHL2OSJ.js +7 -0
  10. package/dist/chunk-KKHL2OSJ.js.map +1 -0
  11. package/dist/chunk-MQFZFF2T.js +7 -0
  12. package/dist/chunk-MQFZFF2T.js.map +1 -0
  13. package/dist/chunk-PW4WCSOE.js +9 -0
  14. package/dist/chunk-PW4WCSOE.js.map +1 -0
  15. package/dist/{chunk-UYUXBUWX.js → chunk-SEYYGHPU.js} +1 -1
  16. package/dist/chunk-SEYYGHPU.js.map +1 -0
  17. package/dist/chunk-TWVXPNWB.js +9 -0
  18. package/dist/chunk-TWVXPNWB.js.map +1 -0
  19. package/dist/chunk-ZEBBNF2R.js +10 -0
  20. package/dist/chunk-ZEBBNF2R.js.map +1 -0
  21. package/dist/{chunk-UJAIXHCQ.js → chunk-ZFO6DTP4.js} +2 -2
  22. package/dist/{chunk-UJAIXHCQ.js.map → chunk-ZFO6DTP4.js.map} +1 -1
  23. package/dist/config/best-practices.js +3 -2
  24. package/dist/config/errors.js +3 -2
  25. package/dist/config/es6.js +3 -2
  26. package/dist/config/plugins/antfu.js +3 -2
  27. package/dist/config/plugins/antfu.js.map +1 -1
  28. package/dist/config/plugins/array-func.js +3 -2
  29. package/dist/config/plugins/array-func.js.map +1 -1
  30. package/dist/config/plugins/ava.js +3 -1
  31. package/dist/config/plugins/ava.js.map +1 -1
  32. package/dist/config/plugins/babel.js +7 -5
  33. package/dist/config/plugins/babel.js.map +1 -1
  34. package/dist/config/plugins/compat.js +2 -0
  35. package/dist/config/plugins/compat.js.map +1 -1
  36. package/dist/config/plugins/cypress.js +2 -0
  37. package/dist/config/plugins/cypress.js.map +1 -1
  38. package/dist/config/plugins/es.js +3 -2
  39. package/dist/config/plugins/es.js.map +1 -1
  40. package/dist/config/plugins/eslint-comments.js +3 -1
  41. package/dist/config/plugins/eslint-comments.js.map +1 -1
  42. package/dist/config/plugins/etc.js +3 -2
  43. package/dist/config/plugins/etc.js.map +1 -1
  44. package/dist/config/plugins/html.js +4 -3
  45. package/dist/config/plugins/html.js.map +1 -1
  46. package/dist/config/plugins/import.js +3 -2
  47. package/dist/config/plugins/jest-async.js +2 -0
  48. package/dist/config/plugins/jest-async.js.map +1 -1
  49. package/dist/config/plugins/jest-dom.js +2 -0
  50. package/dist/config/plugins/jest-dom.js.map +1 -1
  51. package/dist/config/plugins/jest-formatting.js +2 -0
  52. package/dist/config/plugins/jest-formatting.js.map +1 -1
  53. package/dist/config/plugins/jest.js +9 -2
  54. package/dist/config/plugins/jest.js.map +1 -1
  55. package/dist/config/plugins/jsdoc.js +4 -3
  56. package/dist/config/plugins/jsdoc.js.map +1 -1
  57. package/dist/config/plugins/jsonc.js +4 -3
  58. package/dist/config/plugins/jsonc.js.map +1 -1
  59. package/dist/config/plugins/jsx-a11y.js +2 -1
  60. package/dist/config/plugins/jsx-a11y.js.map +1 -1
  61. package/dist/config/plugins/lodash-fp.js +2 -0
  62. package/dist/config/plugins/lodash-fp.js.map +1 -1
  63. package/dist/config/plugins/lodash.js +3 -1
  64. package/dist/config/plugins/lodash.js.map +1 -1
  65. package/dist/config/plugins/markdown.js +3 -1
  66. package/dist/config/plugins/markdown.js.map +1 -1
  67. package/dist/config/plugins/mdx.js +4 -2
  68. package/dist/config/plugins/mdx.js.map +1 -1
  69. package/dist/config/plugins/no-extend-native.js +2 -0
  70. package/dist/config/plugins/no-extend-native.js.map +1 -1
  71. package/dist/config/plugins/no-loops.js +2 -0
  72. package/dist/config/plugins/no-loops.js.map +1 -1
  73. package/dist/config/plugins/no-secrets.js +3 -1
  74. package/dist/config/plugins/no-secrets.js.map +1 -1
  75. package/dist/config/plugins/no-unsanitized.js +2 -0
  76. package/dist/config/plugins/no-unsanitized.js.map +1 -1
  77. package/dist/config/plugins/node.js +2 -1
  78. package/dist/config/plugins/node.js.map +1 -1
  79. package/dist/config/plugins/perfectionist.js +14 -0
  80. package/dist/config/plugins/perfectionist.js.map +1 -0
  81. package/dist/config/plugins/playwright.js +2 -1
  82. package/dist/config/plugins/playwright.js.map +1 -1
  83. package/dist/config/plugins/promise.js +2 -0
  84. package/dist/config/plugins/promise.js.map +1 -1
  85. package/dist/config/plugins/react-hooks.js +5 -2
  86. package/dist/config/plugins/react-hooks.js.map +1 -1
  87. package/dist/config/plugins/react-redux.js +5 -2
  88. package/dist/config/plugins/react-redux.js.map +1 -1
  89. package/dist/config/plugins/react-usememo.js +10 -0
  90. package/dist/config/plugins/react-usememo.js.map +1 -0
  91. package/dist/config/plugins/react.js +10 -7
  92. package/dist/config/plugins/react.js.map +1 -1
  93. package/dist/config/plugins/regexp.js +3 -2
  94. package/dist/config/plugins/regexp.js.map +1 -1
  95. package/dist/config/plugins/security.js +4 -2
  96. package/dist/config/plugins/security.js.map +1 -1
  97. package/dist/config/plugins/simple-import-sort.js +3 -1
  98. package/dist/config/plugins/simple-import-sort.js.map +1 -1
  99. package/dist/config/plugins/sonarjs.js +3 -2
  100. package/dist/config/plugins/sonarjs.js.map +1 -1
  101. package/dist/config/plugins/storybook.js +3 -1
  102. package/dist/config/plugins/storybook.js.map +1 -1
  103. package/dist/config/plugins/tailwindcss.js +3 -2
  104. package/dist/config/plugins/tailwindcss.js.map +1 -1
  105. package/dist/config/plugins/tanstack-query.js +3 -2
  106. package/dist/config/plugins/tanstack-query.js.map +1 -1
  107. package/dist/config/plugins/testing-library.js +4 -3
  108. package/dist/config/plugins/testing-library.js.map +1 -1
  109. package/dist/config/plugins/toml.js +3 -1
  110. package/dist/config/plugins/toml.js.map +1 -1
  111. package/dist/config/plugins/tsdoc.js +3 -2
  112. package/dist/config/plugins/tsdoc.js.map +1 -1
  113. package/dist/config/plugins/typescript.js +9 -7
  114. package/dist/config/plugins/typescript.js.map +1 -1
  115. package/dist/config/plugins/unicorn.js +4 -3
  116. package/dist/config/plugins/unicorn.js.map +1 -1
  117. package/dist/config/plugins/vitest.js +3 -1
  118. package/dist/config/plugins/vitest.js.map +1 -1
  119. package/dist/config/plugins/yml.js +4 -3
  120. package/dist/config/plugins/yml.js.map +1 -1
  121. package/dist/config/plugins/you-dont-need-lodash-underscore.js +4 -1
  122. package/dist/config/plugins/you-dont-need-lodash-underscore.js.map +1 -1
  123. package/dist/config/plugins/you-dont-need-momentjs.js +5 -2
  124. package/dist/config/plugins/you-dont-need-momentjs.js.map +1 -1
  125. package/dist/config/plugins/zod.js +5 -2
  126. package/dist/config/plugins/zod.js.map +1 -1
  127. package/dist/config/style.js +4 -2
  128. package/dist/config/variables.js +3 -2
  129. package/dist/globals.d.ts +8 -0
  130. package/dist/globals.js +17 -0
  131. package/dist/globals.js.map +1 -0
  132. package/dist/index.js +13 -10
  133. package/dist/index.js.map +1 -1
  134. package/dist/postinstall.js +16 -9
  135. package/dist/postinstall.js.map +1 -1
  136. package/dist/typescript-type-checking.js +4 -3
  137. package/dist/typescript-type-checking.js.map +1 -1
  138. package/package.json +26 -19
  139. package/dist/chunk-5S3UQ6WJ.js +0 -7
  140. package/dist/chunk-5S3UQ6WJ.js.map +0 -1
  141. package/dist/chunk-GGJONTGP.js +0 -7
  142. package/dist/chunk-GGJONTGP.js.map +0 -1
  143. package/dist/chunk-NE6XHV4I.js +0 -9
  144. package/dist/chunk-NE6XHV4I.js.map +0 -1
  145. package/dist/chunk-SV64EPVP.js.map +0 -1
  146. package/dist/chunk-U5H7JNHH.js +0 -8
  147. package/dist/chunk-U5H7JNHH.js.map +0 -1
  148. package/dist/chunk-UYUXBUWX.js.map +0 -1
  149. package/dist/chunk-XJPLKY3T.js +0 -9
  150. package/dist/chunk-XJPLKY3T.js.map +0 -1
  151. package/dist/config/plugins/sort-keys-fix.js +0 -7
  152. package/dist/config/plugins/sort-keys-fix.js.map +0 -1
  153. package/dist/config/plugins/typescript-sort-keys.js +0 -7
  154. package/dist/config/plugins/typescript-sort-keys.js.map +0 -1
  155. /package/dist/config/plugins/{sort-keys-fix.d.ts → perfectionist.d.ts} +0 -0
  156. /package/dist/config/plugins/{typescript-sort-keys.d.ts → react-usememo.d.ts} +0 -0
package/dist/index.js CHANGED
@@ -1,24 +1,27 @@
1
1
  'use strict';
2
2
 
3
- var chunkUYUXBUWX_js = require('./chunk-UYUXBUWX.js');
3
+ var chunkSEYYGHPU_js = require('./chunk-SEYYGHPU.js');
4
4
  var chunkPTQ3FFI5_js = require('./chunk-PTQ3FFI5.js');
5
+ require('./chunk-3NVDJZNH.js');
5
6
  require('@rushstack/eslint-patch/modern-module-resolution');
6
7
  var packageJsonUtils = require('@anolilab/package-json-utils');
8
+ var b = require('globals');
7
9
  var path = require('path');
8
- var w = require('semver');
10
+ var N = require('semver');
9
11
 
10
12
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
13
 
12
- var w__default = /*#__PURE__*/_interopDefault(w);
14
+ var b__default = /*#__PURE__*/_interopDefault(b);
15
+ var N__default = /*#__PURE__*/_interopDefault(N);
13
16
 
14
- var x=["best-practices","errors","style","es6","variables"],_=["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"],v=[{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:["cypress","eslint-plugin-cypress"]},{configName:"jest",dependencies:["jest","eslint-plugin-jest"]},{configName:"jest-dom",dependencies:["jest","@testing-library/jest-dom","eslint-plugin-jest-dom"]},{configName:"jest-async",dependencies:["jest","eslint-plugin-jest-async"]},{configName:"jest-formatting",dependencies:["jest","eslint-plugin-jest-formatting"]},{configName:"tailwindcss",dependencies:["tailwindcss"]},{configName:"testing-library",dependencies:["@testing-library/dom","eslint-plugin-testing-library"]},{configName:"testing-library",dependencies:["react","@testing-library/react","eslint-plugin-testing-library"]},{configName:"typescript",dependencies:["typescript"]},{configName:"etc",dependencies:["typescript","eslint-plugin-etc"]},{configName:"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"]}],m=[..._],f={};v.forEach(e=>{let{dependencies:n,configName:o}=e;if(chunkPTQ3FFI5_js.a?.plugin?.[o]!==!1){let r=[];n.forEach(s=>{(packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s))&&r.push(s);}),r.length===n.length?m.push(o):(f[o]={},n.forEach(s=>{f[o][s]=packageJsonUtils.hasDependency(s)||packageJsonUtils.hasDevDependency(s);}));}});var u=x,l=m,y=f;var E={"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"}},b=E;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(chunkUYUXBUWX_js.b(`
17
+ var _=["best-practices","errors","style","es6","variables"],w=["compat","eslint-comments","import","promise","simple-import-sort","no-extend-native","node","no-secrets","sonarjs","security","regexp","jsonc","markdown","toml","yml","html","antfu","unicorn","es","perfectionist"],v=[{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:["react","react-dom","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:"react-usememo",dependencies:["react","react-dom","@arthurgeron/eslint-plugin-react-usememo"]},{configName:"you-dont-need-momentjs",dependencies:["moment","eslint-plugin-you-dont-need-momentjs"]},{configName:"you-dont-need-momentjs",dependencies:["moment-timezone","eslint-plugin-you-dont-need-momentjs"]},{configName:"tailwindcss",dependencies:["eslint-plugin-tailwindcss"]},{configName:"cypress",dependencies:["cypress","eslint-plugin-cypress"]},{configName:"jest",dependencies:["jest","eslint-plugin-jest"]},{configName:"jest-dom",dependencies:["jest","@testing-library/jest-dom","eslint-plugin-jest-dom"]},{configName:"jest-async",dependencies:["jest","eslint-plugin-jest-async"]},{configName:"jest-formatting",dependencies:["jest","eslint-plugin-jest-formatting"]},{configName:"tailwindcss",dependencies:["tailwindcss"]},{configName:"testing-library",dependencies:["@testing-library/dom","eslint-plugin-testing-library"]},{configName:"testing-library",dependencies:["react","@testing-library/react","eslint-plugin-testing-library"]},{configName:"typescript",dependencies:["typescript"]},{configName:"etc",dependencies:["typescript","eslint-plugin-etc"]},{configName:"vitest",dependencies:["vitest","eslint-plugin-vitest"]},{configName:"zod",dependencies:["zod","eslint-plugin-zod"]},{configName:"ava",dependencies:["ava","eslint-plugin-ava"]},{configName:"storybook",dependencies:["storybook","eslint-plugin-storybook"]},{configName:"playwright",dependencies:["playwright","eslint-plugin-playwright"]},{configName:"tanstack-query",dependencies:["@tanstack/react-query","@tanstack/eslint-plugin-query"]}],g=[...w],a={};v.forEach(n=>{let{configName:e,dependencies:s}=n;if(chunkPTQ3FFI5_js.a?.plugin?.[e]!==!1){let r=[];s.forEach(i=>{(packageJsonUtils.hasDependency(i)||packageJsonUtils.hasDevDependency(i))&&r.push(i);}),r.length===s.length?g.push(e):(a[e]={},s.forEach(i=>{a[e][i]=packageJsonUtils.hasDependency(i)||packageJsonUtils.hasDevDependency(i);}));}});var m=_,l=g,u=a;var E={"n/prefer-global/text-decoder":{"11.0.0":"off"},"n/prefer-global/text-encoder":{"11.0.0":"off"},"n/prefer-global/url":{"10.0.0":"off"},"n/prefer-global/url-search-params":{"10.0.0":"off"},"n/prefer-promises/dns":{"11.14.0":"off"},"n/prefer-promises/fs":{"11.14.0":"off"},"no-useless-catch":{"10.0.0":"off"},"prefer-destructuring":{"6.0.0":"off"},"prefer-named-capture-group":{"10.0.0":"off"},"prefer-object-spread":{"8.3.0":"off"},"prefer-rest-params":{"6.0.0":"off"},"promise/prefer-await-to-then":{"7.6.0":"off"},"unicorn/no-new-buffer":{"5.10.0":"off"},"unicorn/prefer-flat-map":{"11.0.0":"off"},"unicorn/prefer-spread":{"5.0.0":"off"}},y=E;if(!global.hasAnolilabEsLintConfigLoaded){process.env.DEBUG&&(chunkSEYYGHPU_js.b(`
15
18
  @anolilab/eslint-config loaded the following plugins:
16
- `),chunkUYUXBUWX_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=>chunkUYUXBUWX_js.a(n)));let e=!1;Object.entries(y).forEach(([n,o])=>{Object.values(o).some(Boolean)&&(e=!0,chunkUYUXBUWX_js.b(`
17
- 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,N])=>{N||chunkUYUXBUWX_js.b(` ${s}`);}));}),e&&(chunkUYUXBUWX_js.b(`
18
- To disable this message, add the following to your package.json:`),chunkUYUXBUWX_js.b(` "anolilab": { "eslint-config": { plugin: { "plugin-name": false } } }
19
- `)),chunkUYUXBUWX_js.b('To disable all logging, add the following to your eslint command call "NO_LOGS=true eslint ..."'),global.hasAnolilabEsLintConfigLoaded=!0;}var a={},c;packageJsonUtils.pkg?.engines?.node&&(c=packageJsonUtils.pkg.engines.node);Object.entries(b).forEach(([e,n])=>{Object.keys(n).sort(w__default.default.rcompare).forEach(o=>{c&&w__default.default.intersects(c,`<${o}`)&&(a[e]=n[o]);});});(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.hasAnolilabEsLintConfigPrettier||(global.hasAnolilabEsLintConfigPrettier=!0,chunkPTQ3FFI5_js.a?.info_on_disabling_prettier_conflict_rule!==!1&&chunkUYUXBUWX_js.b(`
20
- Found prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier`)),a={...a,curly:0,"lines-around-comment":0,"max-len":0,"no-confusing-arrow":0,"no-mixed-operators":0,"no-tabs":0,"no-unexpected-multiline":0,quotes:0,"array-bracket-newline":"off","array-bracket-spacing":"off","array-element-newline":"off","arrow-parens":"off","arrow-spacing":"off","block-spacing":"off","brace-style":"off","comma-dangle":"off","comma-spacing":"off","comma-style":"off","computed-property-spacing":"off","dot-location":"off","eol-last":"off","func-call-spacing":"off","function-call-argument-newline":"off","function-paren-newline":"off","generator-star-spacing":"off","implicit-arrow-linebreak":"off",indent:"off","jsx-quotes":"off","key-spacing":"off","keyword-spacing":"off","linebreak-style":"off","multiline-ternary":"off","newline-per-chained-call":"off","new-parens":"off","no-extra-parens":"off","no-extra-semi":"off","no-floating-decimal":"off","no-mixed-spaces-and-tabs":"off","no-multi-spaces":"off","no-multiple-empty-lines":"off","no-trailing-spaces":"off","no-whitespace-before-property":"off","nonblock-statement-body-position":"off","object-curly-newline":"off","object-curly-spacing":"off","object-property-newline":"off","one-var-declaration-per-line":"off","operator-linebreak":"off","padded-blocks":"off","quote-props":"off","rest-spread-spacing":"off",semi:"off","semi-spacing":"off","semi-style":"off","space-before-blocks":"off","space-before-function-paren":"off","space-in-parens":"off","space-infix-ops":"off","space-unary-ops":"off","switch-colon-spacing":"off","template-curly-spacing":"off","template-tag-spacing":"off","unicode-bom":"off","wrap-iife":"off","wrap-regex":"off","yield-star-spacing":"off"});var P={root:!0,parser:"",extends:[...u.map(e=>path.join(__dirname,`./config/${e}.${packageJsonUtils.packageIsTypeModule?"m":""}js`)),...l.map(e=>path.join(__dirname,`./config/plugins/${e}.${packageJsonUtils.packageIsTypeModule?"m":""}js`))],rules:{...a},overrides:[{files:["**/migrations/*.{js,ts}"],rules:{"filenames/match-regex":"off"}},{files:["**/*.spec.{js,ts,tsx}","**/*.test.{js,ts,tsx}","**/__mocks__/*.{js,ts,tsx}","**/__tests__/*.{js,ts,tsx}","**/test/*.{js,ts,tsx}"],rules:{"no-magic-numbers":"off","sonarjs/no-duplicate-string":"off"}}],ignorePatterns:["!.*",".git/","node_modules/","bower_components/","jspm_packages/",".npm/","lib-cov/","coverage/",".nyc_output/",".cache/","build/","dist/","tmp/","**/*.min.*","*.d.ts","pnpm-lock.yaml"]},M=P;
19
+ `),chunkSEYYGHPU_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(e=>chunkSEYYGHPU_js.a(e)));let n=!1;Object.entries(u).forEach(([e,s])=>{Object.values(s).some(Boolean)&&(n=!0,chunkSEYYGHPU_js.b(`
20
+ Your package.json container dependencies for the "${e}" eslint-plugin, please add the following dependencies with your chosen package manager to enable this plugin:`),Object.entries(s).forEach(([i,x])=>{x||chunkSEYYGHPU_js.b(` ${i}`);}));}),n&&(chunkSEYYGHPU_js.b(`
21
+ To disable this message, add the following to your package.json:`),chunkSEYYGHPU_js.b(` "anolilab": { "eslint-config": { plugin: { "plugin-name": false } } }
22
+ `)),chunkSEYYGHPU_js.b('To disable all logging, add the following to your eslint command call "NO_LOGS=true eslint ..."'),global.hasAnolilabEsLintConfigLoaded=!0;}var k={},c;packageJsonUtils.pkg?.engines?.node&&(c=packageJsonUtils.pkg.engines.node);Object.entries(y).forEach(([n,e])=>{Object.keys(e).sort(N__default.default.rcompare).forEach(s=>{c&&N__default.default.intersects(c,`<${s}`)&&(k[n]=e[s]);});});!global.hasAnolilabEsLintConfigPrettier&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.hasAnolilabEsLintConfigPrettier=!0,chunkPTQ3FFI5_js.a?.info_on_disabling_prettier_conflict_rule!==!1&&chunkSEYYGHPU_js.b(`
23
+ Found prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier`));var P={extends:[...m.map(n=>path.join(__dirname,`./config/${n}.js`)),...l.map(n=>path.join(__dirname,`./config/plugins/${n}.js`))],globals:{...b__default.default.browser,...b__default.default.nodeBuiltin},ignorePatterns:["!.*",".git/","node_modules/","bower_components/","jspm_packages/",".npm/","lib-cov/","coverage/",".nyc_output/",".cache/","build/","dist/","tmp/","**/*.min.*","*.d.ts","pnpm-lock.yaml"],overrides:[{files:["**/migrations/*.{js,ts}"],rules:{"filenames/match-regex":"off"}},{files:["**/*.spec.{js,ts,tsx}","**/*.test.{js,ts,tsx}","**/__mocks__/*.{js,ts,tsx}","**/__tests__/*.{js,ts,tsx}","**/test/*.{js,ts,tsx}"],rules:{"no-magic-numbers":"off","sonarjs/no-duplicate-string":"off"}}],parser:"",root:!0,rules:{...k}},Y=P;
21
24
 
22
- module.exports = M;
25
+ module.exports = Y;
23
26
  //# sourceMappingURL=out.js.map
24
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/config.ts","../src/engine-node-overwrite.ts"],"names":["hasDependency","hasDevDependency","packageIsTypeModule","pkg","join","semver","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","plugin","dependencies","configName","eslint_config_default","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"uFAYA,MAAO,mDAEP,OACI,iBA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B,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,IAAKN,GAAWP,EAAK,UAAW,YAAYO,CAAM,IAAIT,EAAsB,IAAM,EAAE,IAAI,CAAC,EAElG,GAAGgB,EAAY,IAAKP,GAAWP,EAAK,UAAW,oBAAoBO,CAAM,IAAIT,EAAsB,IAAM,EAAE,IAAI,CAAC,CACpH,EACA,MAAO,CACH,GAAGwB,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,SAEA,gBACJ,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 {\n hasDependency, hasDevDependency, packageIsTypeModule, pkg,\n} 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 anolilabEslintConfig from \"./utils/eslint-config\";\nimport { consoleLog, consolePlugin } from \"./utils/loggers\";\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigLoaded) {\n if (process.env[\"DEBUG\"]) {\n consoleLog(\"\\n@anolilab/eslint-config loaded the following plugins:\\n\");\n\n consoleLog(\" @rushstack/eslint-plugin-security\");\n [\n \"compat\",\n \"eslint-comments\",\n \"i\",\n \"promise\",\n \"simple-import-sort\",\n \"unicorn\",\n \"no-secrets\",\n \"sonarjs\",\n \"json\",\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"es\",\n ...pluginRules,\n ].forEach((plugin) => consolePlugin(plugin));\n }\n\n let hasLogged = 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\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 (hasDependency(\"prettier\") || hasDevDependency(\"prettier\")) {\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 \"pnpm-lock.yaml\",\n ],\n};\n\nexport default config;\n","import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\n\nimport type { PackageRules } from \"./types\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\n\nconst baseConfig = [\"best-practices\", \"errors\", \"style\", \"es6\", \"variables\"];\n\nconst internalPluginConfig = [\n \"compat\",\n \"eslint-comments\",\n \"import\",\n \"promise\",\n \"simple-import-sort\",\n \"no-extend-native\",\n \"node\",\n // Security Rules\n \"no-secrets\",\n \"sonarjs\",\n \"security\",\n \"regexp\",\n // file rules\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"html\",\n\n // custom rules\n \"antfu\",\n \"unicorn\",\n \"es\",\n];\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: [\"cypress\", \"eslint-plugin-cypress\"],\n },\n {\n configName: \"jest\",\n dependencies: [\"jest\", \"eslint-plugin-jest\"],\n },\n {\n configName: \"jest-dom\",\n dependencies: [\"jest\", \"@testing-library/jest-dom\", \"eslint-plugin-jest-dom\"],\n },\n {\n configName: \"jest-async\",\n dependencies: [\"jest\", \"eslint-plugin-jest-async\"],\n },\n {\n configName: \"jest-formatting\",\n dependencies: [\"jest\", \"eslint-plugin-jest-formatting\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"tailwindcss\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"@testing-library/dom\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"react\", \"@testing-library/react\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"typescript\",\n dependencies: [\"typescript\"],\n },\n {\n configName: \"etc\",\n dependencies: [\"typescript\", \"eslint-plugin-etc\"],\n },\n {\n configName: \"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\npluginConfig.forEach((plugin) => {\n const { dependencies, configName } = plugin;\n\n if ((anolilabEslintConfig as unknown as { [key: string]: { [key: string]: false | undefined } })?.[\"plugin\"]?.[configName] !== false) {\n const foundDependencies = [];\n\n dependencies.forEach((dependency) => {\n if (hasDependency(dependency) || hasDevDependency(dependency)) {\n foundDependencies.push(dependency);\n }\n });\n\n if (foundDependencies.length === dependencies.length) {\n loadedPlugins.push(configName);\n } else {\n 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":["hasDependency","hasDevDependency","pkg","globals","join","semver","baseConfig","internalPluginConfig","pluginConfig","loadedPlugins","possiblePlugins","plugin","configName","dependencies","eslint_config_default","foundDependencies","dependency","rules","pluginRules","possiblePluginRules","engineRules","engine_node_overwrite_default","consoleLog","consolePlugin","hasLogged","installed","configRules","nodeVersion","rule","ruleConfig","minVersion","config","src_default"],"mappings":"mHAYA,MAAO,mDAEP,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,OAAAC,MAAW,+BAErD,OAAOC,MAAa,UACpB,OAAS,QAAAC,MAAY,OACrB,OAAOC,MAAY,SClBnB,OAAS,iBAAAL,EAAe,oBAAAC,MAAwB,+BAKhD,IAAMK,EAAa,CAAC,iBAAkB,SAAU,QAAS,MAAO,WAAW,EAErEC,EAAuB,CACzB,SACA,kBACA,SACA,UACA,qBACA,mBACA,OAEA,aACA,UACA,WACA,SAEA,QACA,WACA,OACA,MACA,OAGA,QACA,UACA,KACA,eACJ,EAEMC,EAA6B,CAC/B,CACI,WAAY,aACZ,aAAc,CAAC,0BAA0B,CAC7C,EACA,CACI,WAAY,QACZ,aAAc,CAAC,qBAAqB,CACxC,EACA,CACI,WAAY,QACZ,aAAc,CAAC,sBAAuB,YAAY,CACtD,EACA,CACI,WAAY,SACZ,aAAc,CAAC,SAAU,sBAAsB,CACnD,EACA,CACI,WAAY,YACZ,aAAc,CAAC,SAAU,yBAAyB,CACtD,EACA,CACI,WAAY,kCACZ,aAAc,CAAC,SAAU,+CAA+C,CAC5E,EACA,CACI,WAAY,MACZ,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,aAAc,CAAC,QAAS,YAA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,CACnF,EACA,QAAS,CACL,GAAGR,EAAQ,QACX,GAAGA,EAAQ,WACf,EAEA,eAAgB,CACZ,MAEA,QACA,gBACA,oBACA,iBACA,QAEA,WACA,YACA,eACA,UAEA,SACA,QACA,OAEA,aAKA,SAEA,gBACJ,EACA,UAAW,CACP,CACI,MAAO,CAAC,yBAAyB,EACjC,MAAO,CACH,wBAAyB,KAC7B,CACJ,EACA,CACI,MAAO,CAEH,wBACA,wBAGA,6BACA,6BAGA,uBACJ,EACA,MAAO,CACH,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,CACJ,EAEA,OAAQ,GAER,KAAM,GACN,MAAO,CACH,GAAGuB,CACP,CACJ,EAEOM,EAAQD","sourcesContent":["/**\n * rushstack eslint-patch is used to include plugins as dev\n * dependencies instead of imposing them as peer dependencies\n *\n * {@link https://www.npmjs.com/package/@rushstack/eslint-patch}\n * {@link https://stackoverflow.com/a/74478635/1392749}\n * {@link https://github.com/eslint/eslint/issues/3458}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-1/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-2/}\n * {@link https://eslint.org/blog/2022/08/new-config-system-part-3/}\n * {@link https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new}\n */\nimport \"@rushstack/eslint-patch/modern-module-resolution\";\n\nimport { hasDependency, hasDevDependency, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport globals from \"globals\";\nimport { join } from \"node:path\";\nimport semver from \"semver\";\n\nimport { pluginRules, possiblePluginRules, rules } from \"./config\";\nimport engineRules from \"./engine-node-overwrite\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\nimport { consoleLog, consolePlugin } from \"./utils/loggers\";\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigLoaded) {\n if (process.env[\"DEBUG\"]) {\n consoleLog(\"\\n@anolilab/eslint-config loaded the following plugins:\\n\");\n\n consoleLog(\" @rushstack/eslint-plugin-security\");\n [\n \"compat\",\n \"eslint-comments\",\n \"i\",\n \"promise\",\n \"simple-import-sort\",\n \"unicorn\",\n \"no-secrets\",\n \"sonarjs\",\n \"json\",\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"es\",\n ...pluginRules,\n ].forEach((plugin) => consolePlugin(plugin));\n }\n\n let hasLogged = 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\nconst configRules: Linter.RulesRecord = {};\nlet nodeVersion: string | undefined;\n\nif (pkg?.engines?.[\"node\"]) {\n nodeVersion = pkg.engines[\"node\"];\n}\n\nObject.entries(engineRules).forEach(([rule, ruleConfig]) => {\n Object.keys(ruleConfig)\n .sort(semver.rcompare)\n .forEach((minVersion) => {\n if (nodeVersion && semver.intersects(nodeVersion, `<${minVersion}`)) {\n // eslint-disable-next-line security/detect-object-injection\n configRules[rule] = ruleConfig[minVersion as keyof typeof ruleConfig] as Linter.RuleEntry;\n }\n });\n});\n\n// Workaround VS Code trying to run this file twice!\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n\n if (anolilabEslintConfig?.[\"info_on_disabling_prettier_conflict_rule\"] !== false) {\n consoleLog(\"\\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier\");\n }\n}\n\nconst config: Linter.Config = {\n // After an .eslintrc.js file is loaded, ESLint will normally continue visiting all parent folders\n // to look for other .eslintrc.js files, and also consult a personal file ~/.eslintrc.js. If any files\n // are found, their options will be merged. This is difficult for humans to understand, and it will cause\n // nondeterministic behavior if files are loaded from outside the Git working folder.\n //\n // Setting root=true causes ESLint to stop looking for other config files after the first .eslintrc.js\n extends: [\n ...rules.map((plugin) => join(__dirname, `./config/${plugin}.js`)),\n\n ...pluginRules.map((plugin) => join(__dirname, `./config/plugins/${plugin}.js`)),\n ],\n globals: {\n ...globals.browser,\n ...globals.nodeBuiltin,\n },\n\n ignorePatterns: [\n \"!.*\",\n\n \".git/\",\n \"node_modules/\",\n \"bower_components/\",\n \"jspm_packages/\",\n \".npm/\",\n\n \"lib-cov/\",\n \"coverage/\",\n \".nyc_output/\",\n \".cache/\",\n\n \"build/\",\n \"dist/\",\n \"tmp/\",\n\n \"**/*.min.*\",\n\n // Manually authored .d.ts files are generally used to describe external APIs that are not expected\n // to follow our coding conventions. Linting those files tends to produce a lot of spurious suppressions,\n // so we simply ignore them.\n \"*.d.ts\",\n\n \"pnpm-lock.yaml\",\n ],\n overrides: [\n {\n files: [\"**/migrations/*.{js,ts}\"],\n rules: {\n \"filenames/match-regex\": \"off\",\n },\n },\n {\n files: [\n // Test files\n \"**/*.spec.{js,ts,tsx}\",\n \"**/*.test.{js,ts,tsx}\",\n\n // Facebook convention\n \"**/__mocks__/*.{js,ts,tsx}\",\n \"**/__tests__/*.{js,ts,tsx}\",\n\n // Microsoft convention\n \"**/test/*.{js,ts,tsx}\",\n ],\n rules: {\n \"no-magic-numbers\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n ],\n // Disable the parser by default\n parser: \"\",\n // is loaded.\n root: true,\n rules: {\n ...configRules,\n },\n};\n\nexport default config;\n","import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\n\nimport type { PackageRules } from \"./types\";\nimport anolilabEslintConfig from \"./utils/eslint-config\";\n\nconst baseConfig = [\"best-practices\", \"errors\", \"style\", \"es6\", \"variables\"];\n\nconst internalPluginConfig = [\n \"compat\",\n \"eslint-comments\",\n \"import\",\n \"promise\",\n \"simple-import-sort\",\n \"no-extend-native\",\n \"node\",\n // Security Rules\n \"no-secrets\",\n \"sonarjs\",\n \"security\",\n \"regexp\",\n // file rules\n \"jsonc\",\n \"markdown\",\n \"toml\",\n \"yml\",\n \"html\",\n\n // custom rules\n \"antfu\",\n \"unicorn\",\n \"es\",\n \"perfectionist\",\n];\n\nconst pluginConfig: PackageRules = [\n {\n configName: \"array-func\",\n dependencies: [\"eslint-plugin-array-func\"],\n },\n {\n configName: \"jsdoc\",\n dependencies: [\"eslint-plugin-jsdoc\"],\n },\n {\n configName: \"tsdoc\",\n dependencies: [\"eslint-plugin-tsdoc\", \"typescript\"],\n },\n {\n configName: \"lodash\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash\"],\n },\n {\n configName: \"lodash-fp\",\n dependencies: [\"lodash\", \"eslint-plugin-lodash-fp\"],\n },\n {\n configName: \"you-dont-need-lodash-underscore\",\n dependencies: [\"lodash\", \"eslint-plugin-you-dont-need-lodash-underscore\"],\n },\n {\n configName: \"mdx\",\n dependencies: [\"eslint-plugin-mdx\"],\n },\n {\n configName: \"no-unsanitized\",\n dependencies: [\"eslint-plugin-no-unsanitized\"],\n },\n {\n configName: \"react\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react\"],\n },\n {\n configName: \"react-redux\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react-redux\"],\n },\n {\n configName: \"jsx-a11y\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-jsx-a11y\"],\n },\n {\n configName: \"react-hooks\",\n dependencies: [\"react\", \"react-dom\", \"eslint-plugin-react-hooks\"],\n },\n {\n configName: \"react-usememo\",\n dependencies: [\"react\", \"react-dom\", \"@arthurgeron/eslint-plugin-react-usememo\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"you-dont-need-momentjs\",\n dependencies: [\"moment-timezone\", \"eslint-plugin-you-dont-need-momentjs\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"eslint-plugin-tailwindcss\"],\n },\n {\n configName: \"cypress\",\n dependencies: [\"cypress\", \"eslint-plugin-cypress\"],\n },\n {\n configName: \"jest\",\n dependencies: [\"jest\", \"eslint-plugin-jest\"],\n },\n {\n configName: \"jest-dom\",\n dependencies: [\"jest\", \"@testing-library/jest-dom\", \"eslint-plugin-jest-dom\"],\n },\n {\n configName: \"jest-async\",\n dependencies: [\"jest\", \"eslint-plugin-jest-async\"],\n },\n {\n configName: \"jest-formatting\",\n dependencies: [\"jest\", \"eslint-plugin-jest-formatting\"],\n },\n {\n configName: \"tailwindcss\",\n dependencies: [\"tailwindcss\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"@testing-library/dom\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"testing-library\",\n dependencies: [\"react\", \"@testing-library/react\", \"eslint-plugin-testing-library\"],\n },\n {\n configName: \"typescript\",\n dependencies: [\"typescript\"],\n },\n {\n configName: \"etc\",\n dependencies: [\"typescript\", \"eslint-plugin-etc\"],\n },\n {\n configName: \"vitest\",\n dependencies: [\"vitest\", \"eslint-plugin-vitest\"],\n },\n {\n configName: \"zod\",\n dependencies: [\"zod\", \"eslint-plugin-zod\"],\n },\n {\n configName: \"ava\",\n dependencies: [\"ava\", \"eslint-plugin-ava\"],\n },\n {\n configName: \"storybook\",\n dependencies: [\"storybook\", \"eslint-plugin-storybook\"],\n },\n {\n configName: \"playwright\",\n dependencies: [\"playwright\", \"eslint-plugin-playwright\"],\n },\n {\n configName: \"tanstack-query\",\n dependencies: [\"@tanstack/react-query\", \"@tanstack/eslint-plugin-query\"],\n },\n];\n\nconst loadedPlugins: string[] = [...internalPluginConfig];\nconst possiblePlugins: { [rule: string]: { [packageName: string]: boolean } } = {};\n\npluginConfig.forEach((plugin) => {\n const { configName, dependencies } = plugin;\n\n // eslint-disable-next-line security/detect-object-injection\n if ((anolilabEslintConfig as unknown as { [key: string]: { [key: string]: false | undefined } })?.[\"plugin\"]?.[configName] !== false) {\n const foundDependencies = [];\n\n dependencies.forEach((dependency) => {\n if (hasDependency(dependency) || hasDevDependency(dependency)) {\n foundDependencies.push(dependency);\n }\n });\n\n if (foundDependencies.length === dependencies.length) {\n loadedPlugins.push(configName);\n } else {\n // eslint-disable-next-line security/detect-object-injection\n possiblePlugins[configName] = {};\n\n dependencies.forEach((dependency) => {\n // eslint-disable-next-line security/detect-object-injection\n (possiblePlugins[configName] as { [key: string]: boolean })[dependency] = hasDependency(dependency) || hasDevDependency(dependency);\n });\n }\n }\n});\n\nexport const rules = baseConfig;\nexport const pluginRules = loadedPlugins;\n\nexport const possiblePluginRules = possiblePlugins;\n","/**\nDefine the rules config that are overwritten only for specific version of Node.js based on `engines.node` in package.json or the `nodeVersion` option.\n\nThe keys are rule names and the values are an Object with a valid semver (`4.0.0` is valid `4` is not) as keys and the rule configuration as values.\n\nEach entry define the rule config and the maximum Node.js version for which to set it.\nThe entry with the lowest version that is compliant with the `engines.node`/`nodeVersion` range will be used.\n\n@type {Object}\n\n@example\n```\n{\n 'plugin/rule': {\n '6.0.0': ['error', {prop: 'node-6-conf'}],\n '8.0.0': ['error', {prop: 'node-8-conf'}]\n }\n}\n```\n\nWith `engines.node` set to `>=4` the rule `plugin/rule` will not be used.\nWith `engines.node` set to `>=6` the rule `plugin/rule` will be used with the config `{prop: 'node-6-conf'}`.\nWith `engines.node` set to `>=8` the rule `plugin/rule` will be used with the config `{prop: 'node-8-conf'}`.\n*/\nconst engineRules = {\n \"n/prefer-global/text-decoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/text-encoder\": {\n \"11.0.0\": \"off\",\n },\n \"n/prefer-global/url\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-global/url-search-params\": {\n \"10.0.0\": \"off\",\n },\n \"n/prefer-promises/dns\": {\n \"11.14.0\": \"off\",\n },\n \"n/prefer-promises/fs\": {\n \"11.14.0\": \"off\",\n },\n \"no-useless-catch\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-destructuring\": {\n \"6.0.0\": \"off\",\n },\n \"prefer-named-capture-group\": {\n \"10.0.0\": \"off\",\n },\n \"prefer-object-spread\": {\n \"8.3.0\": \"off\",\n },\n \"prefer-rest-params\": {\n \"6.0.0\": \"off\",\n },\n \"promise/prefer-await-to-then\": {\n \"7.6.0\": \"off\",\n },\n \"unicorn/no-new-buffer\": {\n \"5.10.0\": \"off\",\n },\n \"unicorn/prefer-flat-map\": {\n \"11.0.0\": \"off\",\n },\n \"unicorn/prefer-spread\": {\n \"5.0.0\": \"off\",\n },\n};\n\nexport default engineRules;\n"]}
@@ -1,33 +1,38 @@
1
1
  'use strict';
2
2
 
3
+ var chunk3NVDJZNH_js = require('./chunk-3NVDJZNH.js');
3
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
4
5
  var fs = require('fs');
5
6
  var path = require('path');
7
+ var process = require('process');
6
8
  var util = require('util');
7
9
 
8
- process.env.CI&&process.exit(0);var f=util.promisify(fs.writeFile);console.log("Configuring @anolilab/eslint-config",packageJsonUtils.projectPath,`
9
- `);var s=".eslintrc",d=()=>{for(let o of [s,`${s}.js`,`${s}.cjs`,`${s}.json`,`${s}.yaml`,`${s}.yml`])if(fs.existsSync(path.join(packageJsonUtils.projectPath,o)))return console.warn(`\u26A0\uFE0F ${o} already exists;
10
+ var b=chunk3NVDJZNH_js.a(()=>{process.env.CI&&process.exit(0);var g=util.promisify(fs.writeFile);console.log("Configuring @anolilab/eslint-config",packageJsonUtils.projectPath,`
11
+ `);var t=".eslintrc",j=()=>{for(let o of [t,`${t}.js`,`${t}.cjs`,`${t}.json`,`${t}.yaml`,`${t}.yml`])if(fs.existsSync(path.join(packageJsonUtils.projectPath,o)))return console.warn(`\u26A0\uFE0F ${o} already exists;
10
12
  Make sure that it includes the following for @anolilab/eslint-config'
11
- to work as it should: { extends: ["@anolilab/eslint-config"] }.`),Promise.resolve();let t=path.join(packageJsonUtils.projectPath,`.eslintrc.${packageJsonUtils.packageIsTypeModule?"c":""}js`),a="",c=`
13
+ to work as it should: { extends: ["@anolilab/eslint-config"] }.`),Promise.resolve();let s=path.join(packageJsonUtils.projectPath,`.eslintrc.${packageJsonUtils.packageIsTypeModule?"c":""}js`),c="",p=`
12
14
  parserOptions: {
13
15
  ecmaVersion: "latest",
14
16
  sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
15
- },`,p=path.join(packageJsonUtils.projectPath,"tsconfig.json");if(fs.existsSync(p)){let o=JSON.parse(fs.readFileSync(p,"utf8")),e="latest";o.compilerOptions?.target&&(e=o.compilerOptions.target,e=e.toLowerCase()==="es2022"||e.toLowerCase()==="esnext"?"latest":e.toLowerCase().replace("es",""),e!=="latest"&&e!=="2022"&&e!=="2021"&&e!=="6"&&(a=`, "plugin:es-x/restrict-to-es${e}"`)),c=`
17
+ },`,f=path.join(packageJsonUtils.projectPath,"tsconfig.json"),e="latest";if(fs.existsSync(f)){let o=JSON.parse(fs.readFileSync(f,"utf8"));o.compilerOptions?.target&&(e=o.compilerOptions.target,e=e.toLowerCase()==="es2022"||e.toLowerCase()==="esnext"?"latest":e.toLowerCase().replace("es",""),e!=="latest"&&e!=="2022"&&e!=="2021"&&e!=="6"&&(c=`, "plugin:es-x/restrict-to-es${e}"`)),p=`
16
18
  parserOptions: {
17
19
  project: "./tsconfig.json",
18
20
  ecmaVersion: ${e==="latest"?`"${e}"`:e},
19
21
  sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
20
- },`;}let m=`/** @ts-check */
22
+ },`;}let m=`${["es2015","es2017","es2020","es2021","latest"].includes(e)?`var { globals } = require("./packages/eslint-config");
23
+
24
+ `:""}/** @ts-check */
21
25
  /** @type {import('eslint').Linter.Config} */
22
26
  module.exports = {
23
27
  root: true,
24
- extends: ["@anolilab/eslint-config"${a}],
28
+ extends: ["@anolilab/eslint-config"${c}],
25
29
  ignorePatterns: ["!**/*"],
26
30
  env: {
27
31
  // Your environments (which contains several predefined global variables)
28
32
  // Most environments are loaded automatically if our rules are added
29
- },${c}
30
- globals: {
33
+ },${p}
34
+ globals: {${["es2015","es2017","es2020","es2021","latest"].includes(e)?`
35
+ ...globals.${e==="latest"?"es2021":e},`:""}
31
36
  // Your global variables (setting to false means it's not allowed to be reassigned)
32
37
  // myGlobal: false
33
38
  },
@@ -60,6 +65,8 @@ module.exports = {
60
65
  },
61
66
  ],
62
67
  };
63
- `;return f(t,m,"utf8")},w=()=>{let t=path.join(packageJsonUtils.projectPath,".eslintignore");return fs.existsSync(t)?(console.warn("\u26A0\uFE0F .eslintignore already exists"),Promise.resolve()):f(t,"","utf8")};(async()=>{try{await Promise.all([d(),w()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();
68
+ `;return g(s,m,"utf8")},$=()=>{let s=path.join(packageJsonUtils.projectPath,".eslintignore");return fs.existsSync(s)?(console.warn("\u26A0\uFE0F .eslintignore already exists"),Promise.resolve()):g(s,"","utf8")};(async()=>{try{await Promise.all([j(),$()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(s){console.log("\u{1F62C} something went wrong:"),console.error(s),process.exit(1);}})();});var postinstall = b();
69
+
70
+ module.exports = postinstall;
64
71
  //# sourceMappingURL=out.js.map
65
72
  //# sourceMappingURL=postinstall.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","readFileSync","writeFile","join","promisify","writeFileAsync","configFile","writeEslintRc","filename","eslintPath","pluginExtends","parserOptions","tsconfigPath","tsConfig","ecmaVersion","content","writeEslintIgnore","eslintIgnorePath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EAAsB,WAAa,YAAY;AAAA,OAEjE,CAEA,IAAMiB,EAAU;AAAA;AAAA;AAAA;AAAA,yCAIqBL,CAAa;AAAA;AAAA;AAAA;AAAA;AAAA,QAK9CC,CAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoCjB,OAAON,EAAeI,EAAYM,EAAS,MAAM,CACrD,EAKMC,EAAoB,IAAM,CAC5B,IAAMC,EAAmBd,EAAKJ,EAAa,eAAe,EAE1D,OAAIC,EAAWiB,CAAgB,GAC3B,QAAQ,KAAK,4CAAkC,EAExC,QAAQ,QAAQ,GAGpBZ,EAAeY,EAAkB,GAAI,MAAM,CACtD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACV,EAAc,EAAGS,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASE,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\nimport type { TsConfigJson } from \"type-fest\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\n\");\n\nconst configFile = \".eslintrc\";\n\n/**\n * Writes .eslintrc.js if it doesn't exist. Warns if it exists.\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst writeEslintRc = () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [configFile, `${configFile}.js`, `${configFile}.cjs`, `${configFile}.json`, `${configFile}.yaml`, `${configFile}.yml`]) {\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/eslint-config'\nto work as it should: { extends: [\"@anolilab/eslint-config\"] }.`);\n\n return Promise.resolve();\n }\n }\n\n const eslintPath = join(projectPath, `.eslintrc.${packageIsTypeModule ? \"c\" : \"\"}js`);\n\n let pluginExtends = \"\";\n let parserOptions = `\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n\n const tsconfigPath = join(projectPath, \"tsconfig.json\");\n\n if (existsSync(tsconfigPath)) {\n const tsConfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\")) as TsConfigJson;\n\n let ecmaVersion = \"latest\";\n\n if (tsConfig.compilerOptions?.target) {\n ecmaVersion = tsConfig.compilerOptions.target;\n\n ecmaVersion = ecmaVersion.toLowerCase() === \"es2022\" || ecmaVersion.toLowerCase() === \"esnext\" ? \"latest\" : ecmaVersion.toLowerCase().replace(\"es\", \"\");\n\n if (ecmaVersion !== \"latest\" && ecmaVersion !== \"2022\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"6\") {\n pluginExtends = `, \"plugin:es-x/restrict-to-es${ecmaVersion}\"`;\n }\n }\n\n parserOptions = `\n parserOptions: {\n project: \"./tsconfig.json\",\n ecmaVersion: ${ecmaVersion === \"latest\" ? `\"${ecmaVersion}\"` : ecmaVersion},\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n }\n\n const content = `/** @ts-check */\n/** @type {import('eslint').Linter.Config} */\nmodule.exports = {\n root: true,\n extends: [\"@anolilab/eslint-config\"${pluginExtends}],\n ignorePatterns: [\"!**/*\"],\n env: {\n // Your environments (which contains several predefined global variables)\n // Most environments are loaded automatically if our rules are added\n },${parserOptions}\n globals: {\n // Your global variables (setting to false means it's not allowed to be reassigned)\n // myGlobal: false\n },\n rules: {\n // Customize your rules\n },\n overrides: [\n {\n files: [\n \"*.ts\",\n \"*.tsx\",\n \"*.mts\",\n \"*.cts\",\n \"*.js\",\n \"*.jsx\",\n ],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.js\", \"*.jsx\"],\n rules: {},\n },\n ],\n};\n`;\n\n return writeFileAsync(eslintPath, content, \"utf8\");\n};\n\n/**\n * Writes .eslintignore if it doesn't exist. Warns if it exists.\n */\nconst writeEslintIgnore = () => {\n const eslintIgnorePath = join(projectPath, \".eslintignore\");\n\n if (existsSync(eslintIgnorePath)) {\n console.warn(\"⚠️ .eslintignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintIgnorePath, \"\", \"utf8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writeEslintRc(), writeEslintIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","readFileSync","writeFile","join","env","exit","promisify","require_postinstall","__commonJSMin","writeFileAsync","configFile","writeEslintRc","filename","eslintPath","pluginExtends","parserOptions","tsconfigPath","ecmaVersion","tsConfig","content","writeEslintIgnore","eslintIgnorePath","error"],"mappings":"wCAAA,OAAS,uBAAAA,EAAq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;AAAA,sBAC5DnB,EAAsB,WAAa,YAAY;AAAA,OAEjE,CAEA,IAAMqB,EAAU,GACZ,CAAC,SAAU,SAAU,SAAU,SAAU,QAAQ,EAAE,SAASF,CAAW,EAAI;AAAA;AAAA,EAA+D,EAC9I;AAAA;AAAA;AAAA;AAAA,yCAIqCH,CAAa;AAAA;AAAA;AAAA;AAAA;AAAA,QAK9CC,CAAa;AAAA,gBAEb,CAAC,SAAU,SAAU,SAAU,SAAU,QAAQ,EAAE,SAASE,CAAW,EACjE;AAAA,qBAAwBA,IAAgB,SAAW,SAAWA,CAAW,IACzE,EACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmCA,OAAOR,EAAeI,EAAYM,EAAS,MAAM,CACrD,EAKMC,EAAoB,IAAM,CAC5B,IAAMC,EAAmBlB,EAAKJ,EAAa,eAAe,EAG1D,OAAIC,EAAWqB,CAAgB,GAC3B,QAAQ,KAAK,4CAAkC,EAExC,QAAQ,QAAQ,GAGpBZ,EAAeY,EAAkB,GAAI,MAAM,CACtD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACV,EAAc,EAAGS,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAEjDf,EAAK,CAAC,CACV,OAASiB,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBjB,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\nimport type { TsConfigJson } from \"type-fest\";\n\nif (env[\"CI\"]) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\n\");\n\nconst configFile = \".eslintrc\";\n\n/**\n * Writes .eslintrc.js if it doesn't exist. Warns if it exists.\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst writeEslintRc = () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [configFile, `${configFile}.js`, `${configFile}.cjs`, `${configFile}.json`, `${configFile}.yaml`, `${configFile}.yml`]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/eslint-config'\nto work as it should: { extends: [\"@anolilab/eslint-config\"] }.`);\n\n return Promise.resolve();\n }\n }\n\n const eslintPath = join(projectPath, `.eslintrc.${packageIsTypeModule ? \"c\" : \"\"}js`);\n\n let pluginExtends = \"\";\n let parserOptions = `\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n\n const tsconfigPath = join(projectPath, \"tsconfig.json\");\n\n let ecmaVersion = \"latest\";\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(tsconfigPath)) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n const tsConfig = JSON.parse(readFileSync(tsconfigPath, \"utf8\")) as TsConfigJson;\n\n if (tsConfig.compilerOptions?.target) {\n ecmaVersion = tsConfig.compilerOptions.target;\n\n ecmaVersion =\n ecmaVersion.toLowerCase() === \"es2022\" || ecmaVersion.toLowerCase() === \"esnext\" ? \"latest\" : ecmaVersion.toLowerCase().replace(\"es\", \"\");\n\n if (ecmaVersion !== \"latest\" && ecmaVersion !== \"2022\" && ecmaVersion !== \"2021\" && ecmaVersion !== \"6\") {\n pluginExtends = `, \"plugin:es-x/restrict-to-es${ecmaVersion}\"`;\n }\n }\n\n parserOptions = `\n parserOptions: {\n project: \"./tsconfig.json\",\n ecmaVersion: ${ecmaVersion === \"latest\" ? `\"${ecmaVersion}\"` : ecmaVersion},\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n }\n\n const content = `${\n [\"es2015\", \"es2017\", \"es2020\", \"es2021\", \"latest\"].includes(ecmaVersion) ? 'var { globals } = require(\"./packages/eslint-config\");\\n\\n' : \"\"\n }/** @ts-check */\n/** @type {import('eslint').Linter.Config} */\nmodule.exports = {\n root: true,\n extends: [\"@anolilab/eslint-config\"${pluginExtends}],\n ignorePatterns: [\"!**/*\"],\n env: {\n // Your environments (which contains several predefined global variables)\n // Most environments are loaded automatically if our rules are added\n },${parserOptions}\n globals: {${\n [\"es2015\", \"es2017\", \"es2020\", \"es2021\", \"latest\"].includes(ecmaVersion)\n ? `\\n ...globals.${ecmaVersion === \"latest\" ? \"es2021\" : ecmaVersion},`\n : \"\"\n }\n // Your global variables (setting to false means it's not allowed to be reassigned)\n // myGlobal: false\n },\n rules: {\n // Customize your rules\n },\n overrides: [\n {\n files: [\n \"*.ts\",\n \"*.tsx\",\n \"*.mts\",\n \"*.cts\",\n \"*.js\",\n \"*.jsx\",\n ],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting\n parserOptions: {},\n rules: {},\n },\n {\n files: [\"*.js\", \"*.jsx\"],\n rules: {},\n },\n ],\n};\n`;\n\n return writeFileAsync(eslintPath, content, \"utf8\");\n};\n\n/**\n * Writes .eslintignore if it doesn't exist. Warns if it exists.\n */\nconst writeEslintIgnore = () => {\n const eslintIgnorePath = join(projectPath, \".eslintignore\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(eslintIgnorePath)) {\n console.warn(\"⚠️ .eslintignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(eslintIgnorePath, \"\", \"utf8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writeEslintRc(), writeEslintIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunk5S3UQ6WJ_js = require('./chunk-5S3UQ6WJ.js');
4
- var chunkU5H7JNHH_js = require('./chunk-U5H7JNHH.js');
3
+ var chunkMQFZFF2T_js = require('./chunk-MQFZFF2T.js');
4
+ var chunkH7VQP3ZD_js = require('./chunk-H7VQP3ZD.js');
5
+ require('./chunk-3NVDJZNH.js');
5
6
 
6
- var e=chunk5S3UQ6WJ_js.a.rules,i=chunkU5H7JNHH_js.a("typescript",{rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"dot-notation":"off","@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["RegExp"]}],"@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!1}],"@typescript-eslint/no-floating-promises":["error",{ignoreIIFE:!0,ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","no-throw-literal":"off","@typescript-eslint/no-throw-literal":e["no-throw-literal"],"no-implied-eval":"off","no-new-func":"off","@typescript-eslint/no-implied-eval":e["no-implied-eval"],"@typescript-eslint/no-meaningless-void-operator":["error",{checkNever:!0}],"@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksVoidReturn:{arguments:!0,attributes:!1,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","require-await":"off","@typescript-eslint/require-await":e["require-await"],"@typescript-eslint/promise-function-async":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}],"@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error"}}),o=i;
7
+ var e=chunkMQFZFF2T_js.a.rules,i=chunkH7VQP3ZD_js.a("typescript",{rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["RegExp"]}],"@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!1}],"@typescript-eslint/no-floating-promises":["error",{ignoreIIFE:!0,ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":e["no-implied-eval"],"@typescript-eslint/no-meaningless-void-operator":["error",{checkNever:!0}],"@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksVoidReturn:{arguments:!0,attributes:!1,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-throw-literal":e["no-throw-literal"],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/require-await":e["require-await"],"@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}],"dot-notation":"off","no-implied-eval":"off","no-new-func":"off","no-throw-literal":"off","require-await":"off"}}),o=i;
7
8
 
8
9
  module.exports = o;
9
10
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["bestPracticesRules","best_practices_default","config","createConfig","typescript_type_checking_default"],"mappings":"gFAKA,IAAMA,EAAqBC,EAAoB,MAEzCC,EAASC,EAAa,aAAc,CACtC,MAAO,CAEH,oCAAqC,QAErC,6CAA8C,CAC1C,QACA,CACI,uCAAwC,EAC5C,CACJ,EAIA,eAAgB,MAChB,kCAAmC,CAAC,QAAS,CAAE,cAAe,EAAK,CAAC,EAGpE,uCAAwC,CACpC,QACA,CACI,iBAAkB,CAAC,QAAQ,CAC/B,CACJ,EAGA,kDAAmD,CAC/C,QACA,CACI,qBAAsB,GACtB,mBAAoB,EACxB,CACJ,EAGA,0CAA2C,CACvC,QACA,CACI,WAAY,GACZ,WAAY,EAChB,CACJ,EAGA,qCAAsC,QAItC,mBAAoB,MACpB,sCAAuCH,EAAmB,kBAAkB,EAI5E,kBAAmB,MACnB,cAAe,MACf,qCAAsCA,EAAmB,iBAAiB,EAI1E,kDAAmD,CAAC,QAAS,CAAE,WAAY,EAAK,CAAC,EAIjF,yCAA0C,CACtC,QACA,CACI,mBAAoB,GACpB,iBAAkB,CACd,UAAW,GACX,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,UAAW,EACf,CACJ,CACJ,EAIA,mDAAoD,MAIpD,qCAAsC,QAGtC,+CAAgD,CAC5C,QACA,CACI,uBAAwB,GACxB,8BAA+B,EACnC,CACJ,EAIA,wCAAyC,QAIzC,6CAA8C,QAI9C,oDAAqD,QAIrD,gBAAiB,MACjB,mCAAoCA,EAAmB,eAAe,EAGtE,4CAA6C,QAG7C,oCAAqC,CAAC,QAAS,CAAE,aAAc,EAAM,CAAC,EAGtE,gDAAiD,CAC7C,QACA,CACI,mBAAoB,EACxB,CACJ,EAGA,kCAAmC,CAAC,QAAS,QAAQ,EAGrD,iDAAkD,QAIlD,8CAA+C,QAG/C,4CAA6C,QAI7C,8CAA+C,QAI/C,mDAAoD,QAGpD,qCAAsC,CAAC,QAAS,CAAE,kBAAmB,EAAM,CAAC,EAI5E,kDAAmD,OACvD,CACJ,CAAC,EAEMI,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport bestPracticesConfig from \"./config/best-practices\";\nimport { createConfig } from \"./utils/create-config\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\n\nconst config = createConfig(\"typescript\", {\n rules: {\n // Disallows awaiting a value that is not a Thenable\n \"@typescript-eslint/await-thenable\": \"error\",\n\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: true,\n },\n ],\n\n // Replace 'dot-notation' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md\n \"@typescript-eslint/no-base-to-string\": [\n \"error\",\n {\n ignoredTypeNames: [\"RegExp\"],\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md\n \"@typescript-eslint/no-confusing-void-expression\": [\n \"error\",\n {\n ignoreArrowShorthand: true,\n ignoreVoidOperator: false,\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n {\n ignoreIIFE: true,\n ignoreVoid: true,\n },\n ],\n\n // Disallow iterating over an array with a for-in loop\n \"@typescript-eslint/no-for-in-array\": \"error\",\n\n // Replace 'no-throw-literal' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md\n \"no-throw-literal\": \"off\",\n \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\n\n // Disallow the void operator except when used to discard a value.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n\n // Disallow Promises in places not designed to handle them.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-promises.md\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksVoidReturn: {\n arguments: true,\n attributes: false,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n\n // Warns if a type assertion does not change the type of an expression\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Enforce includes method over indexOf method.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-includes.md\n \"@typescript-eslint/prefer-includes\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreConditionalTests: true,\n ignoreMixedLogicalExpressions: true,\n },\n ],\n\n // Enforce RegExp#exec over String#match if no global flag is provided.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n\n // Enforce that this is used when only this type is returned.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n\n // Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // Enforces unbound methods are called with their expected scope\n \"@typescript-eslint/unbound-method\": [\"error\", { ignoreStatic: false }],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"@typescript-eslint/return-await\": [\"error\", \"always\"],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n\n // Disallow unnecessary namespace qualifiers.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md\n \"@typescript-eslint/no-unnecessary-qualifier\": \"error\",\n\n // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n\n // Disallow type arguments that are equal to the default.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n\n // Requires that private members are marked as readonly if they're never modified outside of the constructor\n \"@typescript-eslint/prefer-readonly\": [\"error\", { onlyInlineLambdas: false }],\n\n // Enforce using type parameter when calling Array#reduce instead of casting.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n },\n});\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../src/typescript-type-checking.ts"],"names":["bestPracticesRules","best_practices_default","config","createConfig","typescript_type_checking_default"],"mappings":"4GAKA,IAAMA,EAAqBC,EAAoB,MAEzCC,EAASC,EAAa,aAAc,CAOtC,MAAO,CAEH,oCAAqC,QAErC,6CAA8C,CAC1C,QACA,CACI,uCAAwC,EAC5C,CACJ,EAGA,kCAAmC,CAAC,QAAS,CAAE,cAAe,EAAK,CAAC,EAEpE,uCAAwC,CACpC,QACA,CACI,iBAAkB,CAAC,QAAQ,CAC/B,CACJ,EAGA,kDAAmD,CAC/C,QACA,CACI,qBAAsB,GACtB,mBAAoB,EACxB,CACJ,EAGA,0CAA2C,CACvC,QACA,CACI,WAAY,GACZ,WAAY,EAChB,CACJ,EAGA,qCAAsC,QAEtC,qCAAsCH,EAAmB,iBAAiB,EAI1E,kDAAmD,CAAC,QAAS,CAAE,WAAY,EAAK,CAAC,EAEjF,yCAA0C,CACtC,QACA,CACI,mBAAoB,GACpB,iBAAkB,CACd,UAAW,GACX,WAAY,GACZ,WAAY,GACZ,QAAS,GACT,UAAW,EACf,CACJ,CACJ,EAGA,sCAAuCA,EAAmB,kBAAkB,EAE5E,8CAA+C,QAE/C,8CAA+C,QAI/C,mDAAoD,QAIpD,mDAAoD,MAIpD,qCAAsC,QAItC,+CAAgD,CAC5C,QACA,CACI,uBAAwB,GACxB,8BAA+B,EACnC,CACJ,EAGA,qCAAsC,CAAC,QAAS,CAAE,kBAAmB,EAAM,CAAC,EAI5E,kDAAmD,QAInD,wCAAyC,QAIzC,6CAA8C,QAI9C,oDAAqD,QAErD,4CAA6C,QAG7C,gDAAiD,CAC7C,QACA,CACI,mBAAoB,EACxB,CACJ,EAEA,mCAAoCA,EAAmB,eAAe,EAGtE,4CAA6C,QAG7C,kCAAmC,CAAC,QAAS,QAAQ,EAGrD,iDAAkD,QAIlD,oCAAqC,CAAC,QAAS,CAAE,aAAc,EAAM,CAAC,EAGtE,eAAgB,MAIhB,kBAAmB,MAGnB,cAAe,MAGf,mBAAoB,MAIpB,gBAAiB,KACrB,CACJ,CAAC,EAEMI,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport bestPracticesConfig from \"./config/best-practices\";\nimport { createConfig } from \"./utils/create-config\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\n\nconst config = createConfig(\"typescript\", {\n // TODO: enable the rule when typescript-eslint 6.0.0 is released\n // extends: [\n // \"plugin:@typescript-eslint/recommended-type-checked\",\n // \"plugin:@typescript-eslint/strict-type-checked\",\n // \"plugin:@typescript-eslint/stylistic-type-checked\"\n // ],\n rules: {\n // Disallows awaiting a value that is not a Thenable\n \"@typescript-eslint/await-thenable\": \"error\",\n\n \"@typescript-eslint/consistent-type-exports\": [\n \"error\",\n {\n fixMixedExportsWithInlineTypeSpecifier: true,\n },\n ],\n\n // Replace 'dot-notation' rule with '@typescript-eslint' version\n \"@typescript-eslint/dot-notation\": [\"error\", { allowKeywords: true }],\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-base-to-string.md\n \"@typescript-eslint/no-base-to-string\": [\n \"error\",\n {\n ignoredTypeNames: [\"RegExp\"],\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md\n \"@typescript-eslint/no-confusing-void-expression\": [\n \"error\",\n {\n ignoreArrowShorthand: true,\n ignoreVoidOperator: false,\n },\n ],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-floating-promises.md\n \"@typescript-eslint/no-floating-promises\": [\n \"error\",\n {\n ignoreIIFE: true,\n ignoreVoid: true,\n },\n ],\n\n // Disallow iterating over an array with a for-in loop\n \"@typescript-eslint/no-for-in-array\": \"error\",\n\n \"@typescript-eslint/no-implied-eval\": bestPracticesRules[\"no-implied-eval\"],\n\n // Replace 'no-throw-literal' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md\n \"@typescript-eslint/no-meaningless-void-operator\": [\"error\", { checkNever: true }],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-promises.md\n \"@typescript-eslint/no-misused-promises\": [\n \"error\",\n {\n checksConditionals: true,\n checksVoidReturn: {\n arguments: true,\n attributes: false,\n properties: true,\n returns: true,\n variables: true,\n },\n },\n ],\n\n // Replace 'no-implied-eval' and 'no-new-func' rules with '@typescript-eslint' version\n \"@typescript-eslint/no-throw-literal\": bestPracticesRules[\"no-throw-literal\"],\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md\n \"@typescript-eslint/no-unnecessary-condition\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md\n \"@typescript-eslint/no-unnecessary-qualifier\": \"error\",\n\n // Disallow the void operator except when used to discard a value.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"error\",\n\n // Disallow Promises in places not designed to handle them.\n // Disabling here because in most cases the explicitness is still valuable\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"off\",\n\n // Warns if a type assertion does not change the type of an expression\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-includes.md\n \"@typescript-eslint/prefer-includes\": \"error\",\n\n // Enforce includes method over indexOf method.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": [\n \"error\",\n {\n ignoreConditionalTests: true,\n ignoreMixedLogicalExpressions: true,\n },\n ],\n\n // Requires that private members are marked as readonly if they're never modified outside of the constructor\n \"@typescript-eslint/prefer-readonly\": [\"error\", { onlyInlineLambdas: false }],\n\n // Enforce RegExp#exec over String#match if no global flag is provided.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"error\",\n\n // Enforce that this is used when only this type is returned.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md\n \"@typescript-eslint/prefer-regexp-exec\": \"error\",\n\n // Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-return-this-type.md\n \"@typescript-eslint/prefer-return-this-type\": \"error\",\n\n // Replace 'require-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"error\",\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/promise-function-async.md\n \"@typescript-eslint/promise-function-async\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-array-sort-compare.md\n \"@typescript-eslint/require-array-sort-compare\": [\n \"error\",\n {\n ignoreStringArrays: false,\n },\n ],\n\n \"@typescript-eslint/require-await\": bestPracticesRules[\"require-await\"],\n\n // When adding two variables, operands must both be of type number or of type string\n \"@typescript-eslint/restrict-plus-operands\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"@typescript-eslint/return-await\": [\"error\", \"always\"],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md\n \"@typescript-eslint/switch-exhaustiveness-check\": \"error\",\n\n // Disallow unnecessary namespace qualifiers.\n // Enforces unbound methods are called with their expected scope\n \"@typescript-eslint/unbound-method\": [\"error\", { ignoreStatic: false }],\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md\n \"dot-notation\": \"off\",\n\n // Disallow conditionals where the type is always truthy or always falsy.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-implied-eval.md\n \"no-implied-eval\": \"off\",\n\n // Disallow type arguments that are equal to the default.\n \"no-new-func\": \"off\",\n\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md\n \"no-throw-literal\": \"off\",\n\n // Enforce using type parameter when calling Array#reduce instead of casting.\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/require-await.md\n \"require-await\": \"off\",\n },\n});\n\nexport default config;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "7.3.2",
3
+ "version": "9.0.0",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -16,6 +16,7 @@
16
16
  "es2017",
17
17
  "es2018",
18
18
  "es2020",
19
+ "globals",
19
20
  "eslint-import-resolver-node",
20
21
  "eslint-import-resolver-typescript",
21
22
  "eslint-plugin-antfu",
@@ -34,9 +35,7 @@
34
35
  "eslint-plugin-regexp",
35
36
  "eslint-plugin-simple-import-sort",
36
37
  "eslint-plugin-sonarjs",
37
- "eslint-plugin-sort-keys-fix",
38
38
  "eslint-plugin-toml",
39
- "eslint-plugin-typescript-sort-keys",
40
39
  "eslint-plugin-unicorn",
41
40
  "eslint-plugin-yml",
42
41
  "eslint-plugin-array-func",
@@ -85,6 +84,7 @@
85
84
  "name": "Daniel Bannert",
86
85
  "email": "d.bannert@anolilab.de"
87
86
  },
87
+ "type": "commonjs",
88
88
  "exports": {
89
89
  ".": {
90
90
  "types": "./dist/index.d.ts",
@@ -94,6 +94,10 @@
94
94
  "types": "./dist/typescript-type-checking.d.ts",
95
95
  "require": "./dist/typescript-type-checking.js"
96
96
  },
97
+ "./globals": {
98
+ "types": "./dist/globals.d.ts",
99
+ "require": "./dist/globals.js"
100
+ },
97
101
  "./package.json": "./package.json"
98
102
  },
99
103
  "main": "dist/index.js",
@@ -111,13 +115,13 @@
111
115
  "postinstall": "node ./skip.js || node ./dist/postinstall.js"
112
116
  },
113
117
  "dependencies": {
114
- "@anolilab/package-json-utils": "1.5.1",
118
+ "@anolilab/package-json-utils": "2.0.0",
115
119
  "@html-eslint/eslint-plugin": "^0.19.0",
116
120
  "@html-eslint/parser": "^0.19.0",
117
121
  "@rushstack/eslint-patch": "^1.3.2",
118
122
  "@rushstack/eslint-plugin-security": "^0.6.0",
119
- "@typescript-eslint/eslint-plugin": ">=5.60.1",
120
- "@typescript-eslint/parser": "^5.60.1",
123
+ "@typescript-eslint/eslint-plugin": ">=5.61.0",
124
+ "@typescript-eslint/parser": "^5.61.0",
121
125
  "confusing-browser-globals": "^1.0.11",
122
126
  "eslint-import-resolver-node": "^0.3.7",
123
127
  "eslint-import-resolver-typescript": "^3.5.5",
@@ -133,16 +137,17 @@
133
137
  "eslint-plugin-no-loops": "^0.3.0",
134
138
  "eslint-plugin-no-secrets": "^0.8.9",
135
139
  "eslint-plugin-no-use-extend-native": "^0.5.0",
140
+ "eslint-plugin-perfectionist": "^1.4.0",
136
141
  "eslint-plugin-promise": "^6.1.1",
137
142
  "eslint-plugin-regexp": "^1.15.0",
143
+ "eslint-plugin-security": "^1.7.1",
138
144
  "eslint-plugin-simple-import-sort": "^10.0.0",
139
145
  "eslint-plugin-sonarjs": "^0.19.0",
140
- "eslint-plugin-sort-keys-fix": "^1.1.2",
141
146
  "eslint-plugin-toml": "^0.5.0",
142
- "eslint-plugin-typescript-sort-keys": "^2.3.0",
143
147
  "eslint-plugin-unicorn": "^47.0.0",
144
148
  "eslint-plugin-yml": "^1.8.0",
145
149
  "find-up": "5.0.0",
150
+ "globals": "^13.20.0",
146
151
  "jsonc-eslint-parser": "^2.3.0",
147
152
  "read-pkg-up": "^7.0.1",
148
153
  "semver": "^7.5.3",
@@ -151,13 +156,13 @@
151
156
  "yaml-eslint-parser": "^1.2.2"
152
157
  },
153
158
  "devDependencies": {
154
- "@anolilab/semantic-release-preset": "4.0.3",
159
+ "@anolilab/semantic-release-preset": "5.0.0",
155
160
  "@testing-library/dom": "^9.3.1",
156
161
  "@total-typescript/ts-reset": "^0.4.2",
157
162
  "@types/confusing-browser-globals": "^1.0.0",
158
163
  "@types/eslint": "^8.40.2",
159
164
  "@types/semver": "^7.5.0",
160
- "eslint": "^8.43.0",
165
+ "eslint": "^8.44.0",
161
166
  "eslint-find-rules": "^4.1.0",
162
167
  "eslint-plugin-babel": "^5.3.1",
163
168
  "eslint-plugin-cypress": "^2.13.3",
@@ -166,13 +171,14 @@
166
171
  "eslint-plugin-jest-async": "^1.0.3",
167
172
  "eslint-plugin-jest-dom": "^5.0.1",
168
173
  "eslint-plugin-jest-formatting": "^3.1.0",
169
- "eslint-plugin-jsdoc": "^46.4.0",
174
+ "eslint-plugin-jsdoc": "^46.4.3",
170
175
  "eslint-plugin-jsx-a11y": "^6.7.1",
171
176
  "eslint-plugin-no-unsanitized": "^4.0.2",
172
177
  "eslint-plugin-prefer-object-spread": "^1.2.1",
173
178
  "eslint-plugin-react": "^7.32.2",
174
179
  "eslint-plugin-react-hooks": "^4.6.0",
175
180
  "eslint-plugin-react-redux": "^4.0.0",
181
+ "@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",
176
182
  "eslint-plugin-storybook": "^0.6.12",
177
183
  "eslint-plugin-tailwindcss": "^3.13.0",
178
184
  "eslint-plugin-testing-library": "^5.11.0",
@@ -183,11 +189,11 @@
183
189
  "jest": "^29.5.0",
184
190
  "react": "^18.2.0",
185
191
  "rimraf": "^5.0.1",
186
- "semantic-release": "^21.0.5",
192
+ "semantic-release": "^21.0.6",
187
193
  "tsup": "^7.1.0",
188
194
  "type-fest": "^3.12.0",
189
- "typescript": "^5.1.5",
190
- "vitest": "^0.32.2"
195
+ "typescript": "^5.1.6",
196
+ "vitest": "^0.32.4"
191
197
  },
192
198
  "peerDependencies": {
193
199
  "eslint": "^8.15.0"
@@ -202,7 +208,7 @@
202
208
  "eslint-plugin-jest-async": "^1.0.3",
203
209
  "eslint-plugin-jest-dom": "^5.0.1",
204
210
  "eslint-plugin-jest-formatting": "^3.1.0",
205
- "eslint-plugin-jsdoc": "^46.4.0",
211
+ "eslint-plugin-jsdoc": "^46.4.3",
206
212
  "eslint-plugin-jsx-a11y": "^6.7.1",
207
213
  "eslint-plugin-n": "^16.0.1",
208
214
  "eslint-plugin-no-unsanitized": "^4.0.2",
@@ -256,23 +262,23 @@
256
262
  "src/config/plugins/no-secrets.ts",
257
263
  "src/config/plugins/no-unsanitized.ts",
258
264
  "src/config/plugins/node.ts",
265
+ "src/config/plugins/perfectionist.ts",
259
266
  "src/config/plugins/playwright.ts",
260
267
  "src/config/plugins/promise.ts",
261
- "src/config/plugins/react-hooks.ts",
262
- "src/config/plugins/react-redux.ts",
263
268
  "src/config/plugins/regexp.ts",
264
269
  "src/config/plugins/react.ts",
270
+ "src/config/plugins/react-hooks.ts",
271
+ "src/config/plugins/react-redux.ts",
272
+ "src/config/plugins/react-usememo.ts",
265
273
  "src/config/plugins/security.ts",
266
274
  "src/config/plugins/simple-import-sort.ts",
267
275
  "src/config/plugins/sonarjs.ts",
268
- "src/config/plugins/sort-keys-fix.ts",
269
276
  "src/config/plugins/storybook.ts",
270
277
  "src/config/plugins/tailwindcss.ts",
271
278
  "src/config/plugins/tanstack-query.ts",
272
279
  "src/config/plugins/testing-library.ts",
273
280
  "src/config/plugins/toml.ts",
274
281
  "src/config/plugins/tsdoc.ts",
275
- "src/config/plugins/typescript-sort-keys.ts",
276
282
  "src/config/plugins/typescript.ts",
277
283
  "src/config/plugins/unicorn.ts",
278
284
  "src/config/plugins/vitest.ts",
@@ -282,6 +288,7 @@
282
288
  "src/config/plugins/zod.ts",
283
289
  "src/config/style.ts",
284
290
  "src/config/variables.ts",
291
+ "src/globals.ts",
285
292
  "src/index.ts",
286
293
  "src/postinstall.ts",
287
294
  "src/typescript-type-checking.ts"
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var e={rules:{"accessor-pairs":"off","array-callback-return":["error",{allowImplicit:!0}],"block-scoped-var":"error",complexity:["off",11],"class-methods-use-this":["error",{exceptMethods:[]}],"consistent-return":"error",curly:["error","multi-line"],"default-case":["error",{commentPattern:"^no default$"}],"default-case-last":"error","default-param-last":"error","dot-location":["error","property"],eqeqeq:["error","always",{null:"ignore"}],"grouped-accessor-pairs":"error","guard-for-in":"error","max-classes-per-file":["error",1],"no-alert":"error","no-caller":"error","no-case-declarations":"error","no-constructor-return":"error","no-div-regex":"off","no-else-return":["error",{allowElseIf:!1}],"no-empty-function":["error",{allow:["arrowFunctions","functions","methods"]}],"no-empty-pattern":"error","no-empty-static-block":"error","no-eq-null":"off","no-eval":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-label":"error","no-fallthrough":"error","no-floating-decimal":"error","no-global-assign":["error",{exceptions:[]}],"no-native-reassign":"off","no-implicit-coercion":["off",{boolean:!1,number:!0,string:!0,allow:[]}],"no-implicit-globals":"off","no-implied-eval":"error","no-invalid-this":"off","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-loop-func":"error","no-magic-numbers":["off",{ignore:[],ignoreArrayIndexes:!0,enforceConst:!0,detectObjects:!1}],"no-multi-spaces":["error",{ignoreEOLComments:!1}],"no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":["error",{props:!0,ignorePropertyModificationsFor:["acc","accumulator","e","ctx","context","req","request","res","response","$scope","staticContext"]}],"no-proto":"error","no-redeclare":"error","no-restricted-properties":["error",{object:"arguments",property:"callee",message:"arguments.callee is deprecated"},{object:"global",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"self",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"window",property:"isFinite",message:"Please use Number.isFinite instead"},{object:"global",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"self",property:"isNaN",message:"Please use Number.isNaN instead"},{object:"window",property:"isNaN",message:"Please use Number.isNaN instead"},{property:"__defineGetter__",message:"Please use Object.defineProperty instead."},{property:"__defineSetter__",message:"Please use Object.defineProperty instead."},{object:"Math",property:"pow",message:"Use the exponentiation operator (**) instead."},{object:"globalThis",property:"isNaN",message:"Use `Number.isNaN` instead."},{object:"globalThis",property:"isFinite",message:"Use `Number.isFinite` instead."},{object:"globalThis",property:"parseFloat",message:"Use `Number.parseFloat` instead."},{object:"globalThis",property:"parseInt",message:"Use `Number.parseInt` instead."},{object:"window",property:"parseFloat",message:"Use `Number.parseFloat` instead."},{object:"window",property:"parseInt",message:"Use `Number.parseInt` instead."},{property:"__proto__",message:"Use `Object.getPrototypeOf` instead."},{property:"__lookupGetter__",message:"Use `Object.getOwnPropertyDescriptor` instead."},{property:"__lookupSetter__",message:"Use `Object.getOwnPropertyDescriptor` instead."}],"no-return-assign":["error","always"],"no-return-await":"error","no-script-url":"error","no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-throw-literal":"error","no-unmodified-loop-condition":"off","no-unused-expressions":["error",{allowShortCircuit:!1,allowTernary:!1,allowTaggedTemplates:!1}],"no-unused-labels":"error","no-useless-call":"off","no-useless-catch":"error","no-useless-concat":"error","no-useless-escape":"error","no-useless-return":"error","no-void":"error","no-warning-comments":["off",{terms:["todo","fixme","xxx","@todo"],location:"start"}],"no-with":"error","prefer-promise-reject-errors":["error",{allowEmptyReject:!0}],"prefer-named-capture-group":"off","prefer-regex-literals":"error",radix:"error","require-await":"off","require-unicode-regexp":"off","vars-on-top":"error","wrap-iife":["error","outside",{functionPrototypeMethods:!1}],yoda:"error","dot-notation":["error",{allowKeywords:!0}]}},r=e;
4
-
5
- exports.a = r;
6
- //# sourceMappingURL=out.js.map
7
- //# sourceMappingURL=chunk-5S3UQ6WJ.js.map