@anolilab/eslint-config 6.0.3 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","prettierRules","consoleLog","config","unicorn_default"],"mappings":"0FAAA,OAAS,aAAAA,EAAW,uBAAAC,MAA2B,+BAE/C,OAAOC,MAAY,SAKnB,IAAMC,EAAaC,EAAY,MAE3BC,EAAoC,CAAC,EAGrCL,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAGI,OAAO,yCACR,OAAO,uCAAyC,GAEhDM,EAAW;AAAA,8GAAiH,GAGhID,EAAgB,CACZ,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAME,EAAwB,CAC1B,QAAS,CAAC,SAAS,EACnB,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,+BAAgCL,EAAO,IAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MACnF,0BAA2B,CAAC,QAAS,CAAE,OAASC,EAAW,OAAoB,CAAC,CAAY,CAAC,EAC7F,4BAA6B,MAC7B,wBAAyBF,EAAsB,QAAU,MAGzD,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAGA,mCAAoC,MAGpC,kBAAmB,MAGnB,yBAA0B,CAAC,QAAS,kBAAkB,EAGtD,mCAAoC,MAGpC,sCAAuC,MAGvC,+BAAgC,MAGhC,iCAAkC,MAElC,GAAGI,CACP,EACA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOG,EAAQD","sourcesContent":["import { hasAnyDep, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport semver from \"semver\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigUnicornPrettier) {\n global.hasAnolilabEsLintConfigUnicornPrettier = true;\n\n consoleLog(\"\\nFound prettier as dependency, disabling some rules to fix wrong behavior of the rule with eslint and prettier\");\n }\n\n prettierRules = {\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 plugins: [\"unicorn\"],\n extends: [\"plugin:unicorn/recommended\"],\n rules: {\n \"unicorn/prefer-node-protocol\": semver.gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n \"unicorn/template-indent\": [\"error\", { indent: (styleRules[\"indent\"] as any[])[1] as number }],\n \"unicorn/no-array-for-each\": \"off\",\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\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\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\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 2021.\n \"unicorn/no-null\": \"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 // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n\n ...prettierRules,\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../../src/config/plugins/unicorn.ts"],"names":["hasAnyDep","packageIsTypeModule","semver","styleRules","style_default","prettierRules","config","unicorn_default"],"mappings":"6CAAA,OAAS,aAAAA,EAAW,uBAAAC,MAA2B,+BAE/C,OAAOC,MAAY,SAInB,IAAMC,EAAaC,EAAY,MAE3BC,EAAoC,CAAC,EAGrCL,EAAU,CAAC,UAAU,EAAG,CACpB,SAAU,EACd,CAAC,IAEDK,EAAgB,CACZ,6BAA8B,MAC9B,4BAA6B,MAC7B,8BAA+B,MAC/B,0BAA2B,KAC/B,GAIJ,IAAMC,EAAwB,CAC1B,QAAS,CAAC,SAAS,EACnB,QAAS,CAAC,4BAA4B,EACtC,MAAO,CACH,+BAAgCJ,EAAO,IAAI,QAAQ,QAAS,SAAS,EAAI,QAAU,MACnF,0BAA2B,CAAC,QAAS,CAAE,OAASC,EAAW,OAAoB,CAAC,CAAY,CAAC,EAC7F,4BAA6B,MAC7B,wBAAyBF,EAAsB,QAAU,MAGzD,uBAAwB,CACpB,QACA,CACI,qBAAsB,EAC1B,CACJ,EAGA,mCAAoC,MAGpC,kBAAmB,MAGnB,yBAA0B,CAAC,QAAS,kBAAkB,EAGtD,mCAAoC,MAGpC,sCAAuC,MAGvC,+BAAgC,MAGhC,iCAAkC,MAElC,GAAGI,CACP,EACA,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { hasAnyDep, packageIsTypeModule } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport semver from \"semver\";\n\nimport styleConfig from \"../style\";\n\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n\nlet prettierRules: Linter.RulesRecord = {};\n\nif (\n hasAnyDep([\"prettier\"], {\n peerDeps: false,\n })\n) {\n prettierRules = {\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 plugins: [\"unicorn\"],\n extends: [\"plugin:unicorn/recommended\"],\n rules: {\n \"unicorn/prefer-node-protocol\": semver.gte(process.version, \"v16.0.0\") ? \"error\" : \"off\",\n \"unicorn/template-indent\": [\"error\", { indent: (styleRules[\"indent\"] as any[])[1] as number }],\n \"unicorn/no-array-for-each\": \"off\",\n \"unicorn/prefer-module\": packageIsTypeModule ? \"error\" : \"off\",\n\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\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\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 2021.\n \"unicorn/no-null\": \"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 // It will be disabled in the next version of eslint-plugin-unicorn.\n \"unicorn/prefer-json-parse-buffer\": \"off\",\n\n // TODO: Remove this override when the rule is more stable.\n \"unicorn/consistent-function-scoping\": \"off\",\n\n // TODO: Temporarily disabled until it becomes more mature.\n \"unicorn/no-useless-undefined\": \"off\",\n\n // TODO: Temporarily disabled as the rule is buggy.\n \"function-call-argument-newline\": \"off\",\n\n ...prettierRules,\n },\n overrides: [\n {\n files: [\"*.ts\", \"*.tsx\", \"*.mts\", \"*.cts\"],\n rules: {\n \"unicorn/import-style\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/eslint-config",
3
- "version": "6.0.3",
3
+ "version": "6.1.0",
4
4
  "description": "ESLint shareable config for the Anolilab JavaScript style guide.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -66,6 +66,8 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@anolilab/package-json-utils": "1.3.0",
69
+ "@html-eslint/eslint-plugin": "^0.19.0",
70
+ "@html-eslint/parser": "^0.19.0",
69
71
  "@rushstack/eslint-patch": "^1.3.1",
70
72
  "@rushstack/eslint-plugin-security": "^0.6.0",
71
73
  "@typescript-eslint/eslint-plugin": ">=5.55.0",