@hexadrop/eslint-config 0.0.2 → 0.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.
package/dist/index.cjs CHANGED
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  combine: () => combine,
34
34
  default: () => hexadrop
35
35
  });
36
- module.exports = __toCommonJS(src_exports);
36
+ module.exports = __toCommonJS(index_exports);
37
37
 
38
38
  // src/factory.ts
39
39
  var import_eslint_flat_config_utils = require("eslint-flat-config-utils");
@@ -366,7 +366,7 @@ async function markdown(options) {
366
366
  if (!markdown2) {
367
367
  return [];
368
368
  }
369
- const pluginMarkdown = await interopDefault(import("eslint-plugin-markdown"));
369
+ const pluginMarkdown = await interopDefault(import("@eslint/markdown"));
370
370
  const processors = pluginMarkdown.processors;
371
371
  const processor = processors?.["markdown"];
372
372
  return [
@@ -391,6 +391,7 @@ async function markdown(options) {
391
391
  files: GLOB_MARKDOWN,
392
392
  languageOptions: {
393
393
  parser: {
394
+ meta: import_eslint_parser_plain.meta,
394
395
  parseForESLint: import_eslint_parser_plain.parseForESLint
395
396
  }
396
397
  },
package/dist/index.d.cts CHANGED
@@ -4,69 +4,6 @@ import { Linter } from 'eslint';
4
4
 
5
5
  type Awaitable<T> = Promise<T> | T;
6
6
 
7
- declare const ASTRO_CONFIG_NAME_SETUP: "hexadrop/astro/setup";
8
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER: "hexadrop/astro/setup/parser";
9
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER_JAVASCRIPT: "hexadrop/astro/setup/parser/javascript";
10
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER_TYPESCRIPT: "hexadrop/astro/setup/parser/typescript";
11
- declare const ASTRO_CONFIG_NAME_RULES: "hexadrop/astro/rules";
12
- type AstroConfigNames = typeof ASTRO_CONFIG_NAME_RULES | typeof ASTRO_CONFIG_NAME_SETUP | typeof ASTRO_CONFIG_NAME_SETUP_PARSER | typeof ASTRO_CONFIG_NAME_SETUP_PARSER_JAVASCRIPT | typeof ASTRO_CONFIG_NAME_SETUP_PARSER_TYPESCRIPT;
13
-
14
- declare const CORE_CONFIG_NAME_SETUP: "hexadrop/core/setup";
15
- declare const CORE_CONFIG_NAME_RULES: "hexadrop/core/rules";
16
- declare const CORE_CONFIG_NAME_RULES_MARKDOWN_SOURCE: "hexadrop/core/rules/markdown/source";
17
- declare const CORE_CONFIG_NAME_RULES_NODE: "hexadrop/core/rules/node";
18
- type CoreConfigNames = typeof CORE_CONFIG_NAME_RULES | typeof CORE_CONFIG_NAME_RULES_MARKDOWN_SOURCE | typeof CORE_CONFIG_NAME_RULES_NODE | typeof CORE_CONFIG_NAME_SETUP;
19
-
20
- declare const IGNORE_CONFIG_NAME_DEFAULT: "hexadrop/ignore";
21
- declare const IGNORE_CONFIG_NAME_ADDITIONAL: "hexadrop/ignore/additional";
22
- declare const IGNORE_CONFIG_NAME_GITIGNORE: "hexadrop/ignore/gitignore";
23
- type IgnoreConfigNames = typeof IGNORE_CONFIG_NAME_ADDITIONAL | typeof IGNORE_CONFIG_NAME_DEFAULT | typeof IGNORE_CONFIG_NAME_GITIGNORE;
24
-
25
- declare const JSON_CONFIG_NAME_SETUP: "hexadrop/json/setup";
26
- declare const JSON_CONFIG_NAME_SETUP_PARSER: "hexadrop/json/setup/parser";
27
- declare const JSON_CONFIG_NAME_RULES: "hexadrop/json/rules";
28
- type JsonConfigNames = typeof JSON_CONFIG_NAME_RULES | typeof JSON_CONFIG_NAME_SETUP | typeof JSON_CONFIG_NAME_SETUP_PARSER;
29
-
30
- declare const MARKDOWN_CONFIG_NAME_SETUP: "hexadrop/markdown/setup";
31
- declare const MARKDOWN_CONFIG_NAME_SETUP_PROCESSOR: "hexadrop/markdown/setup/processor";
32
- declare const MARKDOWN_CONFIG_NAME_SETUP_PARSER: "hexadrop/markdown/setup/parser";
33
- type MarkdownConfigNames = typeof MARKDOWN_CONFIG_NAME_SETUP | typeof MARKDOWN_CONFIG_NAME_SETUP_PARSER | typeof MARKDOWN_CONFIG_NAME_SETUP_PROCESSOR;
34
-
35
- declare const REACT_CONFIG_NAME_SETUP: "hexadrop/react/setup";
36
- declare const REACT_CONFIG_NAME_RULES: "hexadrop/react/rules";
37
- declare const REACT_CONFIG_NAME_RULES_HOOKS: "hexadrop/react/rules/hooks";
38
- declare const REACT_CONFIG_NAME_RULES_REFRESH: "hexadrop/react/rules/refresh";
39
- type ReactConfigNames = typeof REACT_CONFIG_NAME_RULES | typeof REACT_CONFIG_NAME_RULES_HOOKS | typeof REACT_CONFIG_NAME_RULES_REFRESH | typeof REACT_CONFIG_NAME_SETUP;
40
-
41
- declare const STYLISTIC_CONFIG_NAME_SETUP: "hexadrop/stylistic/setup";
42
- declare const STYLISTIC_CONFIG_NAME_RULES: "hexadrop/stylistic/rules";
43
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN: "hexadrop/stylistic/rules/unicorn";
44
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN: "hexadrop/stylistic/rules/unicorn/markdown";
45
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/unicorn/markdown/source";
46
- declare const STYLISTIC_CONFIG_NAME_RULES_PERFECTIONIST: "hexadrop/stylistic/rules/perfectionist";
47
- declare const STYLISTIC_CONFIG_NAME_RULES_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/markdown/source";
48
- declare const STYLISTIC_CONFIG_NAME_RULES_ASTRO: "hexadrop/stylistic/rules/astro";
49
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON: "hexadrop/stylistic/rules/json";
50
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON_PACKAGE: "hexadrop/stylistic/rules/json/package.json";
51
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON_TSCONFIG: "hexadrop/stylistic/rules/json/tsconfig.json";
52
- declare const STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_DTS: "hexadrop/stylistic/rules/typescript/dts";
53
- declare const STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_TYPE_AWARE: "hexadrop/stylistic/rules/typescript/type-aware";
54
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER: "hexadrop/stylistic/rules/prettier";
55
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER_ASTRO: "hexadrop/stylistic/rules/prettier/astro";
56
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/prettier/markdown/source";
57
- type StylisticConfigNames = typeof STYLISTIC_CONFIG_NAME_RULES | typeof STYLISTIC_CONFIG_NAME_RULES_ASTRO | typeof STYLISTIC_CONFIG_NAME_RULES_JSON | typeof STYLISTIC_CONFIG_NAME_RULES_JSON_PACKAGE | typeof STYLISTIC_CONFIG_NAME_RULES_JSON_TSCONFIG | typeof STYLISTIC_CONFIG_NAME_RULES_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_RULES_PERFECTIONIST | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER_ASTRO | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_DTS | typeof STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_TYPE_AWARE | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_SETUP;
58
-
59
- declare const TYPESCRIPT_CONFIG_NAME_SETUP: "hexadrop/typescript/setup";
60
- declare const TYPESCRIPT_CONFIG_NAME_SETUP_PARSER: "hexadrop/typescript/setup/parser";
61
- declare const TYPESCRIPT_CONFIG_NAME_SETUP_PARSER_TYPEAWARE: "hexadrop/typescript/setup/parser/type-aware";
62
- declare const TYPESCRIPT_CONFIG_NAME_RULES: "hexadrop/typescript/rules";
63
- declare const TYPESCRIPT_CONFIG_NAME_RULES_DTS: "hexadrop/typescript/rules/dts";
64
- declare const TYPESCRIPT_CONFIG_NAME_RULES_TEST: "hexadrop/typescript/rules/test";
65
- declare const TYPESCRIPT_CONFIG_NAME_RULES_TYPEAWARE: "hexadrop/typescript/rules/type-aware";
66
- type TypescriptConfigNames = typeof TYPESCRIPT_CONFIG_NAME_RULES | typeof TYPESCRIPT_CONFIG_NAME_RULES_DTS | typeof TYPESCRIPT_CONFIG_NAME_RULES_TEST | typeof TYPESCRIPT_CONFIG_NAME_RULES_TYPEAWARE | typeof TYPESCRIPT_CONFIG_NAME_SETUP | typeof TYPESCRIPT_CONFIG_NAME_SETUP_PARSER | typeof TYPESCRIPT_CONFIG_NAME_SETUP_PARSER_TYPEAWARE;
67
-
68
- type ConfigNames = AstroConfigNames | CoreConfigNames | IgnoreConfigNames | JsonConfigNames | MarkdownConfigNames | ReactConfigNames | StylisticConfigNames | TypescriptConfigNames;
69
-
70
7
  type RecursivePartial<T> = {
71
8
  [P in keyof T]?: RecursivePartial<T[P]>;
72
9
  };
@@ -479,7 +416,7 @@ interface RuleOptions {
479
416
  */
480
417
  'default-case'?: Linter.RuleEntry<DefaultCase>
481
418
  /**
482
- * Enforce `default` clauses in switch statements to be last
419
+ * Enforce `default` clauses in `switch` statements to be last
483
420
  * @see https://eslint.org/docs/latest/rules/default-case-last
484
421
  */
485
422
  'default-case-last'?: Linter.RuleEntry<[]>
@@ -1157,6 +1094,34 @@ interface RuleOptions {
1157
1094
  * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
1158
1095
  */
1159
1096
  'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
1097
+ /**
1098
+ * Require languages for fenced code blocks
1099
+ */
1100
+ 'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
1101
+ /**
1102
+ * Enforce heading levels increment by one
1103
+ */
1104
+ 'markdown/heading-increment'?: Linter.RuleEntry<[]>
1105
+ /**
1106
+ * Disallow duplicate headings in the same document
1107
+ */
1108
+ 'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
1109
+ /**
1110
+ * Disallow empty links
1111
+ */
1112
+ 'markdown/no-empty-links'?: Linter.RuleEntry<[]>
1113
+ /**
1114
+ * Disallow HTML tags
1115
+ */
1116
+ 'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
1117
+ /**
1118
+ * Disallow invalid label references
1119
+ */
1120
+ 'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
1121
+ /**
1122
+ * Disallow missing label references
1123
+ */
1124
+ 'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
1160
1125
  /**
1161
1126
  * Enforce a maximum number of classes per file
1162
1127
  * @see https://eslint.org/docs/latest/rules/max-classes-per-file
@@ -3072,7 +3037,7 @@ interface RuleOptions {
3072
3037
  */
3073
3038
  'semi-style'?: Linter.RuleEntry<SemiStyle>
3074
3039
  /**
3075
- * Enforce sorted import declarations within modules
3040
+ * Enforce sorted `import` declarations within modules
3076
3041
  * @see https://eslint.org/docs/latest/rules/sort-imports
3077
3042
  */
3078
3043
  'sort-imports'?: Linter.RuleEntry<SortImports>
@@ -6270,6 +6235,14 @@ type LinesBetweenClassMembers = []|[({
6270
6235
  type LogicalAssignmentOperators = (([]|["always"]|["always", {
6271
6236
  enforceForIfStatements?: boolean
6272
6237
  }] | ["never"]) & unknown[])
6238
+ // ----- markdown/fenced-code-language -----
6239
+ type MarkdownFencedCodeLanguage = []|[{
6240
+ required?: string[]
6241
+ }]
6242
+ // ----- markdown/no-html -----
6243
+ type MarkdownNoHtml = []|[{
6244
+ allowed?: string[]
6245
+ }]
6273
6246
  // ----- max-classes-per-file -----
6274
6247
  type MaxClassesPerFile = []|[(number | {
6275
6248
  ignoreExpressions?: boolean
@@ -8881,6 +8854,7 @@ type StyleKeySpacing = []|[({
8881
8854
  mode?: ("strict" | "minimum")
8882
8855
  beforeColon?: boolean
8883
8856
  afterColon?: boolean
8857
+ ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
8884
8858
  } | {
8885
8859
  singleLine?: {
8886
8860
  mode?: ("strict" | "minimum")
@@ -9396,6 +9370,7 @@ type StyleNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
9396
9370
  enforceForNewInMemberExpressions?: boolean
9397
9371
  enforceForFunctionPrototypeMethods?: boolean
9398
9372
  allowParensAfterCommentPattern?: string
9373
+ nestedConditionalExpressions?: boolean
9399
9374
  }])
9400
9375
  // ----- style/no-mixed-operators -----
9401
9376
  type StyleNoMixedOperators = []|[{
@@ -9493,14 +9468,14 @@ type StyleOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("af
9493
9468
  }
9494
9469
  }]
9495
9470
  // ----- style/padded-blocks -----
9496
- type StylePaddedBlocks = []|[(("always" | "never") | {
9497
- blocks?: ("always" | "never")
9498
- switches?: ("always" | "never")
9499
- classes?: ("always" | "never")
9500
- })]|[(("always" | "never") | {
9501
- blocks?: ("always" | "never")
9502
- switches?: ("always" | "never")
9503
- classes?: ("always" | "never")
9471
+ type StylePaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
9472
+ blocks?: ("always" | "never" | "start" | "end")
9473
+ switches?: ("always" | "never" | "start" | "end")
9474
+ classes?: ("always" | "never" | "start" | "end")
9475
+ })]|[(("always" | "never" | "start" | "end") | {
9476
+ blocks?: ("always" | "never" | "start" | "end")
9477
+ switches?: ("always" | "never" | "start" | "end")
9478
+ classes?: ("always" | "never" | "start" | "end")
9504
9479
  }), {
9505
9480
  allowSingleLineBlocks?: boolean
9506
9481
  }]
@@ -10976,6 +10951,8 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
10976
10951
  exceptRange?: boolean
10977
10952
  onlyEquality?: boolean
10978
10953
  }]
10954
+ // Names of all the configs
10955
+ type ConfigNames = 'hexadrop/ignore' | 'hexadrop/ignore/gitignore' | 'hexadrop/core/setup' | 'hexadrop/core/rules' | 'hexadrop/core/rules/node' | 'hexadrop/core/rules/markdown/source' | 'hexadrop/typescript/setup' | 'hexadrop/typescript/setup/parser' | 'hexadrop/typescript/setup/parser/type-aware' | 'hexadrop/typescript/rules' | 'hexadrop/typescript/rules/dts' | 'hexadrop/typescript/rules/type-aware' | 'hexadrop/typescript/rules/test' | 'hexadrop/react/setup' | 'hexadrop/react/rules' | 'hexadrop/react/rules/hooks' | 'hexadrop/react/rules/refresh' | 'hexadrop/astro/setup' | 'hexadrop/astro/setup/parser' | 'hexadrop/astro/setup/parser/javascript' | 'hexadrop/astro/setup/parser/javascript' | 'hexadrop/astro/rules' | 'hexadrop/json/setup' | 'hexadrop/json/setup/parser' | 'hexadrop/json/rules' | 'hexadrop/markdown/setup' | 'hexadrop/markdown/setup/processor' | 'hexadrop/markdown/setup/parser' | 'hexadrop/imports/setup' | 'hexadrop/imports/setup/typescript' | 'hexadrop/imports/rules/warnings' | 'hexadrop/imports/rules/static' | 'hexadrop/imports/rules/warnings/eslint-config' | 'hexadrop/imports/rules/static/markdown/source' | 'hexadrop/imports/rules/stylistic' | 'hexadrop/imports/rules/stylistic/typescript/dts' | 'hexadrop/imports/rules/stylistic/markdown/source' | 'hexadrop/imports/rules/stylistic/astro' | 'hexadrop/stylistic/setup' | 'hexadrop/stylistic/rules' | 'hexadrop/stylistic/rules/markdown/source' | 'hexadrop/stylistic/rules/typescript' | 'hexadrop/stylistic/rules/typescript/type-aware' | 'hexadrop/stylistic/rules/typescript/dts' | 'hexadrop/stylistic/rules/json' | 'hexadrop/stylistic/rules/json/package.json' | 'hexadrop/stylistic/rules/json/tsconfig.json' | 'hexadrop/stylistic/rules/astro' | 'hexadrop/stylistic/rules/unicorn' | 'hexadrop/stylistic/rules/unicorn/markdown' | 'hexadrop/stylistic/rules/unicorn/markdown/source' | 'hexadrop/stylistic/rules/perfectionist' | 'hexadrop/stylistic/rules/prettier' | 'hexadrop/stylistic/rules/prettier/astro' | 'hexadrop/stylistic/rules/prettier/markdown/source' | 'hexadrop/stylistic/rules/prettier/markdown/astro' | 'hexadrop/stylistic/rules/json' | 'hexadrop/stylistic/rules/astro'
10979
10956
 
10980
10957
  type TypedFlatConfigItem = Linter.Config & {
10981
10958
  /**
package/dist/index.d.ts CHANGED
@@ -4,69 +4,6 @@ import { Linter } from 'eslint';
4
4
 
5
5
  type Awaitable<T> = Promise<T> | T;
6
6
 
7
- declare const ASTRO_CONFIG_NAME_SETUP: "hexadrop/astro/setup";
8
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER: "hexadrop/astro/setup/parser";
9
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER_JAVASCRIPT: "hexadrop/astro/setup/parser/javascript";
10
- declare const ASTRO_CONFIG_NAME_SETUP_PARSER_TYPESCRIPT: "hexadrop/astro/setup/parser/typescript";
11
- declare const ASTRO_CONFIG_NAME_RULES: "hexadrop/astro/rules";
12
- type AstroConfigNames = typeof ASTRO_CONFIG_NAME_RULES | typeof ASTRO_CONFIG_NAME_SETUP | typeof ASTRO_CONFIG_NAME_SETUP_PARSER | typeof ASTRO_CONFIG_NAME_SETUP_PARSER_JAVASCRIPT | typeof ASTRO_CONFIG_NAME_SETUP_PARSER_TYPESCRIPT;
13
-
14
- declare const CORE_CONFIG_NAME_SETUP: "hexadrop/core/setup";
15
- declare const CORE_CONFIG_NAME_RULES: "hexadrop/core/rules";
16
- declare const CORE_CONFIG_NAME_RULES_MARKDOWN_SOURCE: "hexadrop/core/rules/markdown/source";
17
- declare const CORE_CONFIG_NAME_RULES_NODE: "hexadrop/core/rules/node";
18
- type CoreConfigNames = typeof CORE_CONFIG_NAME_RULES | typeof CORE_CONFIG_NAME_RULES_MARKDOWN_SOURCE | typeof CORE_CONFIG_NAME_RULES_NODE | typeof CORE_CONFIG_NAME_SETUP;
19
-
20
- declare const IGNORE_CONFIG_NAME_DEFAULT: "hexadrop/ignore";
21
- declare const IGNORE_CONFIG_NAME_ADDITIONAL: "hexadrop/ignore/additional";
22
- declare const IGNORE_CONFIG_NAME_GITIGNORE: "hexadrop/ignore/gitignore";
23
- type IgnoreConfigNames = typeof IGNORE_CONFIG_NAME_ADDITIONAL | typeof IGNORE_CONFIG_NAME_DEFAULT | typeof IGNORE_CONFIG_NAME_GITIGNORE;
24
-
25
- declare const JSON_CONFIG_NAME_SETUP: "hexadrop/json/setup";
26
- declare const JSON_CONFIG_NAME_SETUP_PARSER: "hexadrop/json/setup/parser";
27
- declare const JSON_CONFIG_NAME_RULES: "hexadrop/json/rules";
28
- type JsonConfigNames = typeof JSON_CONFIG_NAME_RULES | typeof JSON_CONFIG_NAME_SETUP | typeof JSON_CONFIG_NAME_SETUP_PARSER;
29
-
30
- declare const MARKDOWN_CONFIG_NAME_SETUP: "hexadrop/markdown/setup";
31
- declare const MARKDOWN_CONFIG_NAME_SETUP_PROCESSOR: "hexadrop/markdown/setup/processor";
32
- declare const MARKDOWN_CONFIG_NAME_SETUP_PARSER: "hexadrop/markdown/setup/parser";
33
- type MarkdownConfigNames = typeof MARKDOWN_CONFIG_NAME_SETUP | typeof MARKDOWN_CONFIG_NAME_SETUP_PARSER | typeof MARKDOWN_CONFIG_NAME_SETUP_PROCESSOR;
34
-
35
- declare const REACT_CONFIG_NAME_SETUP: "hexadrop/react/setup";
36
- declare const REACT_CONFIG_NAME_RULES: "hexadrop/react/rules";
37
- declare const REACT_CONFIG_NAME_RULES_HOOKS: "hexadrop/react/rules/hooks";
38
- declare const REACT_CONFIG_NAME_RULES_REFRESH: "hexadrop/react/rules/refresh";
39
- type ReactConfigNames = typeof REACT_CONFIG_NAME_RULES | typeof REACT_CONFIG_NAME_RULES_HOOKS | typeof REACT_CONFIG_NAME_RULES_REFRESH | typeof REACT_CONFIG_NAME_SETUP;
40
-
41
- declare const STYLISTIC_CONFIG_NAME_SETUP: "hexadrop/stylistic/setup";
42
- declare const STYLISTIC_CONFIG_NAME_RULES: "hexadrop/stylistic/rules";
43
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN: "hexadrop/stylistic/rules/unicorn";
44
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN: "hexadrop/stylistic/rules/unicorn/markdown";
45
- declare const STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/unicorn/markdown/source";
46
- declare const STYLISTIC_CONFIG_NAME_RULES_PERFECTIONIST: "hexadrop/stylistic/rules/perfectionist";
47
- declare const STYLISTIC_CONFIG_NAME_RULES_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/markdown/source";
48
- declare const STYLISTIC_CONFIG_NAME_RULES_ASTRO: "hexadrop/stylistic/rules/astro";
49
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON: "hexadrop/stylistic/rules/json";
50
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON_PACKAGE: "hexadrop/stylistic/rules/json/package.json";
51
- declare const STYLISTIC_CONFIG_NAME_RULES_JSON_TSCONFIG: "hexadrop/stylistic/rules/json/tsconfig.json";
52
- declare const STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_DTS: "hexadrop/stylistic/rules/typescript/dts";
53
- declare const STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_TYPE_AWARE: "hexadrop/stylistic/rules/typescript/type-aware";
54
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER: "hexadrop/stylistic/rules/prettier";
55
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER_ASTRO: "hexadrop/stylistic/rules/prettier/astro";
56
- declare const STYLISTIC_CONFIG_NAME_RULES_PRETTIER_MARKDOWN_SOURCE: "hexadrop/stylistic/rules/prettier/markdown/source";
57
- type StylisticConfigNames = typeof STYLISTIC_CONFIG_NAME_RULES | typeof STYLISTIC_CONFIG_NAME_RULES_ASTRO | typeof STYLISTIC_CONFIG_NAME_RULES_JSON | typeof STYLISTIC_CONFIG_NAME_RULES_JSON_PACKAGE | typeof STYLISTIC_CONFIG_NAME_RULES_JSON_TSCONFIG | typeof STYLISTIC_CONFIG_NAME_RULES_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_RULES_PERFECTIONIST | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER_ASTRO | typeof STYLISTIC_CONFIG_NAME_RULES_PRETTIER_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_DTS | typeof STYLISTIC_CONFIG_NAME_RULES_TYPESCRIPT_TYPE_AWARE | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN | typeof STYLISTIC_CONFIG_NAME_RULES_UNICORN_MARKDOWN_SOURCE | typeof STYLISTIC_CONFIG_NAME_SETUP;
58
-
59
- declare const TYPESCRIPT_CONFIG_NAME_SETUP: "hexadrop/typescript/setup";
60
- declare const TYPESCRIPT_CONFIG_NAME_SETUP_PARSER: "hexadrop/typescript/setup/parser";
61
- declare const TYPESCRIPT_CONFIG_NAME_SETUP_PARSER_TYPEAWARE: "hexadrop/typescript/setup/parser/type-aware";
62
- declare const TYPESCRIPT_CONFIG_NAME_RULES: "hexadrop/typescript/rules";
63
- declare const TYPESCRIPT_CONFIG_NAME_RULES_DTS: "hexadrop/typescript/rules/dts";
64
- declare const TYPESCRIPT_CONFIG_NAME_RULES_TEST: "hexadrop/typescript/rules/test";
65
- declare const TYPESCRIPT_CONFIG_NAME_RULES_TYPEAWARE: "hexadrop/typescript/rules/type-aware";
66
- type TypescriptConfigNames = typeof TYPESCRIPT_CONFIG_NAME_RULES | typeof TYPESCRIPT_CONFIG_NAME_RULES_DTS | typeof TYPESCRIPT_CONFIG_NAME_RULES_TEST | typeof TYPESCRIPT_CONFIG_NAME_RULES_TYPEAWARE | typeof TYPESCRIPT_CONFIG_NAME_SETUP | typeof TYPESCRIPT_CONFIG_NAME_SETUP_PARSER | typeof TYPESCRIPT_CONFIG_NAME_SETUP_PARSER_TYPEAWARE;
67
-
68
- type ConfigNames = AstroConfigNames | CoreConfigNames | IgnoreConfigNames | JsonConfigNames | MarkdownConfigNames | ReactConfigNames | StylisticConfigNames | TypescriptConfigNames;
69
-
70
7
  type RecursivePartial<T> = {
71
8
  [P in keyof T]?: RecursivePartial<T[P]>;
72
9
  };
@@ -479,7 +416,7 @@ interface RuleOptions {
479
416
  */
480
417
  'default-case'?: Linter.RuleEntry<DefaultCase>
481
418
  /**
482
- * Enforce `default` clauses in switch statements to be last
419
+ * Enforce `default` clauses in `switch` statements to be last
483
420
  * @see https://eslint.org/docs/latest/rules/default-case-last
484
421
  */
485
422
  'default-case-last'?: Linter.RuleEntry<[]>
@@ -1157,6 +1094,34 @@ interface RuleOptions {
1157
1094
  * @see https://eslint.org/docs/latest/rules/logical-assignment-operators
1158
1095
  */
1159
1096
  'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
1097
+ /**
1098
+ * Require languages for fenced code blocks
1099
+ */
1100
+ 'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
1101
+ /**
1102
+ * Enforce heading levels increment by one
1103
+ */
1104
+ 'markdown/heading-increment'?: Linter.RuleEntry<[]>
1105
+ /**
1106
+ * Disallow duplicate headings in the same document
1107
+ */
1108
+ 'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
1109
+ /**
1110
+ * Disallow empty links
1111
+ */
1112
+ 'markdown/no-empty-links'?: Linter.RuleEntry<[]>
1113
+ /**
1114
+ * Disallow HTML tags
1115
+ */
1116
+ 'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
1117
+ /**
1118
+ * Disallow invalid label references
1119
+ */
1120
+ 'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
1121
+ /**
1122
+ * Disallow missing label references
1123
+ */
1124
+ 'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
1160
1125
  /**
1161
1126
  * Enforce a maximum number of classes per file
1162
1127
  * @see https://eslint.org/docs/latest/rules/max-classes-per-file
@@ -3072,7 +3037,7 @@ interface RuleOptions {
3072
3037
  */
3073
3038
  'semi-style'?: Linter.RuleEntry<SemiStyle>
3074
3039
  /**
3075
- * Enforce sorted import declarations within modules
3040
+ * Enforce sorted `import` declarations within modules
3076
3041
  * @see https://eslint.org/docs/latest/rules/sort-imports
3077
3042
  */
3078
3043
  'sort-imports'?: Linter.RuleEntry<SortImports>
@@ -6270,6 +6235,14 @@ type LinesBetweenClassMembers = []|[({
6270
6235
  type LogicalAssignmentOperators = (([]|["always"]|["always", {
6271
6236
  enforceForIfStatements?: boolean
6272
6237
  }] | ["never"]) & unknown[])
6238
+ // ----- markdown/fenced-code-language -----
6239
+ type MarkdownFencedCodeLanguage = []|[{
6240
+ required?: string[]
6241
+ }]
6242
+ // ----- markdown/no-html -----
6243
+ type MarkdownNoHtml = []|[{
6244
+ allowed?: string[]
6245
+ }]
6273
6246
  // ----- max-classes-per-file -----
6274
6247
  type MaxClassesPerFile = []|[(number | {
6275
6248
  ignoreExpressions?: boolean
@@ -8881,6 +8854,7 @@ type StyleKeySpacing = []|[({
8881
8854
  mode?: ("strict" | "minimum")
8882
8855
  beforeColon?: boolean
8883
8856
  afterColon?: boolean
8857
+ ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
8884
8858
  } | {
8885
8859
  singleLine?: {
8886
8860
  mode?: ("strict" | "minimum")
@@ -9396,6 +9370,7 @@ type StyleNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
9396
9370
  enforceForNewInMemberExpressions?: boolean
9397
9371
  enforceForFunctionPrototypeMethods?: boolean
9398
9372
  allowParensAfterCommentPattern?: string
9373
+ nestedConditionalExpressions?: boolean
9399
9374
  }])
9400
9375
  // ----- style/no-mixed-operators -----
9401
9376
  type StyleNoMixedOperators = []|[{
@@ -9493,14 +9468,14 @@ type StyleOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("af
9493
9468
  }
9494
9469
  }]
9495
9470
  // ----- style/padded-blocks -----
9496
- type StylePaddedBlocks = []|[(("always" | "never") | {
9497
- blocks?: ("always" | "never")
9498
- switches?: ("always" | "never")
9499
- classes?: ("always" | "never")
9500
- })]|[(("always" | "never") | {
9501
- blocks?: ("always" | "never")
9502
- switches?: ("always" | "never")
9503
- classes?: ("always" | "never")
9471
+ type StylePaddedBlocks = []|[(("always" | "never" | "start" | "end") | {
9472
+ blocks?: ("always" | "never" | "start" | "end")
9473
+ switches?: ("always" | "never" | "start" | "end")
9474
+ classes?: ("always" | "never" | "start" | "end")
9475
+ })]|[(("always" | "never" | "start" | "end") | {
9476
+ blocks?: ("always" | "never" | "start" | "end")
9477
+ switches?: ("always" | "never" | "start" | "end")
9478
+ classes?: ("always" | "never" | "start" | "end")
9504
9479
  }), {
9505
9480
  allowSingleLineBlocks?: boolean
9506
9481
  }]
@@ -10976,6 +10951,8 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
10976
10951
  exceptRange?: boolean
10977
10952
  onlyEquality?: boolean
10978
10953
  }]
10954
+ // Names of all the configs
10955
+ type ConfigNames = 'hexadrop/ignore' | 'hexadrop/ignore/gitignore' | 'hexadrop/core/setup' | 'hexadrop/core/rules' | 'hexadrop/core/rules/node' | 'hexadrop/core/rules/markdown/source' | 'hexadrop/typescript/setup' | 'hexadrop/typescript/setup/parser' | 'hexadrop/typescript/setup/parser/type-aware' | 'hexadrop/typescript/rules' | 'hexadrop/typescript/rules/dts' | 'hexadrop/typescript/rules/type-aware' | 'hexadrop/typescript/rules/test' | 'hexadrop/react/setup' | 'hexadrop/react/rules' | 'hexadrop/react/rules/hooks' | 'hexadrop/react/rules/refresh' | 'hexadrop/astro/setup' | 'hexadrop/astro/setup/parser' | 'hexadrop/astro/setup/parser/javascript' | 'hexadrop/astro/setup/parser/javascript' | 'hexadrop/astro/rules' | 'hexadrop/json/setup' | 'hexadrop/json/setup/parser' | 'hexadrop/json/rules' | 'hexadrop/markdown/setup' | 'hexadrop/markdown/setup/processor' | 'hexadrop/markdown/setup/parser' | 'hexadrop/imports/setup' | 'hexadrop/imports/setup/typescript' | 'hexadrop/imports/rules/warnings' | 'hexadrop/imports/rules/static' | 'hexadrop/imports/rules/warnings/eslint-config' | 'hexadrop/imports/rules/static/markdown/source' | 'hexadrop/imports/rules/stylistic' | 'hexadrop/imports/rules/stylistic/typescript/dts' | 'hexadrop/imports/rules/stylistic/markdown/source' | 'hexadrop/imports/rules/stylistic/astro' | 'hexadrop/stylistic/setup' | 'hexadrop/stylistic/rules' | 'hexadrop/stylistic/rules/markdown/source' | 'hexadrop/stylistic/rules/typescript' | 'hexadrop/stylistic/rules/typescript/type-aware' | 'hexadrop/stylistic/rules/typescript/dts' | 'hexadrop/stylistic/rules/json' | 'hexadrop/stylistic/rules/json/package.json' | 'hexadrop/stylistic/rules/json/tsconfig.json' | 'hexadrop/stylistic/rules/astro' | 'hexadrop/stylistic/rules/unicorn' | 'hexadrop/stylistic/rules/unicorn/markdown' | 'hexadrop/stylistic/rules/unicorn/markdown/source' | 'hexadrop/stylistic/rules/perfectionist' | 'hexadrop/stylistic/rules/prettier' | 'hexadrop/stylistic/rules/prettier/astro' | 'hexadrop/stylistic/rules/prettier/markdown/source' | 'hexadrop/stylistic/rules/prettier/markdown/astro' | 'hexadrop/stylistic/rules/json' | 'hexadrop/stylistic/rules/astro'
10979
10956
 
10980
10957
  type TypedFlatConfigItem = Linter.Config & {
10981
10958
  /**
package/dist/index.js CHANGED
@@ -232,7 +232,7 @@ import globals2 from "globals";
232
232
 
233
233
  // src/config/markdown/markdown.config.ts
234
234
  import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
235
- import { parseForESLint } from "eslint-parser-plain";
235
+ import { meta, parseForESLint } from "eslint-parser-plain";
236
236
 
237
237
  // src/config/markdown/markdown.config-name.ts
238
238
  var MARKDOWN_CONFIG_NAME = `${plugin_prefix_default}/markdown`;
@@ -329,7 +329,7 @@ async function markdown(options) {
329
329
  if (!markdown2) {
330
330
  return [];
331
331
  }
332
- const pluginMarkdown = await interopDefault(import("eslint-plugin-markdown"));
332
+ const pluginMarkdown = await interopDefault(import("@eslint/markdown"));
333
333
  const processors = pluginMarkdown.processors;
334
334
  const processor = processors?.["markdown"];
335
335
  return [
@@ -354,6 +354,7 @@ async function markdown(options) {
354
354
  files: GLOB_MARKDOWN,
355
355
  languageOptions: {
356
356
  parser: {
357
+ meta,
357
358
  parseForESLint
358
359
  }
359
360
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexadrop/eslint-config",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "description": "Opinionated ESLint ruleset designed for large teams and projects",
5
5
  "keywords": [
6
6
  "lint",
@@ -45,7 +45,8 @@
45
45
  "eslint": "^9.17.0"
46
46
  },
47
47
  "dependencies": {
48
- "@stylistic/eslint-plugin": "2.12.1",
48
+ "@eslint/markdown": "6.2.2",
49
+ "@stylistic/eslint-plugin": "2.13.0",
49
50
  "@typescript-eslint/eslint-plugin": "8.18.2",
50
51
  "@typescript-eslint/parser": "8.18.2",
51
52
  "astro-eslint-parser": "1.1.0",
@@ -53,38 +54,37 @@
53
54
  "eslint-flat-config-utils": "0.4.0",
54
55
  "eslint-import-resolver-typescript": "3.7.0",
55
56
  "eslint-merge-processors": "0.1.0",
56
- "eslint-parser-plain": "0.1.0",
57
+ "eslint-parser-plain": "0.1.1",
57
58
  "eslint-plugin-astro": "1.3.1",
58
- "eslint-plugin-format": "0.1.3",
59
+ "eslint-plugin-format": "1.0.1",
59
60
  "eslint-plugin-import-x": "4.6.1",
60
61
  "eslint-plugin-jsonc": "2.18.2",
61
- "eslint-plugin-markdown": "5.1.0",
62
62
  "eslint-plugin-n": "17.15.1",
63
63
  "eslint-plugin-perfectionist": "4.4.0",
64
- "eslint-plugin-react": "7.37.3",
64
+ "eslint-plugin-react": "7.37.4",
65
65
  "eslint-plugin-react-hooks": "5.1.0",
66
- "eslint-plugin-react-refresh": "0.4.16",
66
+ "eslint-plugin-react-refresh": "0.4.19",
67
67
  "eslint-plugin-simple-import-sort": "12.1.1",
68
68
  "eslint-plugin-unicorn": "56.0.1",
69
69
  "eslint-plugin-unused-imports": "4.1.4",
70
70
  "globals": "15.14.0",
71
71
  "jsonc-eslint-parser": "2.4.0",
72
- "local-pkg": "0.5.1",
72
+ "local-pkg": "1.0.0",
73
73
  "prettier": "3.4.2",
74
74
  "prettier-plugin-astro": "0.14.1",
75
75
  "tslib": "2.8.1"
76
76
  },
77
77
  "devDependencies": {
78
- "@changesets/cli": "2.27.11",
79
- "@eslint/config-inspector": "0.6.0",
78
+ "@changesets/cli": "2.27.12",
79
+ "@eslint/config-inspector": "0.7.1",
80
80
  "@hexadrop/tsconfig": "0.0.5",
81
- "@types/bun": "1.1.14",
82
- "astro": "5.1.1",
83
- "eslint": "9.17.0",
84
- "eslint-typegen": "0.3.2",
81
+ "@types/bun": "1.2.2",
82
+ "astro": "5.2.5",
83
+ "eslint": "9.20.1",
84
+ "eslint-typegen": "1.0.0",
85
85
  "jiti": "2.4.2",
86
86
  "react": "19.0.0",
87
- "tsup": "8.3.5",
88
- "typescript": "5.7.2"
87
+ "tsup": "8.3.6",
88
+ "typescript": "5.7.3"
89
89
  }
90
90
  }