@anolilab/eslint-config 14.0.9 → 14.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ## @anolilab/eslint-config [14.0.11](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@14.0.10...@anolilab/eslint-config@14.0.11) (2023-09-27)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update import/no-useless-path-segments rule and eslint dependency versions ([e265315](https://github.com/anolilab/javascript-style-guide/commit/e265315c4c864d9a23001aee6159017655586ace))
7
+
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * **deps:** update devdependencies ([#766](https://github.com/anolilab/javascript-style-guide/issues/766)) ([ef64bea](https://github.com/anolilab/javascript-style-guide/commit/ef64bea2701995c85b9d1a0ad07ec4da6f7e4b25))
12
+
13
+
14
+
15
+ ### Dependencies
16
+
17
+ * **@anolilab/semantic-release-preset:** upgraded to 7.0.4
18
+
19
+ ## @anolilab/eslint-config [14.0.10](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@14.0.9...@anolilab/eslint-config@14.0.10) (2023-09-26)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * moved @jsenv/eslint-import-resolver from dev to require dependency ([981eb4d](https://github.com/anolilab/javascript-style-guide/commit/981eb4d3e4c3b784f2567e7887a5f1d80b7cf0d2))
25
+ * Updated file patterns in eslint configs to apply to subdirectories ([13ec6fb](https://github.com/anolilab/javascript-style-guide/commit/13ec6fbdc22717204562aa945bf6bda483d2e642))
26
+
1
27
  ## @anolilab/eslint-config [14.0.9](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@14.0.8...@anolilab/eslint-config@14.0.9) (2023-09-26)
2
28
 
3
29
 
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- // eslint-disable-next-line import/extensions
2
+
3
3
  require("../dist/postinstall");
@@ -5,7 +5,7 @@ require('../../chunk-WW4PDMXQ.js');
5
5
  require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
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":`+${chunkR26SPKXH_js.a}`});var i={overrides:[{extends:["plugin:@html-eslint/recommended"],files:["*.erb","*.handlebars","*.hbs","*.htm","*.html","*.mustache","*.nunjucks","*.php","*.tag","*.twig","*.we"],globals:{sourceCode:!0},env:{browser:!0,node:!1},parser:"@html-eslint/parser",plugins:["html","@html-eslint"],rules:{"@html-eslint/indent":["error",chunkR26SPKXH_js.a],"capitalized-comments":"off","spaced-comment":"off",...global.anolilabEslintConfigHtmlPrettierRules},settings:{"html/report-bad-indent":"error",...e,...global.anolilabEslintConfigHtmlPrettierSettings}}]},s=i;
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":`+${chunkR26SPKXH_js.a}`});var i={overrides:[{extends:["plugin:@html-eslint/recommended"],files:["**/*.erb","**/*.handlebars","**/*.hbs","**/*.htm","**/*.html","**/*.mustache","**/*.nunjucks","**/*.php","**/*.tag","**/*.twig","**/*.we"],globals:{sourceCode:!0},env:{browser:!0,node:!1},parser:"@html-eslint/parser",plugins:["html","@html-eslint"],rules:{"@html-eslint/indent":["error",chunkR26SPKXH_js.a],"capitalized-comments":"off","spaced-comment":"off",...global.anolilabEslintConfigHtmlPrettierRules},settings:{"html/report-bad-indent":"error",...e,...global.anolilabEslintConfigHtmlPrettierSettings}}]},s=i;
9
9
 
10
10
  module.exports = s;
11
11
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/html.ts"],"names":["hasDependency","hasDevDependency","settings","indent_default","config","html_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAK5C,CAAC,OAAO,kCAAoCD,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAGzC,OAAO,kCACP,OAAO,sCAAwC,CAC3C,+BAAgC,MAChC,sBAAuB,MACvB,sCAAuC,MACvC,sBAAuB,KAC3B,EAEA,OAAO,yCAA2C,CAC9C,yBAA0B,KAC9B,GAGJ,IAAIC,EAAsC,CAAC,EAEtC,OAAO,kCACRA,EAAW,CACP,cAAe,IAAIC,CAAM,EAC7B,GAGJ,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,iCAAiC,EAC3C,MAAO,CAAC,QAAS,eAAgB,QAAS,QAAS,SAAU,aAAc,aAAc,QAAS,QAAS,SAAU,MAAM,EAC3H,QAAS,CACL,WAAY,EAChB,EACA,IAAK,CACD,QAAS,GACT,KAAM,EACV,EACA,OAAQ,sBACR,QAAS,CAAC,OAAQ,cAAc,EAChC,MAAO,CACH,sBAAuB,CAAC,QAASD,CAAM,EACvC,uBAAwB,MAExB,iBAAkB,MAElB,GAAG,OAAO,qCACd,EACA,SAAU,CACN,yBAA0B,QAC1B,GAAGD,EACH,GAAG,OAAO,wCACd,CACJ,CACJ,CACJ,EAEOG,EAAQD","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport indent from \"../../utils/indent\";\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nif (global.hasAnolilabEsLintConfigPrettier) {\n global.anolilabEslintConfigHtmlPrettierRules = {\n \"@html-eslint/element-newline\": \"off\",\n \"@html-eslint/indent\": \"off\",\n \"@html-eslint/no-extra-spacing-attrs\": \"off\",\n \"@html-eslint/quotes\": \"off\",\n };\n\n global.anolilabEslintConfigHtmlPrettierSettings = {\n \"html/report-bad-indent\": \"off\",\n };\n}\n\nlet settings: Linter.Config[\"settings\"] = {};\n\nif (!global.hasAnolilabEsLintConfigPrettier) {\n settings = {\n \"html/indent\": `+${indent}`,\n };\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:@html-eslint/recommended\"],\n files: [\"*.erb\", \"*.handlebars\", \"*.hbs\", \"*.htm\", \"*.html\", \"*.mustache\", \"*.nunjucks\", \"*.php\", \"*.tag\", \"*.twig\", \"*.we\"],\n globals: {\n sourceCode: true,\n },\n env: {\n browser: true,\n node: false,\n },\n parser: \"@html-eslint/parser\",\n plugins: [\"html\", \"@html-eslint\"],\n rules: {\n \"@html-eslint/indent\": [\"error\", indent],\n \"capitalized-comments\": \"off\",\n // @see https://github.com/yeonjuan/html-eslint/issues/67 bug in html-eslint\n \"spaced-comment\": \"off\",\n\n ...global.anolilabEslintConfigHtmlPrettierRules,\n },\n settings: {\n \"html/report-bad-indent\": \"error\",\n ...settings,\n ...global.anolilabEslintConfigHtmlPrettierSettings,\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/html.ts"],"names":["hasDependency","hasDevDependency","settings","indent_default","config","html_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAK5C,CAAC,OAAO,kCAAoCD,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAGzC,OAAO,kCACP,OAAO,sCAAwC,CAC3C,+BAAgC,MAChC,sBAAuB,MACvB,sCAAuC,MACvC,sBAAuB,KAC3B,EAEA,OAAO,yCAA2C,CAC9C,yBAA0B,KAC9B,GAGJ,IAAIC,EAAsC,CAAC,EAEtC,OAAO,kCACRA,EAAW,CACP,cAAe,IAAIC,CAAM,EAC7B,GAGJ,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,iCAAiC,EAC3C,MAAO,CACH,WACA,kBACA,WACA,WACA,YACA,gBACA,gBACA,WACA,WACA,YACA,SACJ,EACA,QAAS,CACL,WAAY,EAChB,EACA,IAAK,CACD,QAAS,GACT,KAAM,EACV,EACA,OAAQ,sBACR,QAAS,CAAC,OAAQ,cAAc,EAChC,MAAO,CACH,sBAAuB,CAAC,QAASD,CAAM,EACvC,uBAAwB,MAExB,iBAAkB,MAElB,GAAG,OAAO,qCACd,EACA,SAAU,CACN,yBAA0B,QAC1B,GAAGD,EACH,GAAG,OAAO,wCACd,CACJ,CACJ,CACJ,EAEOG,EAAQD","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport indent from \"../../utils/indent\";\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nif (global.hasAnolilabEsLintConfigPrettier) {\n global.anolilabEslintConfigHtmlPrettierRules = {\n \"@html-eslint/element-newline\": \"off\",\n \"@html-eslint/indent\": \"off\",\n \"@html-eslint/no-extra-spacing-attrs\": \"off\",\n \"@html-eslint/quotes\": \"off\",\n };\n\n global.anolilabEslintConfigHtmlPrettierSettings = {\n \"html/report-bad-indent\": \"off\",\n };\n}\n\nlet settings: Linter.Config[\"settings\"] = {};\n\nif (!global.hasAnolilabEsLintConfigPrettier) {\n settings = {\n \"html/indent\": `+${indent}`,\n };\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:@html-eslint/recommended\"],\n files: [\n \"**/*.erb\",\n \"**/*.handlebars\",\n \"**/*.hbs\",\n \"**/*.htm\",\n \"**/*.html\",\n \"**/*.mustache\",\n \"**/*.nunjucks\",\n \"**/*.php\",\n \"**/*.tag\",\n \"**/*.twig\",\n \"**/*.we\",\n ],\n globals: {\n sourceCode: true,\n },\n env: {\n browser: true,\n node: false,\n },\n parser: \"@html-eslint/parser\",\n plugins: [\"html\", \"@html-eslint\"],\n rules: {\n \"@html-eslint/indent\": [\"error\", indent],\n \"capitalized-comments\": \"off\",\n // @see https://github.com/yeonjuan/html-eslint/issues/67 bug in html-eslint\n \"spaced-comment\": \"off\",\n\n ...global.anolilabEslintConfigHtmlPrettierRules,\n },\n settings: {\n \"html/report-bad-indent\": \"error\",\n ...settings,\n ...global.anolilabEslintConfigHtmlPrettierSettings,\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -5,7 +5,7 @@ var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
5
5
  require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
8
- if(global.anolilabEslintImportNoUnusedModulesConfig===void 0&&chunkWW4PDMXQ_js.a.import_ignore_exports){if(!Array.isArray(chunkWW4PDMXQ_js.a.import_ignore_exports))throw new TypeError("import.ignore_exports must be a array");global.anolilabEslintImportNoUnusedModulesConfig=chunkWW4PDMXQ_js.a.import_ignore_exports;}var i=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",packageJsonUtils.packageIsTypeModule?{cjs:"always",js:"always",jsx:"always",mjs:"always",json:"always"}:{cjs:"never",js:"never",jsx:"never",mjs:"never",json:"always"}],"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":packageJsonUtils.packageIsTypeModule?["error",{allowPrimitiveModules:!0}]:"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","**/eslint.config.js","**/eslint.config.mjs","**/eslint.config.cjs","**/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":[packageJsonUtils.packageIsTypeModule?"error":"off",{ignoreExports:global.anolilabEslintImportNoUnusedModulesConfig??[],missingExports:!0,unusedExports:!0}],"import/no-import-module-exports":[packageJsonUtils.packageIsTypeModule?"off":"error",{exceptions:[]}],"import/no-relative-packages":"error","import/no-useless-path-segments":["error",{commonjs:!1,noUselessIndex:!0}],"import/no-webpack-loader-syntax":"error","import/order":"off","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)$"]}},type:"all"},{config:{settings:{"import/resolver":{"@jsenv/eslint-import-resolver":{rootDirectoryUrl:packageJsonUtils.projectPath,packageConditions:["node","import"]}}}},type:"javascript"},{config:{extends:["plugin:import/typescript"],rules:{"import/default":"off","import/export":"off","import/extensions":["error","ignorePackages",{js:"never",jsx:"never",mjs:"never",cjs:"never",ts:"never",tsx:"never",json:"always",svg:"always"}],"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":{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}}},type:"typescript"},{config:{rules:{"import/no-duplicates":"off"}},type:"d.ts"}]),a=i;
8
+ if(global.anolilabEslintImportNoUnusedModulesConfig===void 0&&chunkWW4PDMXQ_js.a.import_ignore_exports){if(!Array.isArray(chunkWW4PDMXQ_js.a.import_ignore_exports))throw new TypeError("import.ignore_exports must be a array");global.anolilabEslintImportNoUnusedModulesConfig=chunkWW4PDMXQ_js.a.import_ignore_exports;}var i=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",packageJsonUtils.packageIsTypeModule?{cjs:"always",js:"always",jsx:"always",mjs:"always",json:"always"}:{cjs:"never",js:"never",jsx:"never",mjs:"never",json:"always"}],"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":packageJsonUtils.packageIsTypeModule?["error",{allowPrimitiveModules:!0}]:"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","**/eslint.config.js","**/eslint.config.mjs","**/eslint.config.cjs","**/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":[packageJsonUtils.packageIsTypeModule?"error":"off",{ignoreExports:global.anolilabEslintImportNoUnusedModulesConfig??[],missingExports:!0,unusedExports:!0}],"import/no-import-module-exports":[packageJsonUtils.packageIsTypeModule?"off":"error",{exceptions:[]}],"import/no-relative-packages":"error","import/no-useless-path-segments":["error",{commonjs:!0,noUselessIndex:!0}],"import/no-webpack-loader-syntax":"error","import/order":"off","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)$"]}},type:"all"},{config:{settings:{"import/resolver":{"@jsenv/eslint-import-resolver":{rootDirectoryUrl:packageJsonUtils.projectPath,packageConditions:["node","import"]}}}},type:"javascript"},{config:{extends:["plugin:import/typescript"],rules:{"import/default":"off","import/export":"off","import/extensions":["error","ignorePackages",{js:"never",jsx:"never",mjs:"never",cjs:"never",ts:"never",tsx:"never",json:"always",svg:"always"}],"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":{typescript:{alwaysTryTypes:!0,project:packageJsonUtils.fromRoot("tsconfig.json")}}}},type:"typescript"},{config:{rules:{"import/no-duplicates":"off"}},type:"d.ts"}]),a=i;
9
9
 
10
10
  module.exports = a;
11
11
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/import.ts"],"names":["fromRoot","packageIsTypeModule","projectPath","eslint_config_default","config","createConfigs","import_default"],"mappings":"wHAAA,OAAS,YAAAA,EAAU,uBAAAC,EAAqB,eAAAC,MAAmB,+BAM3D,GAAI,OAAO,4CAA8C,QAAaC,EAAqB,sBAA0B,CACjH,GAAI,CAAC,MAAM,QAAQA,EAAqB,qBAAwB,EAC5D,MAAM,IAAI,UAAU,uCAAuC,EAG/D,OAAO,0CAA4CA,EAAqB,qBAC5E,CAEA,IAAMC,EAAwBC,EAAc,CACxC,CACI,OAAQ,CACJ,IAAK,CACD,IAAK,EACT,EAEA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,EACA,QAAS,CAAC,QAAQ,EAClB,MAAO,CAGH,yCAA0C,CAAC,QAAS,kBAAkB,EAItE,iBAAkB,MAIlB,kCAAmC,CAC/B,MACA,CACI,gBAAiB,CAAC,EAClB,uBAAwB,kBAC5B,CACJ,EAIA,gBAAiB,QAIjB,sBAAuB,QAIvB,oBAAqB,CACjB,QACA,iBACAJ,EACM,CACE,IAAK,SACL,GAAI,SACJ,IAAK,SACL,IAAK,SACL,KAAM,QACV,EACE,CACE,IAAK,QACL,GAAI,QACJ,IAAK,QACL,IAAK,QACL,KAAM,QACV,CACR,EAIA,eAAgB,QAMhB,uBAAwB,MAKxB,uBAAwB,MAQxB,0BAA2B,CAAC,MAAO,CAAE,IAAK,EAAG,CAAC,EAI9C,eAAgB,QAIhB,mBAAoB,MAIpB,8BAA+B,QAI/B,0BAA2B,QAI3B,gBAAiB,QAIjB,qCAAsC,CAClC,MACA,CACI,oBAAqB,GACrB,uBAAwB,GACxB,WAAY,GACZ,mBAAoB,GACpB,aAAc,GACd,YAAa,EACjB,CACJ,EAIA,qBAAsBA,EAAsB,CAAC,QAAS,CAAE,sBAAuB,EAAK,CAAC,EAAI,MAIzF,kBAAmB,CAAC,QAAS,CAAE,SAAU,QAAI,CAAC,EAI9C,2BAA4B,MAI5B,uBAAwB,MAIxB,uBAAwB,QAIxB,4BAA6B,QAI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MAAO,CAEH,iBAAkB,MAGlB,gBAAiB,MAGjB,oBAAqB,CACjB,QACA,iBACA,CACI,GAAI,QACJ,IAAK,QACL,IAAK,QACL,IAAK,QACL,GAAI,QACJ,IAAK,QACL,KAAM,SACN,IAAK,QACT,CACJ,EAGA,eAAgB,MAGhB,uBAAwB,KAC5B,EACA,SAAU,CAEN,oBAAqB,CAAC,MAAO,OAAQ,OAAQ,MAAO,OAAQ,QAAS,OAAQ,OAAQ,MAAM,EAG3F,iCAAkC,CAAC,eAAgB,qBAAqB,EAGxE,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAO,CACxE,EAGA,kBAAmB,CACf,WAAY,CACR,eAAgB,GAChB,QAASF,EAAS,eAAe,CACrC,CACJ,CACJ,CACJ,EACA,KAAM,YACV,EACA,CACI,OAAQ,CACJ,MAAO,CACH,uBAAwB,KAC5B,CACJ,EACA,KAAM,MACV,CACJ,CAAC,EAEMM,EAAQF","sourcesContent":["import { fromRoot, packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport { createConfigs } from \"../../utils/create-config\";\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\n\nif (global.anolilabEslintImportNoUnusedModulesConfig === undefined && anolilabEslintConfig[\"import_ignore_exports\"]) {\n if (!Array.isArray(anolilabEslintConfig[\"import_ignore_exports\"])) {\n throw new TypeError(\"import.ignore_exports must be a array\");\n }\n\n global.anolilabEslintImportNoUnusedModulesConfig = anolilabEslintConfig[\"import_ignore_exports\"] as string[];\n}\n\nconst config: Linter.Config = createConfigs([\n {\n config: {\n env: {\n es6: true,\n },\n\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n rules: {\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n \"import/consistent-type-specifier-style\": [\"error\", \"prefer-top-level\"],\n\n // ensure named imports coupled with named exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/default.md#when-not-to-use-it\n \"import/default\": \"off\",\n\n // dynamic imports require a leading comment with a webpackChunkName\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/dynamic-import-chunkname.md\n \"import/dynamic-import-chunkname\": [\n \"off\",\n {\n importFunctions: [],\n webpackChunknameFormat: \"[0-9a-zA-Z-_/.]+\",\n },\n ],\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/export.md\n \"import/export\": \"error\",\n\n // This rule enforces that all exports are declared at the bottom of the file.\n // https://github.com/import-js/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n packageIsTypeModule\n ? {\n cjs: \"always\",\n js: \"always\",\n jsx: \"always\",\n mjs: \"always\",\n json: \"always\",\n }\n : {\n cjs: \"never\",\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n json: \"always\",\n },\n ],\n\n // disallow non-import statements appearing before import statements\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md\n \"import/first\": \"error\",\n\n // Reports when named exports are not grouped together in a single export declaration\n // or when multiple assignments to CommonJS module.exports or exports object are present\n // in a single file.\n // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // disallow non-import statements appearing before import statements\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/imports-first.md\n // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // \"import/max-dependencies\" is not super useful\n // Either you will disable the eslint rule because it's \"normal\"\n // to have a lot of dependencies or feel compelled to reduce the number of imports.\n // It's already visible that a file has many imports and that ideally they should be\n // less imports, no need for ESLint, let's keep ESLint for more valuable things.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // disallow require()\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md#when-not-to-use-it\n \"import/named\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Require a newline after the last import/require in a group\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Forbid import of modules using absolute paths\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // Reports if a module's default export is unnamed\n // https://github.com/import-js/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md\n \"import/no-anonymous-default-export\": [\n \"off\",\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\n\n // disallow require()\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md\n \"import/no-commonjs\": packageIsTypeModule ? [\"error\", { allowPrimitiveModules: true }] : \"off\",\n\n // Forbid cyclical dependencies between modules\n // https://medium.com/@steven-lemon182/are-typescript-barrel-files-an-anti-pattern-72a713004250\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // Reports the use of empty named import blocks.\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid the use of extraneous packages\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md\n // paths are treated both as absolute paths, and relative to process.cwd()\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"test/**\", // tape, common npm pattern\n \"tests/**\", // also common npm pattern\n \"spec/**\", // mocha, rspec-like pattern\n \"**/fixture/**\", // jest pattern\n \"**/__mocks__/**\", // jest pattern\n \"test.{js,jsx}\", // repos with a single test file\n \"test-*.{js,jsx}\", // repos with multiple top-level test files\n \"**/*{.,_}{test,spec}.{js,jsx}\", // tests where the extension or filename suffix denotes that it is a test\n \"**/jest.config.cjs\", // jest config\n \"**/jest.setup.js\", // jest setup\n \"**/vue.config.cjs\", // vue-cli config\n \"**/webpack.config.cjs\", // webpack config\n \"**/webpack.config.*.js\", // webpack config\n \"**/rollup.config.cjs\", // rollup config\n \"**/rollup.config.*.js\", // rollup config\n \"**/gulpfile.js\", // gulp config\n \"**/gulpfile.*.js\", // gulp config\n \"**/Gruntfile{,.js}\", // grunt config\n \"**/protractor.conf.js\", // protractor config\n \"**/protractor.conf.*.js\", // protractor config\n \"**/karma.conf.js\", // karma config\n \"**/.eslintrc.js\", // eslint config\n \"**/.eslintrc.cjs\", // eslint config\n \"**/.eslintrc.mjs\", // eslint config\n \"**/eslint.config.js\", // eslint flat config\n \"**/eslint.config.mjs\", // eslint flat config\n \"**/eslint.config.cjs\", // eslint flat config\n \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n \"**/__tests__/**/*.?(c|m)[jt]s?(x)\", // vitest config test include\n \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\", // vitest config test include\n ],\n optionalDependencies: false,\n },\n ],\n\n // prevent importing the submodules of other modules\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md\n \"import/no-internal-modules\": [\n \"off\",\n {\n allow: [],\n },\n ],\n\n // Forbid mutable exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // warn on accessing default export property names that are also named exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Prevent importing the default as if it were named\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/import-js/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // disallow namespace imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md\n // TODO: enable?\n \"import/no-nodejs-modules\": \"off\",\n\n // Use this rule to prevent imports to folders in relative parent paths.\n // https://github.com/import-js/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md\n \"import/no-relative-parent-imports\": \"off\",\n\n // Restrict which files can be imported in a given folder\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid a module from importing itself\n // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Forbid a module from importing itself\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { caseSensitive: true, commonjs: true }],\n\n // Reports modules without any exports, or with unused exports\n // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n \"import/no-unused-modules\": [\n packageIsTypeModule ? \"error\" : \"off\",\n {\n ignoreExports: global.anolilabEslintImportNoUnusedModulesConfig ?? [],\n missingExports: true,\n unusedExports: true,\n },\n ],\n\n // Reports the use of import declarations with CommonJS exports in any module except for the main module.\n // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md\n \"import/no-import-module-exports\": [\n packageIsTypeModule ? \"off\" : \"error\",\n {\n exceptions: [],\n },\n ],\n\n // Use this rule to prevent importing packages through relative paths.\n // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-relative-packages.md\n \"import/no-relative-packages\": \"error\",\n\n // Ensures that there are no useless path segments\n // TODO: Create a PR to fix commonjs option, when eslint --fix is run, it throws an error on the no-useless-path-segments.js:118\n // @see https://github.com/import-js/eslint-plugin-import/pull/2886\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": [\"error\", { commonjs: false, noUselessIndex: true }],\n\n // Forbid Webpack loader syntax in imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-webpack-loader-syntax.md\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // ensure absolute imports are above relative imports and that unassigned imports are ignored\n // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n // simple-import-sort does this better\n \"import/order\": \"off\",\n\n // Require modules with a single export to use a default export\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md\n \"import/prefer-default-export\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n },\n settings: {\n \"import/core-modules\": [],\n // https://github.com/un-es/eslint-plugin-i/blob/main/docs/rules/extensions.md\n \"import/extensions\": [\".js\", \".cjs\", \".mjs\", \".jsx\"],\n // Ensure consistent use of file extension within the import path\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n },\n type: \"all\",\n },\n {\n config: {\n settings: {\n \"import/resolver\": {\n \"@jsenv/eslint-import-resolver\": {\n rootDirectoryUrl: projectPath,\n packageConditions: [\"node\", \"import\"],\n },\n },\n },\n },\n type: \"javascript\",\n },\n {\n config: {\n extends: [\"plugin:import/typescript\"],\n rules: {\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled because of https://github.com/import-js/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n cjs: \"never\",\n ts: \"never\",\n tsx: \"never\",\n json: \"always\",\n svg: \"always\",\n },\n ],\n\n // This issue and some others: https://github.com/import-js/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n\n // ensure imports point to files/modules that can be resolved\n \"import/no-unresolved\": \"off\",\n },\n settings: {\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\", \".cjs\", \".cts\", \".mts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".cts\", \".mts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n typescript: {\n alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`\n project: fromRoot(\"tsconfig.json\"),\n },\n },\n },\n },\n type: \"typescript\",\n },\n {\n config: {\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n type: \"d.ts\",\n },\n]);\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/import.ts"],"names":["fromRoot","packageIsTypeModule","projectPath","eslint_config_default","config","createConfigs","import_default"],"mappings":"wHAAA,OAAS,YAAAA,EAAU,uBAAAC,EAAqB,eAAAC,MAAmB,+BAM3D,GAAI,OAAO,4CAA8C,QAAaC,EAAqB,sBAA0B,CACjH,GAAI,CAAC,MAAM,QAAQA,EAAqB,qBAAwB,EAC5D,MAAM,IAAI,UAAU,uCAAuC,EAG/D,OAAO,0CAA4CA,EAAqB,qBAC5E,CAEA,IAAMC,EAAwBC,EAAc,CACxC,CACI,OAAQ,CACJ,IAAK,CACD,IAAK,EACT,EAEA,cAAe,CACX,YAAa,EACb,WAAY,QAChB,E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AAO,CACxE,EAGA,kBAAmB,CACf,WAAY,CACR,eAAgB,GAChB,QAASF,EAAS,eAAe,CACrC,CACJ,CACJ,CACJ,EACA,KAAM,YACV,EACA,CACI,OAAQ,CACJ,MAAO,CACH,uBAAwB,KAC5B,CACJ,EACA,KAAM,MACV,CACJ,CAAC,EAEMM,EAAQF","sourcesContent":["import { fromRoot, packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport { createConfigs } from \"../../utils/create-config\";\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\n\nif (global.anolilabEslintImportNoUnusedModulesConfig === undefined && anolilabEslintConfig[\"import_ignore_exports\"]) {\n if (!Array.isArray(anolilabEslintConfig[\"import_ignore_exports\"])) {\n throw new TypeError(\"import.ignore_exports must be a array\");\n }\n\n global.anolilabEslintImportNoUnusedModulesConfig = anolilabEslintConfig[\"import_ignore_exports\"] as string[];\n}\n\nconst config: Linter.Config = createConfigs([\n {\n config: {\n env: {\n es6: true,\n },\n\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\",\n },\n plugins: [\"import\"],\n rules: {\n // enforce a consistent style for type specifiers (inline or top-level)\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/consistent-type-specifier-style.md\n \"import/consistent-type-specifier-style\": [\"error\", \"prefer-top-level\"],\n\n // ensure named imports coupled with named exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/default.md#when-not-to-use-it\n \"import/default\": \"off\",\n\n // dynamic imports require a leading comment with a webpackChunkName\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/dynamic-import-chunkname.md\n \"import/dynamic-import-chunkname\": [\n \"off\",\n {\n importFunctions: [],\n webpackChunknameFormat: \"[0-9a-zA-Z-_/.]+\",\n },\n ],\n\n // disallow invalid exports, e.g. multiple defaults\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/export.md\n \"import/export\": \"error\",\n\n // This rule enforces that all exports are declared at the bottom of the file.\n // https://github.com/import-js/eslint-plugin-import/blob/98acd6afd04dcb6920b81330114e146dc8532ea4/docs/rules/exports-last.md\n \"import/exports-last\": \"error\",\n\n // Ensure consistent use of file extension within the import path\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n packageIsTypeModule\n ? {\n cjs: \"always\",\n js: \"always\",\n jsx: \"always\",\n mjs: \"always\",\n json: \"always\",\n }\n : {\n cjs: \"never\",\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n json: \"always\",\n },\n ],\n\n // disallow non-import statements appearing before import statements\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/first.md\n \"import/first\": \"error\",\n\n // Reports when named exports are not grouped together in a single export declaration\n // or when multiple assignments to CommonJS module.exports or exports object are present\n // in a single file.\n // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/group-exports.md\n \"import/group-exports\": \"off\",\n\n // disallow non-import statements appearing before import statements\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/imports-first.md\n // deprecated: use `import/first`\n \"import/imports-first\": \"off\",\n\n // \"import/max-dependencies\" is not super useful\n // Either you will disable the eslint rule because it's \"normal\"\n // to have a lot of dependencies or feel compelled to reduce the number of imports.\n // It's already visible that a file has many imports and that ideally they should be\n // less imports, no need for ESLint, let's keep ESLint for more valuable things.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/max-dependencies.md\n \"import/max-dependencies\": [\"off\", { max: 10 }],\n\n // disallow require()\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/named.md#when-not-to-use-it\n \"import/named\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/namespace.md\n \"import/namespace\": \"off\",\n\n // Require a newline after the last import/require in a group\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md\n \"import/newline-after-import\": \"error\",\n\n // Forbid import of modules using absolute paths\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md\n \"import/no-absolute-path\": \"error\",\n\n // disallow AMD require/define\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-amd.md\n \"import/no-amd\": \"error\",\n\n // Reports if a module's default export is unnamed\n // https://github.com/import-js/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md\n \"import/no-anonymous-default-export\": [\n \"off\",\n {\n allowAnonymousClass: false,\n allowAnonymousFunction: false,\n allowArray: false,\n allowArrowFunction: false,\n allowLiteral: false,\n allowObject: false,\n },\n ],\n\n // disallow require()\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md\n \"import/no-commonjs\": packageIsTypeModule ? [\"error\", { allowPrimitiveModules: true }] : \"off\",\n\n // Forbid cyclical dependencies between modules\n // https://medium.com/@steven-lemon182/are-typescript-barrel-files-an-anti-pattern-72a713004250\n \"import/no-cycle\": [\"error\", { maxDepth: \"∞\" }],\n\n // forbid default exports. this is a terrible rule, do not use it.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md\n \"import/no-default-export\": \"off\",\n\n // disallow use of jsdoc-marked-deprecated imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-deprecated.md\n \"import/no-deprecated\": \"off\",\n\n // disallow duplicate imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md\n \"import/no-duplicates\": \"error\",\n\n // Forbid require() calls with expressions\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-dynamic-require.md\n \"import/no-dynamic-require\": \"error\",\n\n // Reports the use of empty named import blocks.\n // https://github.com/un-es/eslint-plugin-i/blob/d5fc8b670dc8e6903dbb7b0894452f60c03089f5/docs/rules/no-empty-named-blocks.md\n \"import/no-empty-named-blocks\": \"error\",\n\n // Forbid the use of extraneous packages\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md\n // paths are treated both as absolute paths, and relative to process.cwd()\n \"import/no-extraneous-dependencies\": [\n \"error\",\n {\n devDependencies: [\n \"test/**\", // tape, common npm pattern\n \"tests/**\", // also common npm pattern\n \"spec/**\", // mocha, rspec-like pattern\n \"**/fixture/**\", // jest pattern\n \"**/__mocks__/**\", // jest pattern\n \"test.{js,jsx}\", // repos with a single test file\n \"test-*.{js,jsx}\", // repos with multiple top-level test files\n \"**/*{.,_}{test,spec}.{js,jsx}\", // tests where the extension or filename suffix denotes that it is a test\n \"**/jest.config.cjs\", // jest config\n \"**/jest.setup.js\", // jest setup\n \"**/vue.config.cjs\", // vue-cli config\n \"**/webpack.config.cjs\", // webpack config\n \"**/webpack.config.*.js\", // webpack config\n \"**/rollup.config.cjs\", // rollup config\n \"**/rollup.config.*.js\", // rollup config\n \"**/gulpfile.js\", // gulp config\n \"**/gulpfile.*.js\", // gulp config\n \"**/Gruntfile{,.js}\", // grunt config\n \"**/protractor.conf.js\", // protractor config\n \"**/protractor.conf.*.js\", // protractor config\n \"**/karma.conf.js\", // karma config\n \"**/.eslintrc.js\", // eslint config\n \"**/.eslintrc.cjs\", // eslint config\n \"**/.eslintrc.mjs\", // eslint config\n \"**/eslint.config.js\", // eslint flat config\n \"**/eslint.config.mjs\", // eslint flat config\n \"**/eslint.config.cjs\", // eslint flat config\n \"**/vite.config.js\", // vite config\n \"**/vite.config.ts\", // vite config\n \"**/vitest.config.js\", // vitest config\n \"**/vitest.config.ts\", // vitest config\n \"**/__tests__/**/*.?(c|m)[jt]s?(x)\", // vitest config test include\n \"**/?(*.){test,spec}.?(c|m)[jt]s?(x)\", // vitest config test include\n ],\n optionalDependencies: false,\n },\n ],\n\n // prevent importing the submodules of other modules\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-internal-modules.md\n \"import/no-internal-modules\": [\n \"off\",\n {\n allow: [],\n },\n ],\n\n // Forbid mutable exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-mutable-exports.md\n \"import/no-mutable-exports\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md\n \"import/no-named-as-default\": \"error\",\n\n // warn on accessing default export property names that are also named exports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default-member.md\n \"import/no-named-as-default-member\": \"error\",\n\n // Prevent importing the default as if it were named\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-default.md\n \"import/no-named-default\": \"error\",\n\n // Prohibit named exports. this is a terrible rule, do not use it.\n // https://github.com/import-js/eslint-plugin-import/blob/1ec80fa35fa1819e2d35a70e68fb6a149fb57c5e/docs/rules/no-named-export.md\n \"import/no-named-export\": \"off\",\n\n // disallow namespace imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-namespace.md\n \"import/no-namespace\": \"error\",\n\n // No Node.js builtin modules\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-nodejs-modules.md\n // TODO: enable?\n \"import/no-nodejs-modules\": \"off\",\n\n // Use this rule to prevent imports to folders in relative parent paths.\n // https://github.com/import-js/eslint-plugin-import/blob/c34f14f67f077acd5a61b3da9c0b0de298d20059/docs/rules/no-relative-parent-imports.md\n \"import/no-relative-parent-imports\": \"off\",\n\n // Restrict which files can be imported in a given folder\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-restricted-paths.md\n \"import/no-restricted-paths\": \"off\",\n\n // Forbid a module from importing itself\n // https://github.com/import-js/eslint-plugin-import/blob/44a038c06487964394b1e15b64f3bd34e5d40cde/docs/rules/no-self-import.md\n \"import/no-self-import\": \"error\",\n\n // Forbid a module from importing itself\n // importing for side effects is perfectly acceptable, if you need side effects.\n \"import/no-unassigned-import\": \"off\",\n\n // ensure imports point to files/modules that can be resolved\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unresolved.md\n \"import/no-unresolved\": [\"error\", { caseSensitive: true, commonjs: true }],\n\n // Reports modules without any exports, or with unused exports\n // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n \"import/no-unused-modules\": [\n packageIsTypeModule ? \"error\" : \"off\",\n {\n ignoreExports: global.anolilabEslintImportNoUnusedModulesConfig ?? [],\n missingExports: true,\n unusedExports: true,\n },\n ],\n\n // Reports the use of import declarations with CommonJS exports in any module except for the main module.\n // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-import-module-exports.md\n \"import/no-import-module-exports\": [\n packageIsTypeModule ? \"off\" : \"error\",\n {\n exceptions: [],\n },\n ],\n\n // Use this rule to prevent importing packages through relative paths.\n // https://github.com/import-js/eslint-plugin-import/blob/1012eb951767279ce3b540a4ec4f29236104bb5b/docs/rules/no-relative-packages.md\n \"import/no-relative-packages\": \"error\",\n\n // Ensures that there are no useless path segments\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-useless-path-segments.md\n \"import/no-useless-path-segments\": [\"error\", { commonjs: true, noUselessIndex: true }],\n\n // Forbid Webpack loader syntax in imports\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-webpack-loader-syntax.md\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // ensure absolute imports are above relative imports and that unassigned imports are ignored\n // https://github.com/import-js/eslint-plugin-import/blob/f63dd261809de6883b13b6b5b960e6d7f42a7813/docs/rules/no-unused-modules.md\n // simple-import-sort does this better\n \"import/order\": \"off\",\n\n // Require modules with a single export to use a default export\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md\n \"import/prefer-default-export\": \"error\",\n\n // Warn if a module could be mistakenly parsed as a script by a consumer\n // leveraging Unambiguous JavaScript Grammar\n // https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/unambiguous.md\n // this should not be enabled until this proposal has at least been *presented* to TC39.\n // At the moment, it's not a thing.\n \"import/unambiguous\": \"off\",\n },\n settings: {\n \"import/core-modules\": [],\n // https://github.com/un-es/eslint-plugin-i/blob/main/docs/rules/extensions.md\n \"import/extensions\": [\".js\", \".cjs\", \".mjs\", \".jsx\"],\n // Ensure consistent use of file extension within the import path\n \"import/ignore\": [\"\\\\.(coffee|scss|css|less|hbs|svg|json)$\"],\n },\n },\n type: \"all\",\n },\n {\n config: {\n settings: {\n \"import/resolver\": {\n \"@jsenv/eslint-import-resolver\": {\n rootDirectoryUrl: projectPath,\n packageConditions: [\"node\", \"import\"],\n },\n },\n },\n },\n type: \"javascript\",\n },\n {\n config: {\n extends: [\"plugin:import/typescript\"],\n rules: {\n // Does not work when the TS definition exports a default const.\n \"import/default\": \"off\",\n\n // Disabled because of https://github.com/import-js/eslint-plugin-import/issues/1590\n \"import/export\": \"off\",\n\n // Disabled as it doesn't work with TypeScript.\n \"import/extensions\": [\n \"error\",\n \"ignorePackages\",\n {\n js: \"never\",\n jsx: \"never\",\n mjs: \"never\",\n cjs: \"never\",\n ts: \"never\",\n tsx: \"never\",\n json: \"always\",\n svg: \"always\",\n },\n ],\n\n // This issue and some others: https://github.com/import-js/eslint-plugin-import/issues/1341\n \"import/named\": \"off\",\n\n // ensure imports point to files/modules that can be resolved\n \"import/no-unresolved\": \"off\",\n },\n settings: {\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\", \".cjs\", \".cts\", \".mts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".cts\", \".mts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n typescript: {\n alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`\n project: fromRoot(\"tsconfig.json\"),\n },\n },\n },\n },\n type: \"typescript\",\n },\n {\n config: {\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n type: \"d.ts\",\n },\n]);\n\nexport default config;\n"]}
@@ -5,7 +5,7 @@ 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(`
8
- Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files.`):global.anolilabEslintConfigJsDocRules=[{extends:["plugin:jsdoc/recommended-typescript-error"],files:["*.ts","*.tsx","*.mts","*.cts"],plugins:["jsdoc"]}]);var i={overrides:[{extends:["plugin:jsdoc/recommended-error"],files:["*.js","*.jsx","*.mjs","*.cjs"],plugins:["jsdoc"]},...global.anolilabEslintConfigJsDocRules??[]]},d=i;
8
+ Found eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files.`):global.anolilabEslintConfigJsDocRules=[{extends:["plugin:jsdoc/recommended-typescript-error"],files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],plugins:["jsdoc"]}]);var i={overrides:[{extends:["plugin:jsdoc/recommended-error"],files:["**/*.js","**/*.jsx","**/*.mjs","**/*.cjs"],plugins:["jsdoc"]},...global.anolilabEslintConfigJsDocRules??[]]},d=i;
9
9
 
10
10
  module.exports = d;
11
11
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/jsdoc.ts"],"names":["hasDependency","hasDevDependency","hasTypescript","consoleLog","config","jsdoc_default"],"mappings":"4EAAA,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,iBAAAC,MAAqB,+BAK3D,OAAO,iCAAmC,QAAaA,IACnDF,EAAc,qBAAqB,GAAKC,EAAiB,qBAAqB,EAC9EE,EAAW;AAAA,6FAAgG,EAE3G,OAAO,+BAAiC,CACpC,CACI,QAAS,CAAC,2CAA2C,EACrD,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,OAAO,CACrB,CACJ,GAIR,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,gCAAgC,EAC1C,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,OAAO,CACrB,EACA,GAAI,OAAO,gCAAkC,CAAC,CAClD,CACJ,EAEOC,EAAQD","sourcesContent":["import { hasDependency, hasDevDependency, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport { consoleLog } from \"../../utils/loggers\";\n\nif (global.anolilabEslintConfigJsDocRules === undefined && hasTypescript) {\n if (hasDependency(\"eslint-plugin-tsdoc\") || hasDevDependency(\"eslint-plugin-tsdoc\")) {\n consoleLog(\"\\nFound eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files.\");\n } else {\n global.anolilabEslintConfigJsDocRules = [\n {\n extends: [\"plugin:jsdoc/recommended-typescript-error\"],\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n plugins: [\"jsdoc\"],\n },\n ];\n }\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:jsdoc/recommended-error\"],\n files: [\"*.js\", \"*.jsx\", \"*.mjs\", \"*.cjs\"],\n plugins: [\"jsdoc\"],\n },\n ...(global.anolilabEslintConfigJsDocRules ?? []),\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/jsdoc.ts"],"names":["hasDependency","hasDevDependency","hasTypescript","consoleLog","config","jsdoc_default"],"mappings":"4EAAA,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,iBAAAC,MAAqB,+BAK3D,OAAO,iCAAmC,QAAaA,IACnDF,EAAc,qBAAqB,GAAKC,EAAiB,qBAAqB,EAC9EE,EAAW;AAAA,6FAAgG,EAE3G,OAAO,+BAAiC,CACpC,CACI,QAAS,CAAC,2CAA2C,EACrD,MAAO,CAAC,UAAW,WAAY,WAAY,UAAU,EACrD,QAAS,CAAC,OAAO,CACrB,CACJ,GAIR,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,gCAAgC,EAC1C,MAAO,CAAC,UAAW,WAAY,WAAY,UAAU,EACrD,QAAS,CAAC,OAAO,CACrB,EACA,GAAI,OAAO,gCAAkC,CAAC,CAClD,CACJ,EAEOC,EAAQD","sourcesContent":["import { hasDependency, hasDevDependency, hasTypescript } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport { consoleLog } from \"../../utils/loggers\";\n\nif (global.anolilabEslintConfigJsDocRules === undefined && hasTypescript) {\n if (hasDependency(\"eslint-plugin-tsdoc\") || hasDevDependency(\"eslint-plugin-tsdoc\")) {\n consoleLog(\"\\nFound eslint-plugin-tsdoc as dependency, disabling the jsdoc rules for *.ts and *.tsx files.\");\n } else {\n global.anolilabEslintConfigJsDocRules = [\n {\n extends: [\"plugin:jsdoc/recommended-typescript-error\"],\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.mts\", \"**/*.cts\"],\n plugins: [\"jsdoc\"],\n },\n ];\n }\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:jsdoc/recommended-error\"],\n files: [\"**/*.js\", \"**/*.jsx\", \"**/*.mjs\", \"**/*.cjs\"],\n plugins: [\"jsdoc\"],\n },\n ...(global.anolilabEslintConfigJsDocRules ?? []),\n ],\n};\n\nexport default config;\n"]}
@@ -10,7 +10,7 @@ var t=[];(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDep
10
10
  @anolilab/eslint-config found sort-package-json.
11
11
 
12
12
  Following rules are disabled: jsonc/sort-keys for all package.json files.
13
- `);}var a={overrides:[{extends:t,files:["*.json","*.json5","*.jsonc"],parser:"jsonc-eslint-parser"},{extends:["plugin:jsonc/recommended-with-json5"],files:["*.json5"]},{extends:["plugin:jsonc/recommended-with-jsonc"],files:["*.jsonc"]},{extends:["plugin:jsonc/recommended-with-json"],files:["*.json"]},{extends:["plugin:jsonc/recommended-with-json"],files:["package.json"],rules:{"jsonc/sort-keys":global.hasAnolilabEsLintConfigJsoncPackageJsonSort?"off":["error",{order:["publisher","name","displayName","type","version","private","packageManager","description","author","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies$"},{order:["types","require","import"],pathPattern:"^exports.*$"}]}}]},g=a;
13
+ `);}var a={overrides:[{extends:t,files:["**/*.json","**/*.json5","**/*.jsonc"],parser:"jsonc-eslint-parser"},{extends:["plugin:jsonc/recommended-with-json5"],files:["**/*.json5"]},{extends:["plugin:jsonc/recommended-with-jsonc"],files:["**/*.jsonc"]},{extends:["plugin:jsonc/recommended-with-json"],files:["**/*.json"]},{extends:["plugin:jsonc/recommended-with-json"],files:["package.json"],rules:{"jsonc/sort-keys":global.hasAnolilabEsLintConfigJsoncPackageJsonSort?"off":["error",{order:["publisher","name","displayName","type","version","private","packageManager","description","author","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"],pathPattern:"^$"},{order:{type:"asc"},pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies$"},{order:["types","require","import"],pathPattern:"^exports.*$"}]}}]},g=a;
14
14
 
15
15
  module.exports = g;
16
16
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/jsonc.ts"],"names":["env","hasDependency","hasDevDependency","extendedPlugins","showLog","eslint_config_default","consoleLog","config","jsonc_default"],"mappings":"wHAAA,OAAS,OAAAA,MAAW,UAEpB,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,+BAMhD,IAAMC,EAA4B,CAAC,GAE/BF,EAAc,UAAU,GAAKC,EAAiB,UAAU,IACxDC,EAAgB,KAAK,uBAAuB,EAGhD,GAAI,CAAC,OAAO,8CAAgDF,EAAc,mBAAmB,GAAKC,EAAiB,mBAAmB,GAAI,CACtI,OAAO,4CAA8C,GAErD,IAAIE,EAAmBJ,EAAI,iDAAsD,OAE7EI,GAAWC,EAAqB,yCAA8C,SAC9ED,EAAUC,EAAqB,wCAG/BD,GACAE,EAAW;AAAA;AAAA;AAAA;AAAA,CAC8D,CAEjF,CAEA,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAASJ,EACT,MAAO,CAAC,SAAU,UAAW,SAAS,EACtC,OAAQ,qBACZ,EACA,CACI,QAAS,CAAC,qCAAqC,EAC/C,MAAO,CAAC,SAAS,CACrB,EACA,CACI,QAAS,CAAC,qCAAqC,EAC/C,MAAO,CAAC,SAAS,CACrB,EACA,CACI,QAAS,CAAC,oCAAoC,EAC9C,MAAO,CAAC,QAAQ,CACpB,EACA,CACI,QAAS,CAAC,oCAAoC,EAC9C,MAAO,CAAC,cAAc,EACtB,MAAO,CAEH,kBAAmB,OAAO,4CACpB,MACA,CACE,QACA,CACI,MAAO,CACH,YACA,OACA,cACA,OACA,UACA,UACA,iBACA,cACA,SACA,UACA,UACA,WACA,aACA,OACA,WACA,aACA,cACA,UACA,OACA,SACA,QACA,WACA,QACA,gBACA,MACA,OACA,QACA,UACA,mBACA,cACA,UACA,mBACA,uBACA,eACA,uBACA,kBACA,OACA,YACA,cACA,QACA,mBACA,cACA,cACJ,EACA,YAAa,IACjB,EACA,CACI,MAAO,CAAE,KAAM,KAAM,EACrB,YAAa,iDACjB,EACA,CACI,MAAO,CAAC,QAAS,UAAW,QAAQ,EACpC,YAAa,aACjB,CACJ,CACR,CACJ,CACJ,CACJ,EAEOK,EAAQD","sourcesContent":["import { env } from \"node:process\";\n\nimport { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\nimport { consoleLog } from \"../../utils/loggers\";\n\nconst extendedPlugins: string[] = [];\n\nif (hasDependency(\"prettier\") || hasDevDependency(\"prettier\")) {\n extendedPlugins.push(\"plugin:jsonc/prettier\");\n}\n\nif (!global.hasAnolilabEsLintConfigJsoncPackageJsonSort && (hasDependency(\"sort-package-json\") || hasDevDependency(\"sort-package-json\"))) {\n global.hasAnolilabEsLintConfigJsoncPackageJsonSort = true;\n\n let showLog: boolean = env[\"DISABLE_INFO_ON_DISABLING_JSONC_SORT_KEYS_RULE\"] !== \"true\";\n\n if (showLog && anolilabEslintConfig[\"info_on_disabling_jsonc_sort_keys_rule\"] !== undefined) {\n showLog = anolilabEslintConfig[\"info_on_disabling_jsonc_sort_keys_rule\"] as boolean;\n }\n\n if (showLog) {\n consoleLog(`\\n@anolilab/eslint-config found sort-package-json. \\n\n Following rules are disabled: jsonc/sort-keys for all package.json files. \\n`);\n }\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: extendedPlugins,\n files: [\"*.json\", \"*.json5\", \"*.jsonc\"],\n parser: \"jsonc-eslint-parser\",\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json5\"],\n files: [\"*.json5\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-jsonc\"],\n files: [\"*.jsonc\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json\"],\n files: [\"*.json\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json\"],\n files: [\"package.json\"],\n rules: {\n // When the package \"sort-package-json\" is installed, we disable the rule \"jsonc/sort-keys\" because, the package \"sort-package-json\" is responsible for sorting the keys.\n \"jsonc/sort-keys\": global.hasAnolilabEsLintConfigJsoncPackageJsonSort\n ? \"off\"\n : [\n \"error\",\n {\n order: [\n \"publisher\",\n \"name\",\n \"displayName\",\n \"type\",\n \"version\",\n \"private\",\n \"packageManager\",\n \"description\",\n \"author\",\n \"license\",\n \"funding\",\n \"homepage\",\n \"repository\",\n \"bugs\",\n \"keywords\",\n \"categories\",\n \"sideEffects\",\n \"exports\",\n \"main\",\n \"module\",\n \"unpkg\",\n \"jsdelivr\",\n \"types\",\n \"typesVersions\",\n \"bin\",\n \"icon\",\n \"files\",\n \"engines\",\n \"activationEvents\",\n \"contributes\",\n \"scripts\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"dependencies\",\n \"optionalDependencies\",\n \"devDependencies\",\n \"pnpm\",\n \"overrides\",\n \"resolutions\",\n \"husky\",\n \"simple-git-hooks\",\n \"lint-staged\",\n \"eslintConfig\",\n ],\n pathPattern: \"^$\",\n },\n {\n order: { type: \"asc\" },\n pathPattern: \"^(?:dev|peer|optional|bundled)?[Dd]ependencies$\",\n },\n {\n order: [\"types\", \"require\", \"import\"],\n pathPattern: \"^exports.*$\",\n },\n ],\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/jsonc.ts"],"names":["env","hasDependency","hasDevDependency","extendedPlugins","showLog","eslint_config_default","consoleLog","config","jsonc_default"],"mappings":"wHAAA,OAAS,OAAAA,MAAW,UAEpB,OAAS,iBAAAC,EAAe,oBAAAC,MAAwB,+BAMhD,IAAMC,EAA4B,CAAC,GAE/BF,EAAc,UAAU,GAAKC,EAAiB,UAAU,IACxDC,EAAgB,KAAK,uBAAuB,EAGhD,GAAI,CAAC,OAAO,8CAAgDF,EAAc,mBAAmB,GAAKC,EAAiB,mBAAmB,GAAI,CACtI,OAAO,4CAA8C,GAErD,IAAIE,EAAmBJ,EAAI,iDAAsD,OAE7EI,GAAWC,EAAqB,yCAA8C,SAC9ED,EAAUC,EAAqB,wCAG/BD,GACAE,EAAW;AAAA;AAAA;AAAA;AAAA,CAC8D,CAEjF,CAEA,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAASJ,EACT,MAAO,CAAC,YAAa,aAAc,YAAY,EAC/C,OAAQ,qBACZ,EACA,CACI,QAAS,CAAC,qCAAqC,EAC/C,MAAO,CAAC,YAAY,CACxB,EACA,CACI,QAAS,CAAC,qCAAqC,EAC/C,MAAO,CAAC,YAAY,CACxB,EACA,CACI,QAAS,CAAC,oCAAoC,EAC9C,MAAO,CAAC,WAAW,CACvB,EACA,CACI,QAAS,CAAC,oCAAoC,EAC9C,MAAO,CAAC,cAAc,EACtB,MAAO,CAEH,kBAAmB,OAAO,4CACpB,MACA,CACE,QACA,CACI,MAAO,CACH,YACA,OACA,cACA,OACA,UACA,UACA,iBACA,cACA,SACA,UACA,UACA,WACA,aACA,OACA,WACA,aACA,cACA,UACA,OACA,SACA,QACA,WACA,QACA,gBACA,MACA,OACA,QACA,UACA,mBACA,cACA,UACA,mBACA,uBACA,eACA,uBACA,kBACA,OACA,YACA,cACA,QACA,mBACA,cACA,cACJ,EACA,YAAa,IACjB,EACA,CACI,MAAO,CAAE,KAAM,KAAM,EACrB,YAAa,iDACjB,EACA,CACI,MAAO,CAAC,QAAS,UAAW,QAAQ,EACpC,YAAa,aACjB,CACJ,CACR,CACJ,CACJ,CACJ,EAEOK,EAAQD","sourcesContent":["import { env } from \"node:process\";\n\nimport { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\nimport { consoleLog } from \"../../utils/loggers\";\n\nconst extendedPlugins: string[] = [];\n\nif (hasDependency(\"prettier\") || hasDevDependency(\"prettier\")) {\n extendedPlugins.push(\"plugin:jsonc/prettier\");\n}\n\nif (!global.hasAnolilabEsLintConfigJsoncPackageJsonSort && (hasDependency(\"sort-package-json\") || hasDevDependency(\"sort-package-json\"))) {\n global.hasAnolilabEsLintConfigJsoncPackageJsonSort = true;\n\n let showLog: boolean = env[\"DISABLE_INFO_ON_DISABLING_JSONC_SORT_KEYS_RULE\"] !== \"true\";\n\n if (showLog && anolilabEslintConfig[\"info_on_disabling_jsonc_sort_keys_rule\"] !== undefined) {\n showLog = anolilabEslintConfig[\"info_on_disabling_jsonc_sort_keys_rule\"] as boolean;\n }\n\n if (showLog) {\n consoleLog(`\\n@anolilab/eslint-config found sort-package-json. \\n\n Following rules are disabled: jsonc/sort-keys for all package.json files. \\n`);\n }\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: extendedPlugins,\n files: [\"**/*.json\", \"**/*.json5\", \"**/*.jsonc\"],\n parser: \"jsonc-eslint-parser\",\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json5\"],\n files: [\"**/*.json5\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-jsonc\"],\n files: [\"**/*.jsonc\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json\"],\n files: [\"**/*.json\"],\n },\n {\n extends: [\"plugin:jsonc/recommended-with-json\"],\n files: [\"package.json\"],\n rules: {\n // When the package \"sort-package-json\" is installed, we disable the rule \"jsonc/sort-keys\" because, the package \"sort-package-json\" is responsible for sorting the keys.\n \"jsonc/sort-keys\": global.hasAnolilabEsLintConfigJsoncPackageJsonSort\n ? \"off\"\n : [\n \"error\",\n {\n order: [\n \"publisher\",\n \"name\",\n \"displayName\",\n \"type\",\n \"version\",\n \"private\",\n \"packageManager\",\n \"description\",\n \"author\",\n \"license\",\n \"funding\",\n \"homepage\",\n \"repository\",\n \"bugs\",\n \"keywords\",\n \"categories\",\n \"sideEffects\",\n \"exports\",\n \"main\",\n \"module\",\n \"unpkg\",\n \"jsdelivr\",\n \"types\",\n \"typesVersions\",\n \"bin\",\n \"icon\",\n \"files\",\n \"engines\",\n \"activationEvents\",\n \"contributes\",\n \"scripts\",\n \"peerDependencies\",\n \"peerDependenciesMeta\",\n \"dependencies\",\n \"optionalDependencies\",\n \"devDependencies\",\n \"pnpm\",\n \"overrides\",\n \"resolutions\",\n \"husky\",\n \"simple-git-hooks\",\n \"lint-staged\",\n \"eslintConfig\",\n ],\n pathPattern: \"^$\",\n },\n {\n order: { type: \"asc\" },\n pathPattern: \"^(?:dev|peer|optional|bundled)?[Dd]ependencies$\",\n },\n {\n order: [\"types\", \"require\", \"import\"],\n pathPattern: \"^exports.*$\",\n },\n ],\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -22,7 +22,7 @@ var g=chunkEUR33FQH_js.a.overrides[0].rules,s=g["no-underscore-dangle"];!global.
22
22
  If you dont use the new react jsx-runtime in you project, please enable it manually.
23
23
  `),global.hasAnolilabEsLintConfigReactRuntimePath=e;}return global.hasAnolilabEsLintConfigReactRuntimePath})();if(!global.anolilabEslintConfigReactVersion){let r=packageJsonUtils.getPackageSubProperty("dependencies")("react");if(r===void 0&&(r=packageJsonUtils.getPackageSubProperty("devDependencies")("react")),r!==void 0){let e=semver.parse(r);e!==null&&(global.anolilabEslintConfigReactVersion=`${e.major}.${e.minor}`);}}global.anolilabEslintConfigReactVersion!==void 0&&chunkWW4PDMXQ_js.a.info_on_found_react_version!==!1&&chunkSEYYGHPU_js.b(`
24
24
  @anolilab/eslint-config found the version ${global.anolilabEslintConfigReactVersion} of react in your dependencies, this version ${global.anolilabEslintConfigReactVersion} will be used to setup the "eslint-plugin-react"
25
- `);var x={overrides:[{env:{browser:!0},files:["*.jsx","*.tsx"],parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["react"],rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":[s[0],{...s[1],allow:[...s[1].allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["warn",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",chunkR26SPKXH_js.a,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",chunkR26SPKXH_js.a],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":["error",{ignoreCase:!0}],"react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"error","react/jsx-no-useless-fragment":"error","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":[c?"off":"error"],"react/jsx-uses-vars":"error","react/no-access-state-in-setstate":"error","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"error","react/no-children-prop":"error","react/no-danger":"warn","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"error","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"error","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"error","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":["error",{customValidators:[],ignore:[],skipUndeclared:!1}],"react/react-in-jsx-scope":c?"off":"error","react/require-default-props":["error",{forbidDefaultForRequired:!0,functions:packageJsonUtils.hasDependency("typescript")||packageJsonUtils.hasDevDependency("typescript")?"defaultArguments":"defaultProps"}],"react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","always"],"react/static-property-placement":["error","property assignment"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...global.anolilabEslintConfigReactPrettierRules},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:global.anolilabEslintConfigReactVersion??"detect"}}},{files:["*.jsx"],parser:"@babel/eslint-parser",parserOptions:{ecmaFeatures:{jsx:!0}},settings:{extensions:[".jsx"]},rules:{"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"error","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"}},{files:["*.tsx"],rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:["**/*.stories.{ts,tsx,mdx}"],rules:{"react/jsx-props-no-spreading":"off"}}]},E=x;
25
+ `);var x={overrides:[{env:{browser:!0},files:["**/*.jsx","**/*.tsx"],parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["react"],rules:{"class-methods-use-this":["error",{exceptMethods:["render","getInitialState","getDefaultProps","getChildContext","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","componentDidUpdate","componentWillUnmount","componentDidCatch","getSnapshotBeforeUpdate"]}],"jsx-quotes":["error","prefer-double"],"no-underscore-dangle":[s[0],{...s[1],allow:[...s[1].allow,"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"]}],"react/boolean-prop-naming":["off",{message:"",propTypeNames:["bool","mutuallyExclusiveTrueProps"],rule:"^(is|has)[A-Z]([A-Za-z0-9]?)+"}],"react/button-has-type":["error",{button:!0,reset:!1,submit:!0}],"react/default-props-match-prop-types":["error",{allowRequiredDefaults:!1}],"react/destructuring-assignment":["error","always"],"react/display-name":["off",{ignoreTranspilerName:!1}],"react/forbid-component-props":["off",{forbid:[]}],"react/forbid-dom-props":["off",{forbid:[]}],"react/forbid-elements":["off",{forbid:[]}],"react/forbid-foreign-prop-types":["warn",{allowInPropTypes:!0}],"react/forbid-prop-types":["error",{checkChildContextTypes:!0,checkContextTypes:!0,forbid:["any","array","object"]}],"react/function-component-definition":["error",{namedComponents:"arrow-function",unnamedComponents:"arrow-function"}],"react/jsx-boolean-value":["error","never",{always:[]}],"react/jsx-child-element-spacing":"off","react/jsx-closing-bracket-location":["error","line-aligned"],"react/jsx-curly-brace-presence":["error",{children:"never",props:"never"}],"react/jsx-curly-newline":["error",{multiline:"consistent",singleline:"consistent"}],"react/jsx-curly-spacing":["error","never",{allowMultiline:!0}],"react/jsx-equals-spacing":["error","never"],"react/jsx-first-prop-new-line":["error","multiline-multiprop"],"react/jsx-fragments":["error","syntax"],"react/jsx-handler-names":["off",{eventHandlerPrefix:"handle",eventHandlerPropPrefix:"on"}],"react/jsx-indent":["error",chunkR26SPKXH_js.a,{checkAttributes:!0,indentLogicalExpressions:!0}],"react/jsx-indent-props":["error",chunkR26SPKXH_js.a],"react/jsx-key":"off","react/jsx-max-depth":"off","react/jsx-max-props-per-line":["error",{maximum:1,when:"multiline"}],"react/jsx-newline":"off","react/jsx-no-bind":["error",{allowArrowFunctions:!0,allowBind:!1,allowFunctions:!1,ignoreDOMComponents:!0,ignoreRefs:!0}],"react/jsx-no-comment-textnodes":"error","react/jsx-no-constructed-context-values":"error","react/jsx-no-duplicate-props":["error",{ignoreCase:!0}],"react/jsx-no-literals":["off",{noStrings:!0}],"react/jsx-no-script-url":["error",[{name:"Link",props:["to"]}]],"react/jsx-no-target-blank":["error",{enforceDynamicLinks:"always"}],"react/jsx-no-undef":"error","react/jsx-no-useless-fragment":"error","react/jsx-one-expression-per-line":["error",{allow:"single-child"}],"react/jsx-pascal-case":["error",{allowAllCaps:!0,ignore:[]}],"react/jsx-props-no-multi-spaces":"error","react/jsx-props-no-spreading":["error",{custom:"enforce",exceptions:[],explicitSpread:"ignore",html:"enforce"}],"react/jsx-sort-props":"off","react/jsx-space-before-closing":["off","always"],"react/jsx-tag-spacing":["error",{afterOpening:"never",beforeClosing:"never",beforeSelfClosing:"always",closingSlash:"never"}],"react/jsx-uses-react":[c?"off":"error"],"react/jsx-uses-vars":"error","react/no-access-state-in-setstate":"error","react/no-adjacent-inline-elements":"error","react/no-array-index-key":"error","react/no-children-prop":"error","react/no-danger":"warn","react/no-danger-with-children":"error","react/no-deprecated":["error"],"react/no-did-mount-set-state":"off","react/no-did-update-set-state":"error","react/no-direct-mutation-state":"error","react/no-find-dom-node":"error","react/no-is-mounted":"error","react/no-multi-comp":"off","react/no-redundant-should-component-update":"error","react/no-render-return-value":"error","react/no-set-state":"off","react/no-string-refs":"error","react/no-this-in-sfc":"error","react/no-unescaped-entities":"error","react/no-unknown-property":"error","react/no-unsafe":"off","react/no-unused-prop-types":["error",{customValidators:[],skipShapeProps:!0}],"react/no-unused-state":"error","react/no-will-update-set-state":"error","react/prefer-es6-class":["error","always"],"react/prefer-read-only-props":"off","react/prefer-stateless-function":["error",{ignorePureComponents:!0}],"react/prop-types":["error",{customValidators:[],ignore:[],skipUndeclared:!1}],"react/react-in-jsx-scope":c?"off":"error","react/require-default-props":["error",{forbidDefaultForRequired:!0,functions:packageJsonUtils.hasDependency("typescript")||packageJsonUtils.hasDevDependency("typescript")?"defaultArguments":"defaultProps"}],"react/require-optimization":["off",{allowDecorators:[]}],"react/require-render-return":"error","react/self-closing-comp":"error","react/sort-comp":["error",{groups:{lifecycle:["displayName","propTypes","contextTypes","childContextTypes","mixins","statics","defaultProps","constructor","getDefaultProps","getInitialState","state","getChildContext","getDerivedStateFromProps","componentWillMount","UNSAFE_componentWillMount","componentDidMount","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","UNSAFE_componentWillUpdate","getSnapshotBeforeUpdate","componentDidUpdate","componentDidCatch","componentWillUnmount"],rendering:["/^render.+$/","render"]},order:["static-variables","static-methods","instance-variables","lifecycle","/^handle.+$/","/^on.+$/","getters","setters","/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/","instance-methods","everything-else","rendering"]}],"react/sort-default-props":["error",{ignoreCase:!0}],"react/sort-prop-types":["off",{callbacksLast:!1,ignoreCase:!0,requiredFirst:!1,sortShapeProp:!0}],"react/state-in-constructor":["error","always"],"react/static-property-placement":["error","property assignment"],"react/style-prop-object":"error","react/void-dom-elements-no-children":"error",...global.anolilabEslintConfigReactPrettierRules},settings:{propWrapperFunctions:["forbidExtraProps","exact","Object.freeze"],react:{version:global.anolilabEslintConfigReactVersion??"detect"}}},{files:["**/*.jsx"],parser:"@babel/eslint-parser",parserOptions:{ecmaFeatures:{jsx:!0}},settings:{extensions:[".jsx"]},rules:{"react/jsx-closing-tag-location":"error","react/jsx-filename-extension":"error","react/jsx-wrap-multilines":["error",{arrow:"parens-new-line",assignment:"parens-new-line",condition:"parens-new-line",declaration:"parens-new-line",logical:"parens-new-line",prop:"parens-new-line",return:"parens-new-line"}],"react/no-typos":"error"}},{files:["**/*.tsx"],rules:{"react/default-props-match-prop-types":"off","react/jsx-filename-extension":"off","react/prop-types":"off","react/require-default-props":"off"}},{files:["**/*.stories.{ts,tsx,mdx}"],rules:{"react/jsx-props-no-spreading":"off"}}]},E=x;
26
26
 
27
27
  module.exports = E;
28
28
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["env","getPackageSubProperty","hasDependency","hasDevDependency","findUp","parse","styleRules","style_default","dangleRules","hasJsxRuntime","isFile","showLog","eslint_config_default","consoleLog","reactVersion","parsedVersion","config","indent_default","react_default"],"mappings":"gPACA,OAAS,OAAAA,MAAW,UAEpB,OAAS,yBAAAC,EAAuB,iBAAAC,EAAe,oBAAAC,MAAwB,+BAEvE,OAAOC,MAAY,UACnB,OAAS,SAAAC,MAAa,SAQtB,IAAMC,EAAaC,EAAY,UAAU,CAAC,EAAE,MACtCC,EAAcF,EAAW,sBAAsB,EAEjD,CAAC,OAAO,kCAAoCJ,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAGzC,OAAO,yCAA2C,QAAa,OAAO,kCACtE,OAAO,uCAAyC,CAC5C,kCAAmC,MACnC,qCAAsC,MACtC,iCAAkC,MAClC,0BAA2B,MAC3B,0BAA2B,MAC3B,2BAA4B,MAC5B,gCAAiC,MACjC,mBAAoB,MACpB,yBAA0B,MAC1B,+BAAgC,MAChC,oBAAqB,MACrB,oCAAqC,MACrC,kCAAmC,MACnC,wBAAyB,MACzB,4BAA6B,KACjC,GAGJ,IAAMM,GAAiB,IAAM,CAEzB,GAAI,CAAC,OAAO,wCAAyC,CAEjD,IAAMC,EAAS,OADGN,EAAO,KAAK,mCAAmC,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R,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EACA,SAAU,CACN,WAAY,CAAC,MAAM,CACvB,EACA,MAAO,CAGH,iCAAkC,QAIlC,+BAAgC,QAIhC,4BAA6B,CACzB,QACA,CACI,MAAO,kBACP,WAAY,kBACZ,UAAW,kBACX,YAAa,kBACb,QAAS,kBACT,KAAM,kBACN,OAAQ,iBACZ,CACJ,EAIA,iBAAkB,OACtB,CACJ,EACA,CACI,MAAO,CAAC,OAAO,EACf,MAAO,CACH,uCAAwC,MAExC,+BAAgC,MAChC,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,EACA,CAEI,MAAO,CAAC,2BAA2B,EACnC,MAAO,CACH,+BAAgC,KACpC,CACJ,CACJ,CACJ,EAEOe,EAAQF","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { env } from \"node:process\";\n\nimport { getPackageSubProperty, hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\nimport { parse } from \"semver\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\nimport indent from \"../../utils/indent\";\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\n// @ts-expect-error TODO: find the correct type\nconst styleRules = styleConfig.overrides[0].rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as Linter.RuleEntry;\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nif (global.anolilabEslintConfigReactPrettierRules === undefined && global.hasAnolilabEsLintConfigPrettier) {\n global.anolilabEslintConfigReactPrettierRules = {\n \"react/jsx-child-element-spacing\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-curly-newline\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-newline\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n const isFile = typeof reactPath === \"string\";\n\n let showLog: boolean = env[\"DISABLE_INFO_ON_DISABLING_JSX_REACT_RULE\"] !== \"true\";\n\n if (showLog && anolilabEslintConfig[\"info_on_disabling_jsx_react_rule\"] !== undefined) {\n showLog = anolilabEslintConfig[\"info_on_disabling_jsx_react_rule\"] as boolean;\n }\n\n if (showLog && isFile) {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = isFile;\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nif (!global.anolilabEslintConfigReactVersion) {\n let reactVersion = getPackageSubProperty<string | undefined>(\"dependencies\")(\"react\");\n\n if (reactVersion === undefined) {\n reactVersion = getPackageSubProperty<string | undefined>(\"devDependencies\")(\"react\");\n }\n\n if (reactVersion !== undefined) {\n const parsedVersion = parse(reactVersion);\n\n if (parsedVersion !== null) {\n global.anolilabEslintConfigReactVersion = `${parsedVersion.major}.${parsedVersion.minor}`;\n }\n }\n}\n\nif (global.anolilabEslintConfigReactVersion !== undefined && anolilabEslintConfig[\"info_on_found_react_version\"] !== false) {\n consoleLog(\n `\\n@anolilab/eslint-config found the version ${global.anolilabEslintConfigReactVersion} of react in your dependencies, this version ${global.anolilabEslintConfigReactVersion} will be used to setup the \"eslint-plugin-react\"\\n`,\n );\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n env: {\n browser: true,\n },\n\n files: [\"*.jsx\", \"*.tsx\"],\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n plugins: [\"react\"],\n\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"no-underscore-dangle\": [\n (dangleRules as unknown[])[0] as Linter.RuleLevel,\n {\n ...((dangleRules as unknown[])[1] as Linter.RuleLevelAndOptions[]),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any\n allow: [...(dangleRules as any)[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n message: \"\",\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n },\n ],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: false,\n submit: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Enforce or disallow spaces inside curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Validate JSX has key prop when in array or iterator\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n checkChildContextTypes: true,\n checkContextTypes: true,\n forbid: [\"any\", \"array\", \"object\"],\n },\n ],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Prevent usage of unwrapped JSX strings\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", props: \"never\" }],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", indent, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", indent],\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n allowArrowFunctions: true,\n allowBind: false,\n allowFunctions: false,\n ignoreDOMComponents: true,\n ignoreRefs: true,\n },\n ],\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n custom: \"enforce\",\n exceptions: [],\n explicitSpread: \"ignore\",\n html: \"enforce\",\n },\n ],\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": \"off\",\n\n // Disallow target=\"_blank\" on links\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n afterOpening: \"never\",\n beforeClosing: \"never\",\n beforeSelfClosing: \"always\",\n closingSlash: \"never\",\n },\n ],\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent passing of children as props\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n customValidators: [],\n ignore: [],\n skipUndeclared: false,\n },\n ],\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n functions: hasDependency(\"typescript\") || hasDevDependency(\"typescript\") ? \"defaultArguments\" : \"defaultProps\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n },\n ],\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n callbacksLast: false,\n ignoreCase: true,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Prevent adjacent inline elements not separated by whitespace\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforce a specific function type for function components\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n ...global.anolilabEslintConfigReactPrettierRules,\n },\n\n // View link below for react rules documentation\n settings: {\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: global.anolilabEslintConfigReactVersion ?? \"detect\",\n },\n },\n },\n {\n files: [\"*.jsx\"],\n parser: \"@babel/eslint-parser\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n settings: {\n extensions: [\".jsx\"],\n },\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n arrow: \"parens-new-line\",\n assignment: \"parens-new-line\",\n condition: \"parens-new-line\",\n declaration: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n return: \"parens-new-line\",\n },\n ],\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n },\n },\n {\n files: [\"*.tsx\"],\n rules: {\n \"react/default-props-match-prop-types\": \"off\",\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/prop-types\": \"off\",\n \"react/require-default-props\": \"off\",\n },\n },\n {\n // For performance run storybook/recommended on test files, not regular code\n files: [\"**/*.stories.{ts,tsx,mdx}\"],\n rules: {\n \"react/jsx-props-no-spreading\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/react.ts"],"names":["env","getPackageSubProperty","hasDependency","hasDevDependency","findUp","parse","styleRules","style_default","dangleRules","hasJsxRuntime","isFile","showLog","eslint_config_default","consoleLog","reactVersion","parsedVersion","config","indent_default","react_default"],"mappings":"gPACA,OAAS,OAAAA,MAAW,UAEpB,OAAS,yBAAAC,EAAuB,iBAAAC,EAAe,oBAAAC,MAAwB,+BAEvE,OAAOC,MAAY,UACnB,OAAS,SAAAC,MAAa,SAQtB,IAAMC,EAAaC,EAAY,UAAU,CAAC,EAAE,MACtCC,EAAcF,EAAW,sBAAsB,EAEjD,CAAC,OAAO,kCAAoCJ,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAGzC,OAAO,yCAA2C,QAAa,OAAO,kCACtE,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IA,wBAAyB,CACrB,MACA,CACI,cAAe,GACf,WAAY,GACZ,cAAe,GACf,cAAe,EACnB,CACJ,EAIA,6BAA8B,CAAC,QAAS,QAAQ,EAIhD,kCAAmC,CAAC,QAAS,qBAAqB,EAIlE,0BAA2B,QAI3B,sCAAuC,QAEvC,GAAG,OAAO,sCACd,EAGA,SAAU,CACN,qBAAsB,CAClB,mBACA,QACA,eACJ,EACA,MAAO,CAIH,QAAS,OAAO,kCAAoC,QACxD,CACJ,CACJ,EACA,CACI,MAAO,CAAC,UAAU,EAClB,OAAQ,uBACR,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EACA,SAAU,CACN,WAAY,CAAC,MAAM,CACvB,EACA,MAAO,CAGH,iCAAkC,QAIlC,+BAAgC,QAIhC,4BAA6B,CACzB,QACA,CACI,MAAO,kBACP,WAAY,kBACZ,UAAW,kBACX,YAAa,kBACb,QAAS,kBACT,KAAM,kBACN,OAAQ,iBACZ,CACJ,EAIA,iBAAkB,OACtB,CACJ,EACA,CACI,MAAO,CAAC,UAAU,EAClB,MAAO,CACH,uCAAwC,MAExC,+BAAgC,MAChC,mBAAoB,MACpB,8BAA+B,KACnC,CACJ,EACA,CAEI,MAAO,CAAC,2BAA2B,EACnC,MAAO,CACH,+BAAgC,KACpC,CACJ,CACJ,CACJ,EAEOe,EAAQF","sourcesContent":["// @see https://github.com/yannickcr/eslint-plugin-react\nimport { env } from \"node:process\";\n\nimport { getPackageSubProperty, hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport findUp from \"find-up\";\nimport { parse } from \"semver\";\n\nimport anolilabEslintConfig from \"../../utils/eslint-config\";\nimport indent from \"../../utils/indent\";\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\n// @ts-expect-error TODO: find the correct type\nconst styleRules = styleConfig.overrides[0].rules as Linter.RulesRecord;\nconst dangleRules = styleRules[\"no-underscore-dangle\"] as Linter.RuleEntry;\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nif (global.anolilabEslintConfigReactPrettierRules === undefined && global.hasAnolilabEsLintConfigPrettier) {\n global.anolilabEslintConfigReactPrettierRules = {\n \"react/jsx-child-element-spacing\": \"off\",\n \"react/jsx-closing-bracket-location\": \"off\",\n \"react/jsx-closing-tag-location\": \"off\",\n \"react/jsx-curly-newline\": \"off\",\n \"react/jsx-curly-spacing\": \"off\",\n \"react/jsx-equals-spacing\": \"off\",\n \"react/jsx-first-prop-new-line\": \"off\",\n \"react/jsx-indent\": \"off\",\n \"react/jsx-indent-props\": \"off\",\n \"react/jsx-max-props-per-line\": \"off\",\n \"react/jsx-newline\": \"off\",\n \"react/jsx-one-expression-per-line\": \"off\",\n \"react/jsx-props-no-multi-spaces\": \"off\",\n \"react/jsx-tag-spacing\": \"off\",\n \"react/jsx-wrap-multilines\": \"off\",\n };\n}\n\nconst hasJsxRuntime = (() => {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigReactRuntimePath) {\n const reactPath = findUp.sync(\"node_modules/react/jsx-runtime.js\");\n const isFile = typeof reactPath === \"string\";\n\n let showLog: boolean = env[\"DISABLE_INFO_ON_DISABLING_JSX_REACT_RULE\"] !== \"true\";\n\n if (showLog && anolilabEslintConfig[\"info_on_disabling_jsx_react_rule\"] !== undefined) {\n showLog = anolilabEslintConfig[\"info_on_disabling_jsx_react_rule\"] as boolean;\n }\n\n if (showLog && isFile) {\n consoleLog(`\\n@anolilab/eslint-config found react jsx-runtime. \\n\n Following rules are disabled: \"react/jsx-uses-react\" and \"react/react-in-jsx-scope\".\n If you dont use the new react jsx-runtime in you project, please enable it manually.\\n`);\n }\n\n global.hasAnolilabEsLintConfigReactRuntimePath = isFile;\n }\n\n return global.hasAnolilabEsLintConfigReactRuntimePath;\n})();\n\nif (!global.anolilabEslintConfigReactVersion) {\n let reactVersion = getPackageSubProperty<string | undefined>(\"dependencies\")(\"react\");\n\n if (reactVersion === undefined) {\n reactVersion = getPackageSubProperty<string | undefined>(\"devDependencies\")(\"react\");\n }\n\n if (reactVersion !== undefined) {\n const parsedVersion = parse(reactVersion);\n\n if (parsedVersion !== null) {\n global.anolilabEslintConfigReactVersion = `${parsedVersion.major}.${parsedVersion.minor}`;\n }\n }\n}\n\nif (global.anolilabEslintConfigReactVersion !== undefined && anolilabEslintConfig[\"info_on_found_react_version\"] !== false) {\n consoleLog(\n `\\n@anolilab/eslint-config found the version ${global.anolilabEslintConfigReactVersion} of react in your dependencies, this version ${global.anolilabEslintConfigReactVersion} will be used to setup the \"eslint-plugin-react\"\\n`,\n );\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n env: {\n browser: true,\n },\n\n files: [\"**/*.jsx\", \"**/*.tsx\"],\n\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n plugins: [\"react\"],\n\n // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules\n rules: {\n \"class-methods-use-this\": [\n \"error\",\n {\n exceptMethods: [\n \"render\",\n \"getInitialState\",\n \"getDefaultProps\",\n \"getChildContext\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"componentDidUpdate\",\n \"componentWillUnmount\",\n \"componentDidCatch\",\n \"getSnapshotBeforeUpdate\",\n ],\n },\n ],\n\n // Specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"error\", \"prefer-double\"],\n\n \"no-underscore-dangle\": [\n (dangleRules as unknown[])[0] as Linter.RuleLevel,\n {\n ...((dangleRules as unknown[])[1] as Linter.RuleLevelAndOptions[]),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-explicit-any\n allow: [...(dangleRules as any)[1].allow, \"__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\"],\n },\n ],\n\n // Prevent missing displayName in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md\n \"react/boolean-prop-naming\": [\n \"off\",\n {\n message: \"\",\n propTypeNames: [\"bool\", \"mutuallyExclusiveTrueProps\"],\n rule: \"^(is|has)[A-Z]([A-Za-z0-9]?)+\",\n },\n ],\n\n // Forbid certain propTypes (any, array, object)\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md\n \"react/button-has-type\": [\n \"error\",\n {\n button: true,\n reset: false,\n submit: true,\n },\n ],\n\n // Forbid certain props on DOM Nodes\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md\n \"react/default-props-match-prop-types\": [\"error\", { allowRequiredDefaults: false }],\n\n // Enforce boolean attributes notation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md\n \"react/destructuring-assignment\": [\"error\", \"always\"],\n\n // Validate closing bracket location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md\n \"react/display-name\": [\"off\", { ignoreTranspilerName: false }],\n\n // Enforce or disallow spaces inside curly braces in JSX attributes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md\n \"react/forbid-component-props\": [\"off\", { forbid: [] }],\n\n // Enforce event handler naming conventions in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md\n \"react/forbid-dom-props\": [\"off\", { forbid: [] }],\n\n // Validate props indentation in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md\n \"react/forbid-elements\": [\"off\", { forbid: [] }],\n\n // Validate JSX has key prop when in array or iterator\n // but it's only critical if you're stripping propTypes in production.\n \"react/forbid-foreign-prop-types\": [\"warn\", { allowInPropTypes: true }],\n\n // Limit maximum of props on a single line in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md\n \"react/forbid-prop-types\": [\n \"error\",\n {\n checkChildContextTypes: true,\n checkContextTypes: true,\n forbid: [\"any\", \"array\", \"object\"],\n },\n ],\n\n // Prevent usage of .bind() in JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md\n \"react/function-component-definition\": [\n \"error\",\n {\n namedComponents: \"arrow-function\",\n unnamedComponents: \"arrow-function\",\n },\n ],\n\n // Prevent duplicate props in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md\n \"react/jsx-boolean-value\": [\"error\", \"never\", { always: [] }],\n\n // Prevent usage of unwrapped JSX strings\n // Ensures inline tags are not rendered without spaces between them\n \"react/jsx-child-element-spacing\": \"off\",\n\n // Disallow undeclared variables in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md\n \"react/jsx-closing-bracket-location\": [\"error\", \"line-aligned\"],\n\n // Enforce PascalCase for user-defined JSX components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", props: \"never\" }],\n\n // Enforce propTypes declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md\n \"react/jsx-curly-newline\": [\n \"error\",\n {\n multiline: \"consistent\",\n singleline: \"consistent\",\n },\n ],\n\n // Enforce props alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md\n \"react/jsx-curly-spacing\": [\"error\", \"never\", { allowMultiline: true }],\n\n // Prevent React to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md\n \"react/jsx-equals-spacing\": [\"error\", \"never\"],\n\n // Prevent variables used in JSX to be incorrectly marked as unused\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md\n \"react/jsx-first-prop-new-line\": [\"error\", \"multiline-multiprop\"],\n\n // Prevent usage of dangerous JSX properties\n // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md\n \"react/jsx-fragments\": [\"error\", \"syntax\"],\n\n // Prevent usage of deprecated methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md\n \"react/jsx-handler-names\": [\n \"off\",\n {\n eventHandlerPrefix: \"handle\",\n eventHandlerPropPrefix: \"on\",\n },\n ],\n\n // Prevent usage of setState in componentWillUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md\n \"react/jsx-indent\": [\"error\", indent, { checkAttributes: true, indentLogicalExpressions: true }],\n\n // Prevent direct mutation of this.state\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md\n \"react/jsx-indent-props\": [\"error\", indent],\n\n // Prevent usage of isMounted\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md\n \"react/jsx-key\": \"off\",\n\n // Prevent multiple component definition per file\n // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md\n \"react/jsx-max-depth\": \"off\",\n\n // Prevent usage of setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md\n \"react/jsx-max-props-per-line\": [\"error\", { maximum: 1, when: \"multiline\" }],\n\n // Prevent using string references\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md\n \"react/jsx-newline\": \"off\",\n\n // Prevent usage of unknown DOM property\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md\n \"react/jsx-no-bind\": [\n \"error\",\n {\n allowArrowFunctions: true,\n allowBind: false,\n allowFunctions: false,\n ignoreDOMComponents: true,\n ignoreRefs: true,\n },\n ],\n\n // Require ES6 class declarations over React.createClass\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md\n \"react/jsx-no-comment-textnodes\": \"error\",\n\n // Require stateless functions when not using lifecycle methods, setState or ref\n // https://github.com/yannickcr/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md\n \"react/jsx-no-constructed-context-values\": \"error\",\n\n // Prevent missing props validation in a React component definition\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md\n \"react/jsx-no-duplicate-props\": [\"error\", { ignoreCase: true }],\n\n // Prevent missing React when using JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md\n \"react/jsx-no-literals\": [\"off\", { noStrings: true }],\n\n // Require render() methods to return something\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md\n \"react/jsx-no-script-url\": [\n \"error\",\n [\n {\n name: \"Link\",\n props: [\"to\"],\n },\n ],\n ],\n\n // Prevent extra closing tags for components without children\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md\n \"react/jsx-no-target-blank\": [\"error\", { enforceDynamicLinks: \"always\" }],\n\n // Enforce defaultProps declarations alphabetical sorting\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md\n \"react/jsx-no-undef\": \"error\",\n\n // Enforce component methods order\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md\n \"react/jsx-no-useless-fragment\": \"error\",\n\n // Require that the first prop in a JSX element be on a new line when the element is multiline\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md\n \"react/jsx-one-expression-per-line\": [\"error\", { allow: \"single-child\" }],\n\n // Enforce spacing around jsx equals signs\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md\n \"react/jsx-pascal-case\": [\n \"error\",\n {\n allowAllCaps: true,\n ignore: [],\n },\n ],\n\n // Enforce JSX indentation\n // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md\n \"react/jsx-props-no-multi-spaces\": \"error\",\n\n // Prevent usage of setState in componentDidMount\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md\n \"react/jsx-props-no-spreading\": [\n \"error\",\n {\n custom: \"enforce\",\n exceptions: [],\n explicitSpread: \"ignore\",\n html: \"enforce\",\n },\n ],\n\n // Prevent usage of setState in componentDidUpdate\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md\n \"react/jsx-sort-props\": \"off\",\n\n // Disallow target=\"_blank\" on links\n // Deprecated in favor of jsx-tag-spacing\n \"react/jsx-space-before-closing\": [\"off\", \"always\"],\n\n // prevent accidental JS comments from being injected into JSX as text\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md\n \"react/jsx-tag-spacing\": [\n \"error\",\n {\n afterOpening: \"never\",\n beforeClosing: \"never\",\n beforeSelfClosing: \"always\",\n closingSlash: \"never\",\n },\n ],\n\n // disallow using React.render/ReactDOM.render's return value\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md\n \"react/jsx-uses-react\": [hasJsxRuntime ? \"off\" : \"error\"],\n\n // require a shouldComponentUpdate method, or PureRenderMixin\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md\n \"react/jsx-uses-vars\": \"error\",\n\n // warn against using findDOMNode()\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md\n \"react/no-access-state-in-setstate\": \"error\",\n\n // Forbid certain props on Components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md\n \"react/no-adjacent-inline-elements\": \"error\",\n\n // Forbid certain elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md\n \"react/no-array-index-key\": \"error\",\n\n // Prevent problem with children and props.dangerouslySetInnerHTML\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md\n \"react/no-children-prop\": \"error\",\n\n // Prevent unused propType definitions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md\n \"react/no-danger\": \"warn\",\n\n // Require style prop value be an object or var\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md\n \"react/no-danger-with-children\": \"error\",\n\n // Prevent invalid characters from appearing in markup\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md\n \"react/no-deprecated\": [\"error\"],\n\n // Prevent passing of children as props\n // this is necessary for server-rendering\n \"react/no-did-mount-set-state\": \"off\",\n\n // Validate whitespace in and around the JSX opening and closing brackets\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md\n \"react/no-did-update-set-state\": \"error\",\n\n // Enforce spaces before the closing bracket of self-closing JSX elements\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md\n \"react/no-direct-mutation-state\": \"error\",\n\n // Prevent usage of Array index in keys\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md\n \"react/no-find-dom-node\": \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md\n \"react/no-is-mounted\": \"error\",\n\n // Forbids using non-exported propTypes\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md\n // this is intentionally set to \"warn\". it would be \"error\",\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md\n \"react/no-multi-comp\": \"off\",\n\n // Prevent void DOM elements from receiving children\n // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md\n \"react/no-redundant-should-component-update\": \"error\",\n\n // Enforce all defaultProps have a corresponding non-required PropType\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md\n \"react/no-render-return-value\": \"error\",\n\n // Prevent usage of shouldComponentUpdate when extending React.PureComponent\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md\n \"react/no-set-state\": \"off\",\n\n // Prevent unused state values\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md\n \"react/no-string-refs\": \"error\",\n\n // Enforces consistent naming for boolean props\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md\n \"react/no-this-in-sfc\": \"error\",\n\n // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md\n \"react/no-unescaped-entities\": \"error\",\n\n // One JSX Element Per Line\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md\n \"react/no-unknown-property\": \"error\",\n\n // Enforce consistent usage of destructuring assignment of props, state, and context\n // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md\n \"react/no-unsafe\": \"off\",\n\n // Prevent using this.state within a this.setState\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md\n \"react/no-unused-prop-types\": [\n \"error\",\n {\n customValidators: [],\n skipShapeProps: true,\n },\n ],\n\n // Prevent usage of button elements without an explicit type attribute\n // https://github.com/yannickcr/eslint-plugin-react/pull/1103/\n \"react/no-unused-state\": \"error\",\n\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md\n \"react/no-will-update-set-state\": \"error\",\n\n // Prevent this from being used in stateless functional components\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md\n \"react/prefer-es6-class\": [\"error\", \"always\"],\n\n // Validate JSX maximum depth\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md\n \"react/prefer-read-only-props\": \"off\",\n\n // Disallow multiple spaces between inline JSX props\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md\n \"react/prefer-stateless-function\": [\"error\", { ignorePureComponents: true }],\n\n // Prevent usage of UNSAFE_ methods\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md\n \"react/prop-types\": [\n \"error\",\n {\n customValidators: [],\n ignore: [],\n skipUndeclared: false,\n },\n ],\n\n // Enforce shorthand or standard form for React fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md\n \"react/react-in-jsx-scope\": hasJsxRuntime ? \"off\" : \"error\",\n\n // Enforce a defaultProps definition for every prop that is not a required prop\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md\n \"react/require-default-props\": [\n \"error\",\n {\n forbidDefaultForRequired: true,\n functions: hasDependency(\"typescript\") || hasDevDependency(\"typescript\") ? \"defaultArguments\" : \"defaultProps\",\n },\n ],\n\n // Enforce state initialization style\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md\n \"react/require-optimization\": [\"off\", { allowDecorators: [] }],\n\n // Enforces where React component static properties should be positioned\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md\n \"react/require-render-return\": \"error\",\n\n // Disallow JSX props spreading\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md\n \"react/self-closing-comp\": \"error\",\n\n // Enforce that props are read-only\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md\n \"react/sort-comp\": [\n \"error\",\n {\n groups: {\n lifecycle: [\n \"displayName\",\n \"propTypes\",\n \"contextTypes\",\n \"childContextTypes\",\n \"mixins\",\n \"statics\",\n \"defaultProps\",\n \"constructor\",\n \"getDefaultProps\",\n \"getInitialState\",\n \"state\",\n \"getChildContext\",\n \"getDerivedStateFromProps\",\n \"componentWillMount\",\n \"UNSAFE_componentWillMount\",\n \"componentDidMount\",\n \"componentWillReceiveProps\",\n \"UNSAFE_componentWillReceiveProps\",\n \"shouldComponentUpdate\",\n \"componentWillUpdate\",\n \"UNSAFE_componentWillUpdate\",\n \"getSnapshotBeforeUpdate\",\n \"componentDidUpdate\",\n \"componentDidCatch\",\n \"componentWillUnmount\",\n ],\n rendering: [\"/^render.+$/\", \"render\"],\n },\n order: [\n \"static-variables\",\n \"static-methods\",\n \"instance-variables\",\n \"lifecycle\",\n \"/^handle.+$/\",\n \"/^on.+$/\",\n \"getters\",\n \"setters\",\n \"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/\",\n \"instance-methods\",\n \"everything-else\",\n \"rendering\",\n ],\n },\n ],\n\n // Prevent usage of `javascript:` URLs\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-default-props.md\n \"react/sort-default-props\": [\n \"error\",\n {\n ignoreCase: true,\n },\n ],\n\n // Disallow unnecessary fragments\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md\n \"react/sort-prop-types\": [\n \"off\",\n {\n callbacksLast: false,\n ignoreCase: true,\n requiredFirst: false,\n sortShapeProp: true,\n },\n ],\n\n // Prevent adjacent inline elements not separated by whitespace\n // TODO: set to \"never\" once @anolilab/babel-preset supports public class fields\n \"react/state-in-constructor\": [\"error\", \"always\"],\n\n // Enforce a specific function type for function components\n // TODO: set to \"static public field\" once @anolilab/babel-preset supports public class fields\n \"react/static-property-placement\": [\"error\", \"property assignment\"],\n\n // Enforce a new line after jsx elements and expressions\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md\n \"react/style-prop-object\": \"error\",\n\n // Prevent react contexts from taking non-stable values\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md\n \"react/void-dom-elements-no-children\": \"error\",\n\n ...global.anolilabEslintConfigReactPrettierRules,\n },\n\n // View link below for react rules documentation\n settings: {\n propWrapperFunctions: [\n \"forbidExtraProps\", // https://www.npmjs.com/package/airbnb-prop-types\n \"exact\", // https://www.npmjs.com/package/prop-types-exact\n \"Object.freeze\", // https://tc39.github.io/ecma262/#sec-object.freeze\n ],\n react: {\n // The default value is \"detect\". Automatic detection works by loading the entire React library\n // into the linter's process, which is inefficient. It is recommended to specify the version\n // explicity.\n version: global.anolilabEslintConfigReactVersion ?? \"detect\",\n },\n },\n },\n {\n files: [\"**/*.jsx\"],\n parser: \"@babel/eslint-parser\",\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n settings: {\n extensions: [\".jsx\"],\n },\n rules: {\n // only .jsx files may have JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md\n \"react/jsx-closing-tag-location\": \"error\",\n\n // Prevents common casing typos\n // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md\n \"react/jsx-filename-extension\": \"error\",\n\n // Validate closing tag location in JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md\n \"react/jsx-wrap-multilines\": [\n \"error\",\n {\n arrow: \"parens-new-line\",\n assignment: \"parens-new-line\",\n condition: \"parens-new-line\",\n declaration: \"parens-new-line\",\n logical: \"parens-new-line\",\n prop: \"parens-new-line\",\n return: \"parens-new-line\",\n },\n ],\n\n // Prevent missing parentheses around multilines JSX\n // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md\n \"react/no-typos\": \"error\",\n },\n },\n {\n files: [\"**/*.tsx\"],\n rules: {\n \"react/default-props-match-prop-types\": \"off\",\n // Disable JS specific rules\n \"react/jsx-filename-extension\": \"off\",\n \"react/prop-types\": \"off\",\n \"react/require-default-props\": \"off\",\n },\n },\n {\n // For performance run storybook/recommended on test files, not regular code\n files: [\"**/*.stories.{ts,tsx,mdx}\"],\n rules: {\n \"react/jsx-props-no-spreading\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -3,7 +3,7 @@
3
3
  var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
4
4
  require('../../chunk-MFE6DF6Y.js');
5
5
 
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;
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
 
8
8
  module.exports = o;
9
9
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/sonarjs.ts"],"names":["config","createConfigs","sonarjs_default"],"mappings":"4EAKA,IAAMA,EAAwBC,EAAc,CACxC,CACI,OAAQ,CACJ,cAAe,CAAC,kCAAmC,2BAA2B,EAC9E,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,sCAAuC,KAC3C,CACJ,EACA,KAAM,KACV,EACA,CACI,OAAQ,CACJ,MAAO,CAEH,+BAAgC,CAAC,QAAS,EAAE,EAE5C,8BAA+B,KACnC,CACJ,EACA,KAAM,WACV,EACA,CACI,OAAQ,CACJ,OAAQ,SACR,cAAe,CACX,YAAa,IACjB,EACA,MAAO,CACH,qCAAsC,MACtC,8BAA+B,KACnC,CACJ,EACA,KAAM,YACV,CACJ,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfigs } from \"../../utils/create-config\";\n\n// @see https://github.com/SonarSource/eslint-plugin-sonarjs\nconst config: Linter.Config = createConfigs([\n {\n config: {\n excludedFiles: [\"**/?(*.)+(test).{js,jsx,ts,tsx}\", \"*.stories.{js,ts,jsx,tsx}\"],\n extends: [\"plugin:sonarjs/recommended\"],\n rules: {\n \"sonarjs/no-nested-template-literals\": \"off\",\n },\n },\n type: \"all\",\n },\n {\n config: {\n rules: {\n // relax complexity for react code\n \"sonarjs/cognitive-complexity\": [\"error\", 15],\n // relax duplicate strings\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n type: \"js_and_ts\",\n },\n {\n config: {\n parser: \"espree\",\n parserOptions: {\n ecmaVersion: 2020,\n },\n rules: {\n \"sonarjs/no-all-duplicated-branches\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n type: \"javascript\",\n },\n]);\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/sonarjs.ts"],"names":["config","createConfigs","sonarjs_default"],"mappings":"4EAKA,IAAMA,EAAwBC,EAAc,CACxC,CACI,OAAQ,CACJ,cAAe,CAAC,kCAAmC,8BAA8B,EACjF,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,sCAAuC,KAC3C,CACJ,EACA,KAAM,KACV,EACA,CACI,OAAQ,CACJ,MAAO,CAEH,+BAAgC,CAAC,QAAS,EAAE,EAE5C,8BAA+B,KACnC,CACJ,EACA,KAAM,WACV,EACA,CACI,OAAQ,CACJ,OAAQ,SACR,cAAe,CACX,YAAa,IACjB,EACA,MAAO,CACH,qCAAsC,MACtC,8BAA+B,KACnC,CACJ,EACA,KAAM,YACV,CACJ,CAAC,EAEMC,EAAQF","sourcesContent":["import type { Linter } from \"eslint\";\n\nimport { createConfigs } from \"../../utils/create-config\";\n\n// @see https://github.com/SonarSource/eslint-plugin-sonarjs\nconst config: Linter.Config = createConfigs([\n {\n config: {\n excludedFiles: [\"**/?(*.)+(test).{js,jsx,ts,tsx}\", \"**/*.stories.{js,ts,jsx,tsx}\"],\n extends: [\"plugin:sonarjs/recommended\"],\n rules: {\n \"sonarjs/no-nested-template-literals\": \"off\",\n },\n },\n type: \"all\",\n },\n {\n config: {\n rules: {\n // relax complexity for react code\n \"sonarjs/cognitive-complexity\": [\"error\", 15],\n // relax duplicate strings\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n type: \"js_and_ts\",\n },\n {\n config: {\n parser: \"espree\",\n parserOptions: {\n ecmaVersion: 2020,\n },\n rules: {\n \"sonarjs/no-all-duplicated-branches\": \"off\",\n \"sonarjs/no-duplicate-string\": \"off\",\n },\n },\n type: \"javascript\",\n },\n]);\n\nexport default config;\n"]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('../../chunk-MFE6DF6Y.js');
4
4
 
