@anolilab/eslint-config 11.1.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +12 -5
  3. package/bin/generate-eslint-cofig.js +2 -0
  4. package/dist/chunk-MFE6DF6Y.js +8 -0
  5. package/dist/config/best-practices.js +1 -1
  6. package/dist/config/errors.js +1 -1
  7. package/dist/config/es6.js +1 -1
  8. package/dist/config/plugins/antfu.js +1 -1
  9. package/dist/config/plugins/array-func.js +1 -1
  10. package/dist/config/plugins/ava.js +1 -1
  11. package/dist/config/plugins/babel.js +1 -1
  12. package/dist/config/plugins/compat.js +1 -1
  13. package/dist/config/plugins/cypress.js +1 -1
  14. package/dist/config/plugins/editorconfig.js +1 -1
  15. package/dist/config/plugins/es.js +1 -1
  16. package/dist/config/plugins/eslint-comments.js +1 -1
  17. package/dist/config/plugins/etc.js +1 -1
  18. package/dist/config/plugins/html.js +1 -1
  19. package/dist/config/plugins/import.js +1 -1
  20. package/dist/config/plugins/jest-async.js +1 -1
  21. package/dist/config/plugins/jest-dom.js +1 -1
  22. package/dist/config/plugins/jest-formatting.js +1 -1
  23. package/dist/config/plugins/jest.js +1 -1
  24. package/dist/config/plugins/jsdoc.js +1 -1
  25. package/dist/config/plugins/jsonc.js +1 -1
  26. package/dist/config/plugins/jsx-a11y.js +1 -1
  27. package/dist/config/plugins/lodash-fp.js +1 -1
  28. package/dist/config/plugins/lodash.js +1 -1
  29. package/dist/config/plugins/markdown.js +1 -1
  30. package/dist/config/plugins/mdx.js +1 -1
  31. package/dist/config/plugins/no-extend-native.js +1 -1
  32. package/dist/config/plugins/no-loops.js +1 -1
  33. package/dist/config/plugins/no-secrets.js +1 -1
  34. package/dist/config/plugins/no-unsanitized.js +1 -1
  35. package/dist/config/plugins/node.js +1 -1
  36. package/dist/config/plugins/perfectionist.js +1 -1
  37. package/dist/config/plugins/playwright.js +1 -1
  38. package/dist/config/plugins/promise.js +1 -1
  39. package/dist/config/plugins/react-hooks.js +1 -1
  40. package/dist/config/plugins/react-redux.js +1 -1
  41. package/dist/config/plugins/react-usememo.js +1 -1
  42. package/dist/config/plugins/react.js +1 -1
  43. package/dist/config/plugins/regexp.js +1 -1
  44. package/dist/config/plugins/security.js +1 -1
  45. package/dist/config/plugins/simple-import-sort.js +1 -1
  46. package/dist/config/plugins/sonarjs.js +1 -1
  47. package/dist/config/plugins/storybook.js +1 -1
  48. package/dist/config/plugins/tailwindcss.js +1 -1
  49. package/dist/config/plugins/tanstack-query.js +1 -1
  50. package/dist/config/plugins/testing-library-dom.js +1 -1
  51. package/dist/config/plugins/testing-library-react.js +1 -1
  52. package/dist/config/plugins/toml.js +1 -1
  53. package/dist/config/plugins/tsdoc.js +1 -1
  54. package/dist/config/plugins/typescript.js +1 -1
  55. package/dist/config/plugins/unicorn.js +1 -1
  56. package/dist/config/plugins/vitest.js +1 -1
  57. package/dist/config/plugins/yml.js +1 -1
  58. package/dist/config/plugins/you-dont-need-lodash-underscore.js +1 -1
  59. package/dist/config/plugins/you-dont-need-momentjs.js +1 -1
  60. package/dist/config/plugins/zod.js +1 -1
  61. package/dist/config/style.js +1 -1
  62. package/dist/config/variables.js +1 -1
  63. package/dist/define-config.d.ts +1 -0
  64. package/dist/define-config.js +17 -0
  65. package/dist/define-config.js.map +1 -0
  66. package/dist/globals.js +1 -1
  67. package/dist/index.js +1 -1
  68. package/dist/postinstall.js +16 -14
  69. package/dist/postinstall.js.map +1 -1
  70. package/dist/typescript-type-checking.js +1 -1
  71. package/package.json +14 -4
  72. package/dist/chunk-3NVDJZNH.js +0 -7
  73. /package/dist/{chunk-3NVDJZNH.js.map → chunk-MFE6DF6Y.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## @anolilab/eslint-config [11.2.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.1.0...@anolilab/eslint-config@11.2.0) (2023-08-03)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add eslint-define-config and bin command for auto-generation of config ([f9c84ab](https://github.com/anolilab/javascript-style-guide/commit/f9c84ab23a2000552a9eeac771078555163aefe9))
7
+
8
+
9
+ ### Styles
10
+
11
+ * fixed bin file ([5b25641](https://github.com/anolilab/javascript-style-guide/commit/5b25641e1038f76c6831a477318e3d1b46f0d4b0))
12
+
1
13
  ## @anolilab/eslint-config [11.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.0.3...@anolilab/eslint-config@11.1.0) (2023-08-02)
2
14
 
3
15
 
package/README.md CHANGED
@@ -43,6 +43,7 @@ In summary, our package provides comprehensive and adaptable ESLint configuratio
43
43
  - Automatically enables rules based on the [engines](https://docs.npmjs.com/files/package.json#engines) field in your package.json.
44
44
  - Specify indent and semicolon preferences easily without messing with the rule config.
45
45
  - Disables rules that conflict with [Prettier](#let-prettier-handle-style-related-rules).
46
+ - Typesafe, because it's written in TypeScript and uses [eslint-define-config](https://github.com/Shinigami92/eslint-define-config) to define the config.
46
47
 
47
48
  ## Install
48
49
 
@@ -68,14 +69,17 @@ If you already have a `.eslintrc.js`, then you can extend the `.eslintrc.js`, wi
68
69
 
69
70
  > Note: If the script detects an existing `.eslintrc.js` file, it will not overwrite it.
70
71
 
71
- > Note: It can happen that the postinstall script don't run, then you have to add the `.eslintrc.js` manually.
72
+ > Note: It can happen that the postinstall script don't run, then you have to add the `.eslintrc.js` manually, or you will use bin command `./node_modules/bin/anolilab-eslint-config` to generate it.
72
73
 
73
74
  > Note: Our default export contains all of our ESLint rules, including ECMAScript 6+. `@anolilab/eslint-config` use the `ecmaVersion`:`2021` as default.
74
75
  >
75
76
  > To change this configuration, change `env: { es2021: false, then active you needed env }` same for, `parserOptions: { "ecmaVersion": 2021 change the version }`
76
77
 
77
78
  ```js
78
- module.exports = {
79
+ /** @ts-check */
80
+ const { defineConfig } = require('@anolilab/eslint-config/define-config');
81
+
82
+ module.exports = defineConfig({
79
83
  env: {
80
84
  // Your environments (which contains several predefined global variables)
81
85
  //
@@ -95,7 +99,7 @@ module.exports = {
95
99
  rules: {
96
100
  // Customize your rules
97
101
  },
98
- };
102
+ });
99
103
  ```
100
104
 
101
105
  For more advanced use cases see the example configurations for Node, TypeScript, React or Prettier.
@@ -124,7 +128,10 @@ For projects that use TypeScript and want additional rules that require type inf
124
128
  Extend the `.eslintrc.js` file:
125
129
 
126
130
  ```js
127
- module.children = {
131
+ /** @ts-check */
132
+ const { defineConfig } = require('@anolilab/eslint-config/define-config');
133
+
134
+ module.exports = defineConfig({
128
135
  env: {
129
136
  // Your environments (which contains several predefined global variables)
130
137
  //
@@ -144,7 +151,7 @@ module.children = {
144
151
  rules: {
145
152
  // Customize your rules
146
153
  },
147
- };
154
+ });
148
155
  ```
149
156
 
150
157
  > Tip: Run eslint with the TIMING=1 to identify slow rules.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require("../dist/postinstall");
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var c=(b,a)=>()=>(b&&(a=b(b=0)),a);var d=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);
4
+
5
+ exports.a = c;
6
+ exports.b = d;
7
+ //# sourceMappingURL=out.js.map
8
+ //# sourceMappingURL=chunk-MFE6DF6Y.js.map
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk2L7ILCIC_js = require('../chunk-2L7ILCIC.js');
4
- require('../chunk-3NVDJZNH.js');
4
+ require('../chunk-MFE6DF6Y.js');
5
5
 
6
6
 
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkMGBRUNOT_js = require('../chunk-MGBRUNOT.js');
4
4
  require('../chunk-WG6GTAIA.js');
5
- require('../chunk-3NVDJZNH.js');
5
+ require('../chunk-MFE6DF6Y.js');
6
6
 
7
7
 
8
8
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKKHL2OSJ_js = require('../chunk-KKHL2OSJ.js');
4
- require('../chunk-3NVDJZNH.js');
4
+ require('../chunk-MFE6DF6Y.js');
5
5
 
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
  var packageJsonUtils = require('@anolilab/package-json-utils');
6
6
 
7
7
  var t=chunkWG6GTAIA_js.a("all",{plugins:["antfu"],rules:{"antfu/generic-spacing":"error","antfu/if-newline":"error","antfu/import-dedupe":"error","antfu/no-cjs-exports":packageJsonUtils.packageIsTypeModule?"error":"off","antfu/no-ts-export-equal":packageJsonUtils.hasTypescript?"error":"off","antfu/prefer-inline-type-import":"off","antfu/top-level-function":"off"}}),i=t;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var e=chunkWG6GTAIA_js.a("all",{extends:["plugin:array-func/recommended"],plugins:["array-func"],rules:{"array-func/prefer-array-from":"off","array-func/prefer-flat":0,"array-func/prefer-flat-map":0}}),a=e;
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={overrides:[{env:{es6:!0},extends:"plugin:ava/recommended",files:["test.js","src/test.js","source/test.js","**/test-*.js","**/*.spec.js","**/*.test.js","**/test/**/*.js","**/tests/**/*.js","**/__tests__/**/*.js"],parserOptions:{ecmaVersion:"latest",sourceType:"module"},plugins:["ava"]}]},s=e;
6
6
 
@@ -6,7 +6,7 @@ require('../../chunk-OCCLNRZC.js');
6
6
  var chunk2L7ILCIC_js = require('../../chunk-2L7ILCIC.js');
7
7
  var chunkMGBRUNOT_js = require('../../chunk-MGBRUNOT.js');
8
8
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
9
- require('../../chunk-3NVDJZNH.js');
9
+ require('../../chunk-MFE6DF6Y.js');
10
10
  var packageJsonUtils = require('@anolilab/package-json-utils');
11
11
 
12
12
  var n=chunk2L7ILCIC_js.a.rules,r=chunkMGBRUNOT_js.a.rules,e=chunkKP2UPQGN_js.a.rules;global.anolilabEslintConfigBabelPrettierRules===void 0&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.anolilabEslintConfigBabelPrettierRules={"@babel/object-curly-spacing":"off","@babel/semi":"off","babel/quotes":0});var f=chunkWG6GTAIA_js.a("all",{plugins:["babel"],rules:{"babel/camelcase":[...e.camelcase],"babel/new-cap":e["new-cap"],"babel/no-invalid-this":n["no-invalid-this"],"babel/no-unused-expressions":n["no-unused-expressions"],"babel/object-curly-spacing":e["object-curly-spacing"],"babel/quotes":e.quotes,"babel/semi":e.semi,"babel/valid-typeof":r["valid-typeof"],camelcase:"off","new-cap":"off","no-invalid-this":"off","no-unused-expressions":"off","object-curly-spacing":"off",quotes:"off",semi:"off","valid-typeof":"off",...global.anolilabEslintConfigBabelPrettierRules}}),d=f;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:compat/recommended"]},t=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={env:{"cypress/globals":!0},extends:["plugin:cypress/recommended"],plugins:["cypress"],rules:{"cypress/assertion-before-screenshot":0,"cypress/no-force":0,"cypress/require-data-selectors":0}},s=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var o=chunkWG6GTAIA_js.a("all",{extends:["plugin:editorconfig/all"],plugins:["editorconfig"]}),e=o;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var t=chunkWG6GTAIA_js.a("all",{plugins:["es-x"],settings:{es:{aggressive:!0}}}),r=t;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var n=chunkWG6GTAIA_js.a("all",{extends:["plugin:eslint-comments/recommended"],plugins:["eslint-comments"],rules:{"eslint-comments/no-restricted-disable":"off","eslint-comments/no-unlimited-disable":"off","eslint-comments/no-unused-disable":"error","eslint-comments/no-unused-enable":"error","eslint-comments/no-use":"off","eslint-comments/require-description":"off"}}),o=n;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var t=chunkWG6GTAIA_js.a("typescript",{extends:["plugin:etc/recommended"],plugins:["etc"]}),n=t;
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkO7JDC6TD_js = require('../../chunk-O7JDC6TD.js');
4
4
  require('../../chunk-OCCLNRZC.js');
5
- require('../../chunk-3NVDJZNH.js');
5
+ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
8
8
  !global.hasAnolilabEsLintConfigPrettier&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.hasAnolilabEsLintConfigPrettier=!0);global.hasAnolilabEsLintConfigPrettier&&(global.anolilabEslintConfigHtmlPrettierRules={"@html-eslint/element-newline":"off","@html-eslint/indent":"off","@html-eslint/no-extra-spacing-attrs":"off","@html-eslint/quotes":"off"},global.anolilabEslintConfigHtmlPrettierSettings={"html/report-bad-indent":"off"});var e={};global.hasAnolilabEsLintConfigPrettier||(e={"html/indent":`+${chunkO7JDC6TD_js.a}`});var n={overrides:[{extends:["plugin:@html-eslint/recommended"],files:["*.erb","*.handlebars","*.hbs","*.htm","*.html","*.mustache","*.nunjucks","*.php","*.tag","*.twig","*.we"],globals:{sourceCode:!0},parser:"@html-eslint/parser",plugins:["html","@html-eslint"],rules:{"@html-eslint/indent":["error",chunkO7JDC6TD_js.a],"capitalized-comments":"off","spaced-comment":"off",...global.anolilabEslintConfigHtmlPrettierRules},settings:{"html/report-bad-indent":"error",...e,...global.anolilabEslintConfigHtmlPrettierSettings}}]},s=n;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
  var packageJsonUtils = require('@anolilab/package-json-utils');
6
6
 
7
7
  var t=chunkWG6GTAIA_js.b([{config:{env:{es6:!0},parserOptions:{ecmaVersion:6,sourceType:"module"},plugins:["import"],rules:{"import/consistent-type-specifier-style":["error","prefer-top-level"],"import/default":"off","import/dynamic-import-chunkname":["off",{importFunctions:[],webpackChunknameFormat:"[0-9a-zA-Z-_/.]+"}],"import/export":"error","import/exports-last":"error","import/extensions":["error","ignorePackages",{cjs:"never",js:"never",jsx:"never",mjs:"never"}],"import/first":"error","import/group-exports":"off","import/imports-first":"off","import/max-dependencies":["off",{max:10}],"import/named":"error","import/namespace":"off","import/newline-after-import":"error","import/no-absolute-path":"error","import/no-amd":"error","import/no-anonymous-default-export":["off",{allowAnonymousClass:!1,allowAnonymousFunction:!1,allowArray:!1,allowArrowFunction:!1,allowLiteral:!1,allowObject:!1}],"import/no-commonjs":"off","import/no-cycle":["error",{maxDepth:"\u221E"}],"import/no-default-export":"off","import/no-deprecated":"off","import/no-duplicates":"error","import/no-dynamic-require":"error","import/no-empty-named-blocks":"error","import/no-extraneous-dependencies":["error",{devDependencies:["test/**","tests/**","spec/**","**/fixture/**","**/__mocks__/**","test.{js,jsx}","test-*.{js,jsx}","**/*{.,_}{test,spec}.{js,jsx}","**/jest.config.cjs","**/jest.setup.js","**/vue.config.cjs","**/webpack.config.cjs","**/webpack.config.*.js","**/rollup.config.cjs","**/rollup.config.*.js","**/gulpfile.js","**/gulpfile.*.js","**/Gruntfile{,.js}","**/protractor.conf.js","**/protractor.conf.*.js","**/karma.conf.js","**/.eslintrc.js","**/.eslintrc.cjs","**/.eslintrc.mjs","**/vite.config.js","**/vite.config.ts","**/vitest.config.js","**/vitest.config.ts","**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],optionalDependencies:!1}],"import/no-internal-modules":["off",{allow:[]}],"import/no-mutable-exports":"error","import/no-named-as-default":"error","import/no-named-as-default-member":"error","import/no-named-default":"error","import/no-named-export":"off","import/no-namespace":"error","import/no-nodejs-modules":"off","import/no-relative-parent-imports":"off","import/no-restricted-paths":"off","import/no-self-import":"error","import/no-unassigned-import":"off","import/no-unresolved":["error",{caseSensitive:!0,commonjs:!0}],"import/no-unused-modules":"off","import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/no-webpack-loader-syntax":"error","import/order":["error",{groups:[["builtin","external","internal"]]}],"import/prefer-default-export":"error","import/unambiguous":"off"},settings:{"import/core-modules":[],"import/extensions":[".js",".cjs",".mjs",".jsx"],"import/ignore":["\\.(coffee|scss|css|less|hbs|svg|json)$"],"import/resolver":{node:{extensions:[".mjs",".js",".json"]},...packageJsonUtils.hasTypescript?{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}:{}}}},type:"all"},{config:{extends:["plugin:import/typescript"],rules:{"import/default":"off","import/export":"off","import/extensions":["error","ignorePackages",{js:"never",jsx:"never",mjs:"never",ts:"never",tsx:"never"}],"import/named":"off","import/no-unresolved":"off"},settings:{"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts",".cjs",".cts",".mts"],"import/external-module-folders":["node_modules","node_modules/@types"],"import/parsers":{"@typescript-eslint/parser":[".ts",".cts",".mts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}}}},type:"typescript"},{config:{rules:{"import/no-duplicates":"off"}},type:"d.ts"}]),i=t;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={plugins:["jest-async"],rules:{"jest-async/expect-return":"error"}},t=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:jest-dom/recommended"]},t=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:jest-formatting/recommended"]},t=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
  var e = require('globals');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkSEYYGHPU_js = require('../../chunk-SEYYGHPU.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
  var packageJsonUtils = require('@anolilab/package-json-utils');
6
6
 
7
7
  global.anolilabEslintConfigJsDocRules===void 0&&packageJsonUtils.hasTypescript&&(packageJsonUtils.hasDependency("eslint-plugin-tsdoc")||packageJsonUtils.hasDevDependency("eslint-plugin-tsdoc")?chunkSEYYGHPU_js.b(`
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkSEYYGHPU_js = require('../../chunk-SEYYGHPU.js');
4
4
  var chunkOCCLNRZC_js = require('../../chunk-OCCLNRZC.js');
5
- require('../../chunk-3NVDJZNH.js');
5
+ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
  var process = require('process');
8
8
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
5
5
 
6
6
  !global.hasAnolilabEsLintConfigJsyA11yStorybook&&(packageJsonUtils.hasDevDependency("storybook")||packageJsonUtils.hasDependency("storybook"))&&(global.hasAnolilabEsLintConfigJsyA11yStorybook=!0);var o={parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["jsx-a11y","react"],rules:{"jsx-a11y/accessible-emoji":"off","jsx-a11y/alt-text":["error",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["error",{components:[]}],"jsx-a11y/anchor-is-valid":["error",{aspects:["noHref","invalidHref","preferButton",...global.hasAnolilabEsLintConfigJsyA11yStorybook?["overrideParams","kind","story","to"]:[]],components:["A","LinkTo","Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":"error","jsx-a11y/aria-props":"error","jsx-a11y/aria-proptypes":"error","jsx-a11y/aria-role":["error",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":"error","jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":"error","jsx-a11y/control-has-associated-label":["error",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["error",{components:[""]}],"jsx-a11y/html-has-lang":"error","jsx-a11y/iframe-has-title":"error","jsx-a11y/img-redundant-alt":"error","jsx-a11y/interactive-supports-focus":"error","jsx-a11y/label-has-associated-control":["error",{assert:"both",controlComponents:[],depth:25,labelAttributes:[],labelComponents:[]}],"jsx-a11y/label-has-for":["off",{allowChildren:!1,components:[],required:{every:["nesting","id"]}}],"jsx-a11y/lang":"error","jsx-a11y/media-has-caption":["error",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":"error","jsx-a11y/no-access-key":"error","jsx-a11y/no-autofocus":["error",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["error",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["error",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["error",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["error",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-onchange":"off","jsx-a11y/no-redundant-roles":"error","jsx-a11y/no-static-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":"error","jsx-a11y/role-supports-aria-props":"error","jsx-a11y/scope":"error","jsx-a11y/tabindex-no-positive":"error"}},n=o;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:lodash-fp/recommended"],plugins:["lodash-fp"],rules:{"lodash-fp/use-fp":"off"}},o=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={plugins:["lodash"],rules:{"lodash/callback-binding":2,"lodash/chain-style":[2,"as-needed"],"lodash/chaining":2,"lodash/collection-method-value":2,"lodash/collection-ordering":2,"lodash/collection-return":2,"lodash/consistent-compose":[2,"flow"],"lodash/identity-shorthand":[2,"always"],"lodash/import-scope":[2],"lodash/matches-prop-shorthand":[2,"always"],"lodash/matches-shorthand":[2,"always",3],"lodash/no-commit":2,"lodash/no-double-unwrap":2,"lodash/no-extra-args":2,"lodash/no-unbound-this":2,"lodash/path-style":[2,"string"],"lodash/prefer-compact":2,"lodash/prefer-constant":0,"lodash/prefer-filter":[2,3],"lodash/prefer-find":2,"lodash/prefer-flat-map":2,"lodash/prefer-get":0,"lodash/prefer-immutable-method":2,"lodash/prefer-includes":0,"lodash/prefer-invoke-map":2,"lodash/prefer-is-nil":0,"lodash/prefer-lodash-chain":0,"lodash/prefer-lodash-method":0,"lodash/prefer-lodash-typecheck":0,"lodash/prefer-map":2,"lodash/prefer-matches":0,"lodash/prefer-noop":2,"lodash/prefer-over-quantifier":0,"lodash/prefer-reject":[2,3],"lodash/prefer-some":0,"lodash/prefer-startswith":0,"lodash/prefer-thru":2,"lodash/prefer-times":0,"lodash/prefer-wrapper-method":2,"lodash/preferred-alias":2,"lodash/prop-shorthand":[2,"always"],"lodash/unwrap":2}},o=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var o=chunkWG6GTAIA_js.b([{config:{extends:"plugin:markdown/recommended",plugins:["markdown"],processor:"markdown/markdown"},type:"markdown"},{config:{extends:"plugin:markdown/recommended",parserOptions:{ecmacFeatures:{impliedStrict:!0}},plugins:["markdown"],processor:"markdown/markdown",rules:{"@typescript-eslint/comma-dangle":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","global-require":"off","import/no-unresolved":"off","import/order":"off","no-alert":"off","no-console":"off","no-restricted-imports":"off","no-undef":"off","no-unused-expressions":"off","no-unused-vars":"off","prefer-reflect":"off","sonar/no-dead-store":"off",strict:"off"}},type:"markdown_inline_js_jsx"}]),n=o;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var o=chunkWG6GTAIA_js.a("mdx",{extends:["plugin:mdx/recommended"],parser:"eslint-mdx",parserOptions:{ecmaVersion:"latest"},processor:"mdx/remark",rules:{"@typescript-eslint/comma-dangle":"off","@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","global-require":"off","import/namespace":"off","import/no-extraneous-dependencies":"off","import/no-unresolved":"off","import/order":"off","no-alert":"off","no-console":"off","no-restricted-imports":"off","no-undef":"off","no-unused-expressions":"off","no-unused-vars":"off","prefer-reflect":"off","react/jsx-no-undef":"off","react-hooks/rules-of-hooks":"off","sonar/no-dead-store":"off"},settings:{"mdx/code-blocks":!0}}),f=o;
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={plugins:["no-use-extend-native"],rules:{"no-use-extend-native/no-use-extend-native":"error"}},n=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var o={plugins:["no-loops"],rules:{"no-loops/no-loops":2}},n=o;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={overrides:[{excludedFiles:["package.json","**/package.json","package-lock.json","**/package-lock.json","tsconfig.json","**/tsconfig.json"],files:["*","*/**"],plugins:["no-secrets"],rules:{"no-secrets/no-secrets":"error"}}]},o=e;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var n={plugins:["no-unsanitized"],rules:{"no-unsanitized/method":"error","no-unsanitized/property":"error"}},e=n;
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
5
5
 
6
6
  if(global.anolilabEslintConfigNodeRules===void 0&&packageJsonUtils.pkg?.engines?.node){let n=packageJsonUtils.pkg.engines.node;global.anolilabEslintConfigNodeRules={"n/no-unsupported-features/es-builtins":["error",{version:n}],"n/no-unsupported-features/es-syntax":["error",{ignores:["modules"],version:n}],"n/no-unsupported-features/node-builtins":["error",{version:n}]};}var o={env:{node:!0},extends:["plugin:n/recommended"],parserOptions:{ecmaVersion:2021},plugins:["n"],rules:{"global-require":"error","n/callback-return":"off","n/file-extension-in-import":"off","n/handle-callback-err":"off","n/no-extraneous-import":"off","n/no-extraneous-require":"off","n/no-missing-import":"off","n/no-missing-require":"off","n/no-mixed-requires":["error",{allowCall:!0,grouping:!0}],"n/no-new-require":"error","n/no-process-env":"off","n/no-process-exit":"off","n/no-restricted-modules":"off","n/no-sync":"off","n/no-unpublished-bin":"error","n/process-exit-as-throw":"error","no-buffer-constructor":"error","no-path-concat":"error",...global.anolilabEslintConfigNodeRules}},i=o;
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkSEYYGHPU_js = require('../../chunk-SEYYGHPU.js');
4
4
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
5
- require('../../chunk-3NVDJZNH.js');
5
+ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
8
8
  !global.hasAnolilabEsLintConfigPerfectionistTypescriptSortKeys&&(packageJsonUtils.hasDependency("eslint-plugin-typescript-sort-keys")||packageJsonUtils.hasDevDependency("eslint-plugin-typescript-sort-keys"))&&(global.hasAnolilabEsLintConfigPerfectionistTypescriptSortKeys=!0,chunkSEYYGHPU_js.b(`
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
5
5
 
6
6
  !global.hasAnolilabEsLintConfigPlaywrightJest&&(packageJsonUtils.hasDependency("jest")||packageJsonUtils.hasDevDependency("jest")||packageJsonUtils.hasDevDependency("eslint-plugin-jest")||packageJsonUtils.hasDevDependency("eslint-plugin-jest")||packageJsonUtils.hasDevDependency("@types/jest")||packageJsonUtils.hasDevDependency("@types/jest"))&&(global.hasAnolilabEsLintConfigPlaywrightJest=!0);var s={env:{browser:!0,es6:!0,node:!0},overrides:[{extends:[global.hasAnolilabEsLintConfigPlaywrightJest?"plugin:playwright/jest-playwright":"plugin:playwright/recommended"],files:["**/e2e/**/*.test.{js,ts}"],rules:{"@typescript-eslint/no-empty-function":"off","@typescript-eslint/no-non-null-assertion":"off","@typescript-eslint/no-object-literal-type-assertion":"off"}}]},i=s;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:promise/recommended"],plugins:["promise"],rules:{"promise/prefer-await-to-callbacks":"off","promise/prefer-await-to-then":"off"}},o=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var r=chunkWG6GTAIA_js.a("jsx_and_tsx",{parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["react-hooks"],rules:{"react-hooks/exhaustive-deps":"error","react-hooks/rules-of-hooks":"error"}}),t=r;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var r=chunkWG6GTAIA_js.a("jsx_and_tsx",{extends:["plugin:react-redux/recommended"],plugins:["react-redux"],rules:{"react-redux/mapStateToProps-prefer-selectors":"off","react-redux/prefer-separate-component-file":"off"}}),o=r;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var r=chunkWG6GTAIA_js.a("jsx_and_tsx",{parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["@arthurgeron/react-usememo"],rules:{"@arthurgeron/react-usememo/require-usememo":"error"}}),o=r;
7
7
 
@@ -5,7 +5,7 @@ var chunkKP2UPQGN_js = require('../../chunk-KP2UPQGN.js');
5
5
  var chunkO7JDC6TD_js = require('../../chunk-O7JDC6TD.js');
6
6
  var chunkOCCLNRZC_js = require('../../chunk-OCCLNRZC.js');
7
7
  require('../../chunk-WG6GTAIA.js');
8
- require('../../chunk-3NVDJZNH.js');
8
+ require('../../chunk-MFE6DF6Y.js');
9
9
  var packageJsonUtils = require('@anolilab/package-json-utils');
10
10
  var u = require('find-up');
11
11
  var process = require('process');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var n=chunkWG6GTAIA_js.a("all",{extends:["plugin:regexp/recommended"],plugins:["regexp"]}),t=n;
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={extends:["plugin:security/recommended"],plugins:["@rushstack/eslint-plugin-security"],rules:{"@rushstack/security/no-unsafe-regexp":process.env.TRUSTED_TOOL?"off":"warn"}},n=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var o=chunkWG6GTAIA_js.a("all",{env:{es6:!0},parserOptions:{sourceType:"module"},plugins:["simple-import-sort"],rules:{"import/first":"error","import/newline-after-import":"error","import/no-duplicates":"error","simple-import-sort/exports":"off","simple-import-sort/imports":"off"}}),t=o;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var e=chunkWG6GTAIA_js.b([{config:{excludedFiles:["**/?(*.)+(test).{js,jsx,ts,tsx}","*.stories.{js,ts,jsx,tsx}"],extends:["plugin:sonarjs/recommended"],rules:{"sonarjs/no-nested-template-literals":"off"}},type:"all"},{config:{rules:{"sonarjs/cognitive-complexity":["error",15],"sonarjs/no-duplicate-string":"off"}},type:"js_and_ts"},{config:{parser:"espree",parserOptions:{ecmaVersion:2020},rules:{"sonarjs/no-all-duplicated-branches":"off","sonarjs/no-duplicate-string":"off"}},type:"javascript"}]),o=e;
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={env:{browser:!0,es6:!0,node:!0},overrides:[{extends:["plugin:storybook/recommended"],files:["**/*.stories.{ts,tsx,mdx}"]}]},t=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var t=chunkWG6GTAIA_js.a("jsx_and_tsx",{extends:["plugin:tailwindcss/recommended"],plugins:["tailwindcss"]},{browser:!0,es6:!0,node:!0}),i=t;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var t=chunkWG6GTAIA_js.a("all",{extends:["plugin:@tanstack/eslint-plugin-query/recommended"]}),i=t;
7
7
 
@@ -3,7 +3,7 @@
3
3
  var chunkSEYYGHPU_js = require('../../chunk-SEYYGHPU.js');
4
4
  var chunkOCCLNRZC_js = require('../../chunk-OCCLNRZC.js');
5
5
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
6
- require('../../chunk-3NVDJZNH.js');
6
+ require('../../chunk-MFE6DF6Y.js');
7
7
 
8
8
  global.hasAnolilabEsLintTestConfigLoaded||(chunkOCCLNRZC_js.a.info_on_testing_library_framework!==!1&&chunkSEYYGHPU_js.a('testing-library: loading "dom" ruleset'),global.hasAnolilabEsLintTestConfigLoaded=!0);var e=chunkWG6GTAIA_js.a("tests",{extends:["plugin:testing-library/dom"]},{browser:!0,es6:!0,node:!0}),s=e;
9
9
 
@@ -3,7 +3,7 @@
3
3
  var chunkSEYYGHPU_js = require('../../chunk-SEYYGHPU.js');
4
4
  var chunkOCCLNRZC_js = require('../../chunk-OCCLNRZC.js');
5
5
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
6
- require('../../chunk-3NVDJZNH.js');
6
+ require('../../chunk-MFE6DF6Y.js');
7
7
 
8
8
  global.hasAnolilabEsLintTestConfigLoaded||(chunkOCCLNRZC_js.a.info_on_testing_library_framework!==!1&&chunkSEYYGHPU_js.a('testing-library: loading "react" ruleset'),global.hasAnolilabEsLintTestConfigLoaded=!0);var o=chunkWG6GTAIA_js.a("tests",{extends:["plugin:testing-library/react"]},{browser:!0,es6:!0,node:!0}),a=o;
9
9
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var e={overrides:[{extends:["plugin:toml/standard"],files:["*.toml"],parser:"toml-eslint-parser"}]},t=e;
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var r=chunkWG6GTAIA_js.a("typescript",{plugins:["eslint-plugin-tsdoc"],rules:{"tsdoc/syntax":"error"}}),i=r;
7
7
 
@@ -8,7 +8,7 @@ var chunkOCCLNRZC_js = require('../../chunk-OCCLNRZC.js');
8
8
  var chunk2L7ILCIC_js = require('../../chunk-2L7ILCIC.js');
9
9
  var chunkMGBRUNOT_js = require('../../chunk-MGBRUNOT.js');
10
10
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
11
- require('../../chunk-3NVDJZNH.js');
11
+ require('../../chunk-MFE6DF6Y.js');
12
12
  var packageJsonUtils = require('@anolilab/package-json-utils');
13
13
  var process = require('process');
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkO7JDC6TD_js = require('../../chunk-O7JDC6TD.js');
4
4
  require('../../chunk-OCCLNRZC.js');
5
- require('../../chunk-3NVDJZNH.js');
5
+ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
  var i = require('semver');
8
8
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('../../chunk-3NVDJZNH.js');
3
+ require('../../chunk-MFE6DF6Y.js');
4
4
 
5
5
  var t={overrides:[{extends:["plugin:vitest/recommended","plugin:vitest/all"],files:["**/__tests__/**/*.?(c|m)[jt]s?(x)","**/?(*.){test,spec}.?(c|m)[jt]s?(x)"],plugins:["vitest"],rules:{"vitest/max-expects":"off","vitest/no-hooks":"off","vitest/no-mocks-import":"off","vitest/no-restricted-vi-methods":"off","vitest/no-standalone-expect":"error","vitest/valid-expect":["error",{alwaysAwait:!0,maxArgs:2,minArgs:1}]}}]},e=t;
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkO7JDC6TD_js = require('../../chunk-O7JDC6TD.js');
4
4
  require('../../chunk-OCCLNRZC.js');
5
- require('../../chunk-3NVDJZNH.js');
5
+ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
8
8
  !global.hasAnolilabEsLintConfigPrettier&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.hasAnolilabEsLintConfigPrettier=!0);var t={overrides:[{extends:["plugin:yml/recommended",...global.hasAnolilabEsLintConfigPrettier?["plugin:yml/prettier"]:[]],files:["*.yaml","*.yml"],parser:"yaml-eslint-parser",rules:{indent:[global.hasAnolilabEsLintConfigPrettier?"off":"error",chunkO7JDC6TD_js.a],"spaced-comment":"off"}}]},o=t;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var o=chunkWG6GTAIA_js.a("all",{extends:["plugin:you-dont-need-lodash-underscore/compatible"]}),n=o;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var n=chunkWG6GTAIA_js.a("all",{extends:["plugin:you-dont-need-momentjs/recommended"]}),t=n;
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
- require('../../chunk-3NVDJZNH.js');
4
+ require('../../chunk-MFE6DF6Y.js');
5
5
 
6
6
  var e=chunkWG6GTAIA_js.a("all",{plugins:["zod"],rules:{"zod/prefer-enum":"error","zod/require-strict":"error"}}),t=e;
7
7
 
@@ -4,7 +4,7 @@ var chunkKP2UPQGN_js = require('../chunk-KP2UPQGN.js');
4
4
  require('../chunk-O7JDC6TD.js');
5
5
  require('../chunk-OCCLNRZC.js');
6
6
  require('../chunk-WG6GTAIA.js');
7
- require('../chunk-3NVDJZNH.js');
7
+ require('../chunk-MFE6DF6Y.js');
8
8
 
9
9
 
10
10
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkZFO6DTP4_js = require('../chunk-ZFO6DTP4.js');
4
- require('../chunk-3NVDJZNH.js');
4
+ require('../chunk-MFE6DF6Y.js');
5
5
 
6
6
 
7
7
 
@@ -0,0 +1 @@
1
+ export { defineConfig, defineFlatConfig } from 'eslint-define-config';
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ require('./chunk-MFE6DF6Y.js');
4
+ var eslintDefineConfig = require('eslint-define-config');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, 'defineConfig', {
9
+ enumerable: true,
10
+ get: function () { return eslintDefineConfig.defineConfig; }
11
+ });
12
+ Object.defineProperty(exports, 'defineFlatConfig', {
13
+ enumerable: true,
14
+ get: function () { return eslintDefineConfig.defineFlatConfig; }
15
+ });
16
+ //# sourceMappingURL=out.js.map
17
+ //# sourceMappingURL=define-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/define-config.ts"],"names":["defineConfig","defineFlatConfig"],"mappings":"4BAAA,OAAS,gBAAAA,EAAc,oBAAAC,MAAwB","sourcesContent":["export { defineConfig, defineFlatConfig } from \"eslint-define-config\";\n"]}
package/dist/globals.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./chunk-3NVDJZNH.js');
3
+ require('./chunk-MFE6DF6Y.js');
4
4
  var s = require('globals');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var chunkSEYYGHPU_js = require('./chunk-SEYYGHPU.js');
4
4
  var chunkOCCLNRZC_js = require('./chunk-OCCLNRZC.js');
5
- require('./chunk-3NVDJZNH.js');
5
+ require('./chunk-MFE6DF6Y.js');
6
6
  require('@rushstack/eslint-patch/modern-module-resolution');
7
7
  var packageJsonUtils = require('@anolilab/package-json-utils');
8
8
  var x = require('globals');
@@ -1,36 +1,37 @@
1
1
  'use strict';
2
2
 
3
- var chunk3NVDJZNH_js = require('./chunk-3NVDJZNH.js');
3
+ var chunkMFE6DF6Y_js = require('./chunk-MFE6DF6Y.js');
4
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
5
5
  var fs = require('fs');
6
6
  var path = require('path');
7
- var process = require('process');
8
7
  var util = require('util');
8
+ var process = require('process');
9
9
 
10
- var $=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 s=".eslintrc",j=async()=>{for(let o of [s,`${s}.js`,`${s}.cjs`,`${s}.json`,`${s}.yaml`,`${s}.yml`])if(fs.existsSync(path.join(packageJsonUtils.projectPath,o))){console.warn(`\u26A0\uFE0F ${o} already exists;
10
+ var $,o,v,g,u=chunkMFE6DF6Y_js.a(()=>{$=util.promisify(fs.writeFile);console.log("Configuring @anolilab/eslint-config",packageJsonUtils.projectPath,`
11
+ `);o=".eslintrc",v=async()=>{for(let s of [o,`${o}.js`,`${o}.cjs`,`${o}.json`,`${o}.yaml`,`${o}.yml`])if(fs.existsSync(path.join(packageJsonUtils.projectPath,s))){console.warn(`\u26A0\uFE0F ${s} already exists;
12
12
  Make sure that it includes the following for @anolilab/eslint-config'
13
- to work as it should: { extends: ["@anolilab/eslint-config"] }.`);return}let t=path.join(packageJsonUtils.projectPath,`.eslintrc.${packageJsonUtils.packageIsTypeModule?"c":""}js`),c="",p=`
13
+ to work as it should: { extends: ["@anolilab/eslint-config"] }.`);return}let t=path.join(packageJsonUtils.projectPath,`.eslintrc.${packageJsonUtils.packageIsTypeModule?"c":""}js`),a="",c=`
14
14
  parserOptions: {
15
15
  ecmaVersion: "latest",
16
16
  sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
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=`
17
+ },`,f=path.join(packageJsonUtils.projectPath,"tsconfig.json"),e="latest";if(fs.existsSync(f)){let s=JSON.parse(fs.readFileSync(f,"utf8"));s.compilerOptions?.target&&(e=s.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=`
18
18
  parserOptions: {
19
19
  project: true,
20
20
  ecmaVersion: ${e==="latest"?`"${e}"`:e},
21
21
  sourceType: ${packageJsonUtils.packageIsTypeModule?'"module"':'"commonjs"'},
22
- },`;}let m=`${["es2015","es2017","es2020","es2021","latest"].includes(e)?`var { globals } = require("@anolilab/eslint-config/globals");
22
+ },`;}let h=`/** @ts-check */
23
+ const { defineConfig } = require('@anolilab/eslint-config/define-config');
24
+ ${["es2015","es2017","es2020","es2021","latest"].includes(e)?`const { globals } = require("@anolilab/eslint-config/globals");
23
25
 
24
- `:""}/** @ts-check */
25
- /** @type {import('eslint').Linter.Config} */
26
- module.exports = {
26
+ `:""}
27
+ module.exports = defineConfig({
27
28
  root: true,
28
- extends: ["@anolilab/eslint-config"${c}],
29
+ extends: ["@anolilab/eslint-config"${a}],
29
30
  ignorePatterns: ["!**/*"],
30
31
  env: {
31
32
  // Your environments (which contains several predefined global variables)
32
33
  // Most environments are loaded automatically if our rules are added
33
- },${p}
34
+ },${c}
34
35
  globals: {${["es2015","es2017","es2020","es2021","latest"].includes(e)?`
35
36
  ...globals.${e==="latest"?"es2021":e},`:""}
36
37
  // Your global variables (setting to false means it's not allowed to be reassigned)
@@ -64,8 +65,9 @@ module.exports = {
64
65
  rules: {},
65
66
  },
66
67
  ],
67
- };
68
- `;await g(t,m,"utf8");},b=async()=>{let t=path.join(packageJsonUtils.projectPath,".eslintignore");if(fs.existsSync(t)){console.warn("\u26A0\uFE0F .eslintignore already exists");return}await g(t,"","utf8");};(async()=>{try{await Promise.all([j(),b()]),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);}})();});var postinstall = $();
68
+ });
69
+ `;await $(t,h,"utf8");},g=v;});var k,E,d,w=chunkMFE6DF6Y_js.a(()=>{k=util.promisify(fs.writeFile),E=async()=>{let t=path.join(packageJsonUtils.projectPath,".eslintignore");if(fs.existsSync(t)){console.warn("\u26A0\uFE0F .eslintignore already exists");return}await k(t,"","utf8");},d=E;});var J=chunkMFE6DF6Y_js.b(()=>{u();w();process.env.CI&&process.exit(0);console.log("Configuring @anolilab/eslint-config",packageJsonUtils.projectPath,`
70
+ `);(async()=>{try{await Promise.all([g(),d()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();});var postinstall = J();
69
71
 
70
72
  module.exports = postinstall;
71
73
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
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,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,gBAAAC,EAAc,aAAAC,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAJ1B,IAAAC,EAAAC,EAAA,KAOIJ,EAAI,IACJC,EAAK,CAAC,EAGV,IAAMI,EAAiBH,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,sCAAuCH,EAAa;AAAA,CAAI,EAEpE,IAAMW,EAAa,YAMbC,EAAgB,SAAY,CAE9B,QAAWC,IAAY,CAACF,EAAY,GAAGA,CAAU,MAAO,GAAGA,CAAU,OAAQ,GAAGA,CAAU,QAAS,GAAGA,CAAU,QAAS,GAAGA,CAAU,MAAM,EAExI,GAAIV,EAAWG,EAAKJ,EAAaa,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,gEAEwB,EAEpD,MACJ,CAGJ,IAAMC,EAAaV,EAAKJ,EAAa,aAAaD,EAAsB,IAAM,EAAE,IAAI,EAEhFgB,EAAgB,GAChBC,EAAgB;AAAA;AAAA;AAAA,sBAGFjB,EAAsB,WAAa,YAAY;AAAA,QAG3DkB,EAAeb,EAAKJ,EAAa,eAAe,EAElDkB,EAAc,SAGlB,GAAIjB,EAAWgB,CAAY,EAAG,CAE1B,IAAME,EAAW,KAAK,MAAMjB,EAAae,EAAc,MAAM,CAAC,EAE1DE,EAAS,iBAAiB,SAC1BD,EAAcC,EAAS,gBAAgB,OAEvCD,EACIA,EAAY,YAAY,IAAM,UAAYA,EAAY,YAAY,IAAM,SAAW,SAAWA,EAAY,YAAY,EAAE,QAAQ,KAAM,EAAE,EAExIA,IAAgB,UAAYA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,MAChGH,EAAgB,gCAAgCG,CAAW,MAInEF,EAAgB;AAAA;AAAA;AAAA,uBAGDE,IAAgB,SAAW,IAAIA,CAAW,IAAMA,CAAW;AAAA,sBAC5DnB,EAAsB,WAAa,YAAY;AAAA,OAEjE,CAEA,IAAMqB,EAAU,GACZ,CAAC,SAAU,SAAU,SAAU,SAAU,QAAQ,EAAE,SAASF,CAAW,EAAI;AAAA;AAAA,EAAsE,EACrJ;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,MAAMR,EAAeI,EAAYM,EAAS,MAAM,CACpD,EAKMC,EAAoB,SAAY,CAClC,IAAMC,EAAmBlB,EAAKJ,EAAa,eAAe,EAG1D,GAAIC,EAAWqB,CAAgB,EAAG,CAC9B,QAAQ,KAAK,4CAAkC,EAE/C,MACJ,CAEA,MAAMZ,EAAeY,EAAkB,GAAI,MAAM,CACrD,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 = async () => {\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;\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: true,\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(\"@anolilab/eslint-config/globals\");\\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 await writeFileAsync(eslintPath, content, \"utf8\");\n};\n\n/**\n * Writes .eslintignore if it doesn't exist. Warns if it exists.\n */\nconst writeEslintIgnore = async () => {\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;\n }\n\n await 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
+ {"version":3,"sources":["../src/postinstall/write-eslint-rc.ts","../src/postinstall/write-eslint-ignore.ts","../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","readFileSync","writeFile","join","promisify","writeFileAsync","configFile","writeEslintRc","write_eslint_rc_default","init_write_eslint_rc","__esmMin","filename","eslintPath","pluginExtends","parserOptions","tsconfigPath","ecmaVersion","tsConfig","content","writeEslintIgnore","write_eslint_ignore_default","init_write_eslint_ignore","eslintIgnorePath","env","exit","require_postinstall","__commonJSMin","error"],"mappings":"+CAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,gBAAAC,EAAc,aAAAC,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAH1B,IAMMC,EAIAC,EAGAC,EAuGCC,EApHPC,EAAAC,EAAA,kBAMML,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,sCAAuCH,EAAa;AAAA,CAAI,EAE9DO,EAAa,YAGbC,EAAgB,SAA2B,CAE7C,QAAWI,IAAY,CAACL,EAAY,GAAGA,CAAU,MAAO,GAAGA,CAAU,OAAQ,GAAGA,CAAU,QAAS,GAAGA,CAAU,QAAS,GAAGA,CAAU,MAAM,EAExI,GAAIN,EAAWG,EAAKJ,EAAaY,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,gEAEwB,EAEpD,MACJ,CAGJ,IAAMC,EAAaT,EAAKJ,EAAa,aAAaD,EAAsB,IAAM,EAAE,IAAI,EAEhFe,EAAgB,GAChBC,EAAgB;AAAA;AAAA;AAAA,sBAGFhB,EAAsB,WAAa,YAAY;AAAA,QAG3DiB,EAAeZ,EAAKJ,EAAa,eAAe,EAElDiB,EAAc,SAGlB,GAAIhB,EAAWe,CAAY,EAAG,CAE1B,IAAME,EAAW,KAAK,MAAMhB,EAAac,EAAc,MAAM,CAAC,EAE1DE,EAAS,iBAAiB,SAC1BD,EAAcC,EAAS,gBAAgB,OAEvCD,EACIA,EAAY,YAAY,IAAM,UAAYA,EAAY,YAAY,IAAM,SAAW,SAAWA,EAAY,YAAY,EAAE,QAAQ,KAAM,EAAE,EAExIA,IAAgB,UAAYA,IAAgB,QAAUA,IAAgB,QAAUA,IAAgB,MAChGH,EAAgB,gCAAgCG,CAAW,MAInEF,EAAgB;AAAA;AAAA;AAAA,uBAGDE,IAAgB,SAAW,IAAIA,CAAW,IAAMA,CAAW;AAAA,sBAC5DlB,EAAsB,WAAa,YAAY;AAAA,OAEjE,CAEA,IAAMoB,EAAU;AAAA;AAAA,EAElB,CAAC,SAAU,SAAU,SAAU,SAAU,QAAQ,EAAE,SAASF,CAAW,EAAI;AAAA;AAAA,EAAwE,EAAE;AAAA;AAAA;AAAA,yCAG9GH,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,MAAMX,EAAeO,EAAYM,EAAS,MAAM,CACpD,EAEOV,EAAQD,ICpHf,OAAS,eAAAR,MAAmB,+BAC5B,OAAS,cAAAC,EAAY,aAAAE,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAH1B,IAKMC,EAEAc,EAaCC,EApBPC,EAAAX,EAAA,kBAKML,EAAiBD,EAAUF,CAAS,EAEpCiB,EAAoB,SAA2B,CACjD,IAAMG,EAAmBnB,EAAKJ,EAAa,eAAe,EAG1D,GAAIC,EAAWsB,CAAgB,EAAG,CAC9B,QAAQ,KAAK,4CAAkC,EAE/C,MACJ,CAEA,MAAMjB,EAAeiB,EAAkB,GAAI,MAAM,CACrD,EAEOF,EAAQD,ICpBf,OAAS,eAAApB,MAAmB,+BAC5B,OAAS,OAAAwB,EAAK,QAAAC,MAAY,UAD1B,IAAAC,EAAAC,EAAA,KAEAjB,IACAY,IAEIE,EAAI,IACJC,EAAK,CAAC,EAGV,QAAQ,IAAI,sCAAuCzB,EAAa;AAAA,CAAI,GAGnE,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACS,EAAc,EAAGY,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAEjDI,EAAK,CAAC,CACV,OAASG,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBH,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 { promisify } from \"node:util\";\nimport type { TsConfigJson } from \"type-fest\";\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\n\");\n\nconst configFile = \".eslintrc\";\n\n// eslint-disable-next-line sonarjs/cognitive-complexity\nconst writeEslintRc = async (): Promise<void> => {\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;\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: true,\n ecmaVersion: ${ecmaVersion === \"latest\" ? `\"${ecmaVersion}\"` : ecmaVersion},\n sourceType: ${packageIsTypeModule ? '\"module\"' : '\"commonjs\"'},\n },`;\n }\n\n const content = `/** @ts-check */\nconst { defineConfig } = require('@anolilab/eslint-config/define-config');\n${[\"es2015\", \"es2017\", \"es2020\", \"es2021\", \"latest\"].includes(ecmaVersion) ? 'const { globals } = require(\"@anolilab/eslint-config/globals\");\\n\\n' : \"\"}\nmodule.exports = defineConfig({\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 await writeFileAsync(eslintPath, content, \"utf8\");\n};\n\nexport default writeEslintRc;\n","import { projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nconst writeFileAsync = promisify(writeFile);\n\nconst writeEslintIgnore = async (): Promise<void> => {\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;\n }\n\n await writeFileAsync(eslintIgnorePath, \"\", \"utf8\");\n};\n\nexport default writeEslintIgnore;\n","import { projectPath } from \"@anolilab/package-json-utils\";\nimport { env, exit } from \"node:process\";\nimport writeEslintRc from \"./postinstall/write-eslint-rc\";\nimport writeEslintIgnore from \"./postinstall/write-eslint-ignore\";\n\nif (env[\"CI\"]) {\n exit(0);\n}\n\nconsole.log(\"Configuring @anolilab/eslint-config\", projectPath, \"\\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"]}
@@ -3,7 +3,7 @@
3
3
  var chunkOCCLNRZC_js = require('./chunk-OCCLNRZC.js');