5
- var e={overrides:[{extends:["plugin:toml/standard"],files:["*.toml"],parser:"toml-eslint-parser"}]},t=e;
5
+ var e={overrides:[{extends:["plugin:toml/standard"],files:["**/*.toml"],parser:"toml-eslint-parser"}]},t=e;
6
6
 
7
7
  module.exports = t;
8
8
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/toml.ts"],"names":["config","toml_default"],"mappings":"gCAEA,IAAMA,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,sBAAsB,EAChC,MAAO,CAAC,QAAQ,EAChB,OAAQ,oBACZ,CACJ,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:toml/standard\"],\n files: [\"*.toml\"],\n parser: \"toml-eslint-parser\",\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/toml.ts"],"names":["config","toml_default"],"mappings":"gCAEA,IAAMA,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,sBAAsB,EAChC,MAAO,CAAC,WAAW,EACnB,OAAQ,oBACZ,CACJ,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Linter } from \"eslint\";\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:toml/standard\"],\n files: [\"**/*.toml\"],\n parser: \"toml-eslint-parser\",\n },\n ],\n};\n\nexport default config;\n"]}
@@ -6,7 +6,7 @@ require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
  var semver = require('semver');
8
8
 
9
- global.anolilabEslintConfigUnicornPrettierRules===void 0&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.anolilabEslintConfigUnicornPrettierRules={"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"});var t={extends:["plugin:unicorn/recommended"],overrides:[{files:["tsconfig.dev.json","tsconfig.prod.json"],rules:{"unicorn/prevent-abbreviations":"off"}},{files:["*.ts","*.tsx","*.mts","*.cts"],rules:{"unicorn/import-style":"off"}}],plugins:["unicorn"],rules:{"function-call-argument-newline":"off","unicorn/better-regex":["error",{sortCharacterClasses:!1}],"unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-array-for-each":"off","unicorn/no-null":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":packageJsonUtils.packageIsTypeModule?"error":"off","unicorn/prefer-node-protocol":semver.gte(process.version,"v16.0.0")?"error":"off","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/template-indent":["error",{indent:chunkR26SPKXH_js.a}],...global.anolilabEslintConfigUnicornPrettierRules}},l=t;
9
+ global.anolilabEslintConfigUnicornPrettierRules===void 0&&(packageJsonUtils.hasDependency("prettier")||packageJsonUtils.hasDevDependency("prettier"))&&(global.anolilabEslintConfigUnicornPrettierRules={"unicorn/empty-brace-spaces":"off","unicorn/no-nested-ternary":"off","unicorn/number-literal-case":"off","unicorn/template-indent":"off"});var t={extends:["plugin:unicorn/recommended"],overrides:[{files:["tsconfig.dev.json","tsconfig.prod.json"],rules:{"unicorn/prevent-abbreviations":"off"}},{files:["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],rules:{"unicorn/import-style":"off"}}],plugins:["unicorn"],rules:{"function-call-argument-newline":"off","unicorn/better-regex":["error",{sortCharacterClasses:!1}],"unicorn/consistent-destructuring":"off","unicorn/consistent-function-scoping":"off","unicorn/filename-case":["error",{case:"kebabCase",ignore:[/(FUNDING\.yml|README\.md|CHANGELOG\.md|CONTRIBUTING\.md|CODE_OF_CONDUCT\.md|SECURITY\.md|LICENSE)/u]}],"unicorn/no-array-for-each":"off","unicorn/no-null":"off","unicorn/no-useless-undefined":"off","unicorn/prefer-json-parse-buffer":"off","unicorn/prefer-module":packageJsonUtils.packageIsTypeModule?"error":"off","unicorn/prefer-node-protocol":semver.gte(process.version,"v16.0.0")?"error":"off","unicorn/prefer-ternary":["error","only-single-line"],"unicorn/template-indent":["error",{indent:chunkR26SPKXH_js.a}],...global.anolilabEslintConfigUnicornPrettierRules}},l=t;
10
10
 
11
11
  module.exports = l;
12
12
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasDependency","hasDevDependency","packageIsTypeModule","gte","config","indent_default","unicorn_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,uBAAAC,MAA2B,+BAErE,OAAS,OAAAC,MAAW,SAIhB,OAAO,2CAA6C,SAAcH,EAAc,UAAU,GAAKC,EAAiB,UAAU,KAC1H,OAAO,yCAA2C,CAC9C,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAMG,EAAwB,CAC1B,QAAS,CAAC,4BAA4B,EACtC,UAAW,CACP,CACI,MAAO,CAAC,oBAAqB,oBAAoB,EACjD,MAAO,CACH,gCAAiC,KACrC,CACJ,EACA,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,EACA,QAAS,CAAC,SAAS,EACnB,MAAO,CAEH,iCAAkC,MAElC,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAEA,mCAAoC,MAEpC,sCAAuC,MAEvC,wBAAyB,CACrB,QACA,CACI,KAAM,YACN,OAAQ,CAAC,oGAAoG,CACjH,CACJ,EAEA,4BAA6B,MAG7B,kBAAmB,MAGnB,+BAAgC,MAGhC,mCAAoC,MAEpC,wBAAyBF,EAAsB,QAAU,MAEzD,+BAAgCC,EAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MAG5E,yBAA0B,CAAC,QAAS,kBAAkB,EAEtD,0BAA2B,CAAC,QAAS,CAAE,OAAAE,CAAO,CAAC,EAE/C,GAAG,OAAO,wCACd,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { gte } from \"semver\";\n\nimport indent from \"../../utils/indent\";\n\nif (global.anolilabEslintConfigUnicornPrettierRules === undefined && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.anolilabEslintConfigUnicornPrettierRules = {\n \"unicorn/empty-brace-spaces\": \"off\",\n \"unicorn/no-nested-ternary\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/template-indent\": \"off\",\n };\n}\n\n// @see https://github.com/sindresorhus/eslint-plugin-unicorn\nconst config: Linter.Config = {\n extends: [\"plugin:unicorn/recommended\"],\n overrides: [\n {\n files: [\"tsconfig.dev.json\", \"tsconfig.prod.json\"],\n rules: {\n \"unicorn/prevent-abbreviations\": \"off\",\n },\n },\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n plugins: [\"unicorn\"],\n rules: {\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n // The character class sorting is a bit buggy at the moment.\n \"unicorn/better-regex\": [\n \"error\",\n {\n sortCharacterClasses: false,\n },\n ],\n // TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues\n \"unicorn/consistent-destructuring\": \"off\",\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n \"unicorn/filename-case\": [\n \"error\",\n {\n case: \"kebabCase\",\n ignore: [/(FUNDING\\.yml|README\\.md|CHANGELOG\\.md|CONTRIBUTING\\.md|CODE_OF_CONDUCT\\.md|SECURITY\\.md|LICENSE)/u],\n },\n ],\n\n \"unicorn/no-array-for-each\": \"off\",\n\n // TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2024.\n \"unicorn/no-null\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\n \"unicorn/prefer-node-protocol\": gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n\n // We only enforce it for single-line statements to not be too opinionated.\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n \"unicorn/template-indent\": [\"error\", { indent }],\n\n ...global.anolilabEslintConfigUnicornPrettierRules,\n },\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasDependency","hasDevDependency","packageIsTypeModule","gte","config","indent_default","unicorn_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,EAAkB,uBAAAC,MAA2B,+BAErE,OAAS,OAAAC,MAAW,SAIhB,OAAO,2CAA6C,SAAcH,EAAc,UAAU,GAAKC,EAAiB,UAAU,KAC1H,OAAO,yCAA2C,CAC9C,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAMG,EAAwB,CAC1B,QAAS,CAAC,4BAA4B,EACtC,UAAW,CACP,CACI,MAAO,CAAC,oBAAqB,oBAAoB,EACjD,MAAO,CACH,gCAAiC,KACrC,CACJ,EACA,CACI,MAAO,CAAC,UAAW,WAAY,WAAY,UAAU,EACrD,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,EACA,QAAS,CAAC,SAAS,EACnB,MAAO,CAEH,iCAAkC,MAElC,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAEA,mCAAoC,MAEpC,sCAAuC,MAEvC,wBAAyB,CACrB,QACA,CACI,KAAM,YACN,OAAQ,CAAC,oGAAoG,CACjH,CACJ,EAEA,4BAA6B,MAG7B,kBAAmB,MAGnB,+BAAgC,MAGhC,mCAAoC,MAEpC,wBAAyBF,EAAsB,QAAU,MAEzD,+BAAgCC,EAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MAG5E,yBAA0B,CAAC,QAAS,kBAAkB,EAEtD,0BAA2B,CAAC,QAAS,CAAE,OAAAE,CAAO,CAAC,EAE/C,GAAG,OAAO,wCACd,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { gte } from \"semver\";\n\nimport indent from \"../../utils/indent\";\n\nif (global.anolilabEslintConfigUnicornPrettierRules === undefined && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.anolilabEslintConfigUnicornPrettierRules = {\n \"unicorn/empty-brace-spaces\": \"off\",\n \"unicorn/no-nested-ternary\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/template-indent\": \"off\",\n };\n}\n\n// @see https://github.com/sindresorhus/eslint-plugin-unicorn\nconst config: Linter.Config = {\n extends: [\"plugin:unicorn/recommended\"],\n overrides: [\n {\n files: [\"tsconfig.dev.json\", \"tsconfig.prod.json\"],\n rules: {\n \"unicorn/prevent-abbreviations\": \"off\",\n },\n },\n {\n files: [\"**/*.ts\", \"**/*.tsx\", \"**/*.mts\", \"**/*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n plugins: [\"unicorn\"],\n rules: {\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n // The character class sorting is a bit buggy at the moment.\n \"unicorn/better-regex\": [\n \"error\",\n {\n sortCharacterClasses: false,\n },\n ],\n // TODO: Disabled for now until it becomes more stable: https://github.com/sindresorhus/eslint-plugin-unicorn/search?q=consistent-destructuring+is:issue&state=open&type=issues\n \"unicorn/consistent-destructuring\": \"off\",\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n \"unicorn/filename-case\": [\n \"error\",\n {\n case: \"kebabCase\",\n ignore: [/(FUNDING\\.yml|README\\.md|CHANGELOG\\.md|CONTRIBUTING\\.md|CODE_OF_CONDUCT\\.md|SECURITY\\.md|LICENSE)/u],\n },\n ],\n\n \"unicorn/no-array-for-each\": \"off\",\n\n // TODO: Disabled for now as I don't have time to deal with the backslash that might come from this. Try to enable this rule in 2024.\n \"unicorn/no-null\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\n \"unicorn/prefer-node-protocol\": gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n\n // We only enforce it for single-line statements to not be too opinionated.\n \"unicorn/prefer-ternary\": [\"error\", \"only-single-line\"],\n\n \"unicorn/template-indent\": [\"error\", { indent }],\n\n ...global.anolilabEslintConfigUnicornPrettierRules,\n },\n};\n\nexport default config;\n"]}
@@ -5,7 +5,7 @@ require('../../chunk-WW4PDMXQ.js');
5
5
  require('../../chunk-MFE6DF6Y.js');
6
6
  var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
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",chunkR26SPKXH_js.a],"spaced-comment":"off"}}]},o=t;
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",chunkR26SPKXH_js.a],"spaced-comment":"off"}}]},o=t;
9
9
 
10
10
  module.exports = o;
11
11
  //# sourceMappingURL=out.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/yml.ts"],"names":["hasDependency","hasDevDependency","config","indent_default","yml_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAK5C,CAAC,OAAO,kCAAoCD,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAG7C,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,yBAA0B,GAAI,OAAO,gCAAkC,CAAC,qBAAqB,EAAI,CAAC,CAAE,EAC9G,MAAO,CAAC,SAAU,OAAO,EACzB,OAAQ,qBACR,MAAO,CACH,OAAQ,CAAC,OAAO,gCAAkC,MAAQ,QAASC,CAAM,EACzE,iBAAkB,KACtB,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport indent from \"../../utils/indent\";\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:yml/recommended\", ...(global.hasAnolilabEsLintConfigPrettier ? [\"plugin:yml/prettier\"] : [])],\n files: [\"*.yaml\", \"*.yml\"],\n parser: \"yaml-eslint-parser\",\n rules: {\n indent: [global.hasAnolilabEsLintConfigPrettier ? \"off\" : \"error\", indent],\n \"spaced-comment\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/yml.ts"],"names":["hasDependency","hasDevDependency","config","indent_default","yml_default"],"mappings":"4GAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAK5C,CAAC,OAAO,kCAAoCD,EAAc,UAAU,GAAKC,EAAiB,UAAU,KACpG,OAAO,gCAAkC,IAG7C,IAAMC,EAAwB,CAC1B,UAAW,CACP,CACI,QAAS,CAAC,yBAA0B,GAAI,OAAO,gCAAkC,CAAC,qBAAqB,EAAI,CAAC,CAAE,EAC9G,MAAO,CAAC,YAAa,UAAU,EAC/B,OAAQ,qBACR,MAAO,CACH,OAAQ,CAAC,OAAO,gCAAkC,MAAQ,QAASC,CAAM,EACzE,iBAAkB,KACtB,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nimport indent from \"../../utils/indent\";\n\nif (!global.hasAnolilabEsLintConfigPrettier && (hasDependency(\"prettier\") || hasDevDependency(\"prettier\"))) {\n global.hasAnolilabEsLintConfigPrettier = true;\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n extends: [\"plugin:yml/recommended\", ...(global.hasAnolilabEsLintConfigPrettier ? [\"plugin:yml/prettier\"] : [])],\n files: [\"**/*.yaml\", \"**/*.yml\"],\n parser: \"yaml-eslint-parser\",\n rules: {\n indent: [global.hasAnolilabEsLintConfigPrettier ? \"off\" : \"error\", indent],\n \"spaced-comment\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
@@ -43,25 +43,25 @@ module.exports = defineConfig({
43
43
  overrides: [
44
44
  {
45
45
  files: [
46
- "*.ts",
47
- "*.tsx",
48
- "*.mts",
49
- "*.cts",
50
- "*.js",
51
- "*.jsx",
46
+ "**/*.ts",
47
+ "**/*.tsx",
48
+ "**/*.mts",
49
+ "**/*.cts",
50
+ "**/*.js",
51
+ "**/*.jsx",
52
52
  ],
53
53
  // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
54
54
  parserOptions: {},
55
55
  rules: {},
56
56
  },
57
57
  {
58
- files: ["*.ts", "*.tsx", "*.mts", "*.cts"],
58
+ files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
59
59
  // Set parserOptions.project for the project to allow TypeScript to create the type-checker behind the scenes when we run linting
60
60
  parserOptions: {},
61
61
  rules: {},
62
62
  },
63
63
  {
64
- files: ["*.js", "*.jsx"],
64
+ files: ["**/*.js", "**/*.jsx"],
65
65
  rules: {},
66
66
  },
67
67
  ],
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall/write-eslint-ignore.ts","../src/postinstall/write-eslint-rc.ts","../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","projectPath","writeFileAsync","writeEslintIgnore","write_eslint_ignore_default","init_write_eslint_ignore","__esmMin","eslintIgnorePath","readFileSync","packageIsTypeModule","configFile","writeEslintRc","write_eslint_rc_default","init_write_eslint_rc","filename","eslintPath","pluginExtends","parserOptions","tsconfigPath","ecmaVersion","tsConfig","content","env","exit","require_postinstall","__commonJSMin","error"],"mappings":"+CAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,eAAAC,MAAmB,+BAJ5B,IAMMC,EAEAC,EAaCC,EArBPC,EAAAC,EAAA,kBAMMJ,EAAiBF,EAAUF,CAAS,EAEpCK,EAAoB,SAA2B,CACjD,IAAMI,EAAmBR,EAAKE,EAAa,eAAe,EAG1D,GAAIJ,EAAWU,CAAgB,EAAG,CAC9B,QAAQ,KAAK,4CAAkC,EAE/C,MACJ,CAEA,MAAML,EAAeK,EAAkB,GAAI,MAAM,CACrD,EAEOH,EAAQD,ICrBf,OAAS,cAAAN,EAAY,gBAAAW,EAAc,aAAAV,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAS,EAAqB,eAAAR,MAAmB,+BAJjD,IAOMC,EAIAQ,EAGAC,EAuGCC,EArHPC,EAAAP,EAAA,kBAOMJ,EAAiBF,EAAUF,CAAS,EAE1C,QAAQ,IAAI,sCAAuCG,EAAa;AAAA,CAAI,EAE9DS,EAAa,YAGbC,EAAgB,SAA2B,CAE7C,QAAWG,IAAY,CAACJ,EAAY,GAAGA,CAAU,MAAO,GAAGA,CAAU,OAAQ,GAAGA,CAAU,QAAS,GAAGA,CAAU,QAAS,GAAGA,CAAU,MAAM,EAExI,GAAIb,EAAWE,EAAKE,EAAaa,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,gEAEwB,EAEpD,MACJ,CAGJ,IAAMC,EAAahB,EAAKE,EAAa,aAAaQ,EAAsB,IAAM,EAAE,IAAI,EAEhFO,EAAgB,GAChBC,EAAgB;AAAA;AAAA;AAAA,sBAGFR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AAA,KAIApB,IACAQ,IAEIS,EAAI,IACJC,EAAK,CAAC,EAGV,QAAQ,IAAI,sCAAuCtB,EAAa;AAAA,CAAI,GAGnE,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACW,EAAc,EAAGR,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAEjDmB,EAAK,CAAC,CACV,OAASG,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBH,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\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 { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\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,no-loops/no-loops\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 { env, exit } from \"node:process\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\n\nimport writeEslintIgnore from \"./postinstall/write-eslint-ignore\";\nimport writeEslintRc from \"./postinstall/write-eslint-rc\";\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"]}
1
+ {"version":3,"sources":["../src/postinstall/write-eslint-ignore.ts","../src/postinstall/write-eslint-rc.ts","../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","projectPath","writeFileAsync","writeEslintIgnore","write_eslint_ignore_default","init_write_eslint_ignore","__esmMin","eslintIgnorePath","readFileSync","packageIsTypeModule","configFile","writeEslintRc","write_eslint_rc_default","init_write_eslint_rc","filename","eslintPath","pluginExtends","parserOptions","tsconfigPath","ecmaVersion","tsConfig","content","env","exit","require_postinstall","__commonJSMin","error"],"mappings":"+CAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,eAAAC,MAAmB,+BAJ5B,IAMMC,EAEAC,EAaCC,EArBPC,EAAAC,EAAA,kBAMMJ,EAAiBF,EAAUF,CAAS,EAEpCK,EAAoB,SAA2B,CACjD,IAAMI,EAAmBR,EAAKE,EAAa,eAAe,EAG1D,GAAIJ,EAAWU,CAAgB,EAAG,CAC9B,QAAQ,KAAK,4CAAkC,EAE/C,MACJ,CAEA,MAAML,EAAeK,EAAkB,GAAI,MAAM,CACrD,EAEOH,EAAQD,ICrBf,OAAS,cAAAN,EAAY,gBAAAW,EAAc,aAAAV,MAAiB,KACpD,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAS,EAAqB,eAAAR,MAAmB,+BAJjD,IAOMC,EAIAQ,EAGAC,EAuGCC,EArHPC,EAAAP,EAAA,kBAOMJ,EAAiBF,EAAUF,CAAS,EAE1C,QAAQ,IAAI,sCAAuCG,EAAa;AAAA,CAAI,EAE9DS,EAAa,YAGbC,EAAgB,SAA2B,CAE7C,QAAWG,IAAY,CAACJ,EAAY,GAAGA,CAAU,MAAO,GAAGA,CAAU,OAAQ,GAAGA,CAAU,QAAS,GAAGA,CAAU,QAAS,GAAGA,CAAU,MAAM,EAExI,GAAIb,EAAWE,EAAKE,EAAaa,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,gEAEwB,EAEpD,MACJ,CAGJ,IAAMC,EAAahB,EAAKE,EAAa,aAAaQ,EAAsB,IAAM,EAAE,IAAI,EAEhFO,EAAg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,eAAAtB,MAAmB,+BAF5B,IAAAuB,EAAAC,EAAA,KAIApB,IACAQ,IAEIS,EAAI,IACJC,EAAK,CAAC,EAGV,QAAQ,IAAI,sCAAuCtB,EAAa;AAAA,CAAI,GAGnE,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACW,EAAc,EAAGR,EAAkB,CAAC,CAAC,EAExD,QAAQ,IAAI,4CAAqC,EAEjDmB,EAAK,CAAC,CACV,OAASG,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBH,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\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 { existsSync, readFileSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\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,no-loops/no-loops\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 { env, exit } from \"node:process\";\n\nimport { projectPath } from \"@anolilab/package-json-utils\";\n\nimport writeEslintIgnore from \"./postinstall/write-eslint-ignore\";\nimport writeEslintRc from \"./postinstall/write-eslint-rc\";\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "14.0.9",
3
+ "version": "14.0.11",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -131,11 +131,12 @@
131
131
  "@anolilab/package-json-utils": "3.0.6",
132
132
  "@babel/eslint-parser": "^7.22.15",
133
133
  "@babel/plugin-syntax-import-assertions": "^7.22.5",
134
+ "@jsenv/eslint-import-resolver": ">=8.0.3",
134
135
  "@eslint/js": "^8.50.0",
135
136
  "@html-eslint/eslint-plugin": "^0.19.1",
136
137
  "@html-eslint/parser": "^0.19.1",
137
- "@rushstack/eslint-patch": "^1.4.0",
138
- "@rushstack/eslint-plugin-security": "^0.7.0",
138
+ "@rushstack/eslint-patch": "^1.5.0",
139
+ "@rushstack/eslint-plugin-security": "^0.7.1",
139
140
  "@typescript-eslint/eslint-plugin": ">=6.7.3",
140
141
  "@typescript-eslint/parser": "^6.7.3",
141
142
  "confusing-browser-globals": "^1.0.11",
@@ -173,9 +174,8 @@
173
174
  "yaml-eslint-parser": "^1.2.2"
174
175
  },
175
176
  "devDependencies": {
176
- "@anolilab/semantic-release-preset": "7.0.3",
177
+ "@anolilab/semantic-release-preset": "7.0.4",
177
178
  "@arthurgeron/eslint-plugin-react-usememo": "^2.0.1",
178
- "@jsenv/eslint-import-resolver": "^8.0.2",
179
179
  "@testing-library/dom": "^9.3.3",
180
180
  "@total-typescript/ts-reset": "^0.5.1",
181
181
  "@types/confusing-browser-globals": "^1.0.1",
@@ -210,10 +210,10 @@
210
210
  "eslint-plugin-zod": "^1.4.0",
211
211
  "jest": "^29.7.0",
212
212
  "react": "^18.2.0",
213
- "rimraf": "^5.0.2",
213
+ "rimraf": "^5.0.5",
214
214
  "semantic-release": "^21.1.2",
215
215
  "tsup": "^7.2.0",
216
- "type-fest": "^4.3.1",
216
+ "type-fest": "^4.3.2",
217
217
  "typescript": "^5.2.2",
218
218
  "vitest": "^0.34.5"
219
219
  },