4
4
  var chunk2L7ILCIC_js = require('./chunk-2L7ILCIC.js');
5
5
  var chunkWG6GTAIA_js = require('./chunk-WG6GTAIA.js');
6
- require('./chunk-3NVDJZNH.js');
6
+ require('./chunk-MFE6DF6Y.js');
7
7
  var process = require('process');
8
8
 
9
9
  var r=chunk2L7ILCIC_js.a.rules,s=process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";chunkOCCLNRZC_js.a.warn_on_unsupported_typescript_version!==void 0&&(s=chunkOCCLNRZC_js.a.warn_on_unsupported_typescript_version);var p=chunkWG6GTAIA_js.a("typescript",{extends:["plugin:@typescript-eslint/recommended-type-checked","plugin:@typescript-eslint/strict-type-checked","plugin:@typescript-eslint/stylistic-type-checked"],parser:"@typescript-eslint/parser",parserOptions:{ecmaFeatures:{jsx:!0},sourceType:"module",warnOnUnsupportedTypeScriptVersion:s},plugins:["@typescript-eslint"],rules:{"@typescript-eslint/await-thenable":"error","@typescript-eslint/consistent-type-exports":["error",{fixMixedExportsWithInlineTypeSpecifier:!0}],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/no-base-to-string":["error",{ignoredTypeNames:["RegExp"]}],"@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!1}],"@typescript-eslint/no-floating-promises":["error",{ignoreIIFE:!0,ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":r["no-implied-eval"],"@typescript-eslint/no-meaningless-void-operator":["error",{checkNever:!0}],"@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksVoidReturn:{arguments:!0,attributes:!1,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-throw-literal":r["no-throw-literal"],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"off","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreConditionalTests:!0,ignoreMixedLogicalExpressions:!0}],"@typescript-eslint/prefer-readonly":["error",{onlyInlineLambdas:!1}],"@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":["error",{ignoreStringArrays:!1}],"@typescript-eslint/require-await":r["require-await"],"@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/return-await":["error","always"],"@typescript-eslint/switch-exhaustiveness-check":"error","@typescript-eslint/unbound-method":["error",{ignoreStatic:!1}]}}),y=p;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "11.1.0",
3
+ "version": "11.2.0",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -79,6 +79,9 @@
79
79
  "url": "https://anolilab.com/support"
80
80
  }
81
81
  ],
82
+ "bin": {
83
+ "anolilab-eslint-config": "./bin/generate-eslint-cofig.js"
84
+ },
82
85
  "license": "MIT",
83
86
  "author": {
84
87
  "name": "Daniel Bannert",
@@ -98,11 +101,16 @@
98
101
  "types": "./dist/globals.d.ts",
99
102
  "require": "./dist/globals.js"
100
103
  },
104
+ "./define-config": {
105
+ "types": "./dist/define-config.d.ts",
106
+ "require": "./dist/define-config.js"
107
+ },
101
108
  "./package.json": "./package.json"
102
109
  },
103
110
  "main": "dist/index.js",
104
111
  "types": "dist/index.d.ts",
105
112
  "files": [
113
+ "bin/generate-eslint-cofig.js",
106
114
  "dist",
107
115
  "skip.js",
108
116
  "globals.js",
@@ -128,6 +136,7 @@
128
136
  "@typescript-eslint/eslint-plugin": ">=6.2.0",
129
137
  "@typescript-eslint/parser": "^6.2.0",
130
138
  "confusing-browser-globals": "^1.0.11",
139
+ "eslint-define-config": "^1.22.0",
131
140
  "eslint-import-resolver-node": "^0.3.7",
132
141
  "eslint-import-resolver-typescript": "^3.5.5",
133
142
  "eslint-plugin-antfu": "^0.40.0",
@@ -172,6 +181,7 @@
172
181
  "eslint-find-rules": "^4.1.0",
173
182
  "eslint-plugin-babel": "^5.3.1",
174
183
  "eslint-plugin-cypress": "^2.13.3",
184
+ "eslint-plugin-editorconfig": "^4.0.3",
175
185
  "eslint-plugin-etc": "^2.0.3",
176
186
  "eslint-plugin-jest": "^27.2.3",
177
187
  "eslint-plugin-jest-async": "^1.0.3",
@@ -182,7 +192,6 @@
182
192
  "eslint-plugin-no-unsanitized": "^4.0.2",
183
193
  "eslint-plugin-prefer-object-spread": "^1.2.1",
184
194
  "eslint-plugin-react": "^7.33.1",
185
- "eslint-plugin-editorconfig": "^4.0.3",
186
195
  "eslint-plugin-react-hooks": "^4.6.0",
187
196
  "eslint-plugin-react-redux": "^4.0.0",
188
197
  "eslint-plugin-storybook": "^0.6.13",
@@ -209,9 +218,9 @@
209
218
  "@tanstack/eslint-plugin-query": "^4.32.1",
210
219
  "eslint-plugin-array-func": "^3.1.8",
211
220
  "eslint-plugin-ava": "^14.0.0",
212
- "eslint-plugin-editorconfig": "^4.0.3",
213
221
  "eslint-plugin-babel": "^5.3.1",
214
222
  "eslint-plugin-cypress": "^2.13.3",
223
+ "eslint-plugin-editorconfig": "^4.0.3",
215
224
  "eslint-plugin-jest": "^27.2.3",
216
225
  "eslint-plugin-jest-async": "^1.0.3",
217
226
  "eslint-plugin-jest-dom": "^5.0.1",
@@ -301,6 +310,7 @@
301
310
  "src/globals.ts",
302
311
  "src/index.ts",
303
312
  "src/postinstall.ts",
304
- "src/typescript-type-checking.ts"
313
+ "src/typescript-type-checking.ts",
314
+ "src/define-config.ts"
305
315
  ]
306
316
  }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var c=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports);
4
-
5
- exports.a = c;
6
- //# sourceMappingURL=out.js.map
7
- //# sourceMappingURL=chunk-3NVDJZNH.js.map