@icebreakers/eslint-config 1.2.2 → 1.2.4

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
@@ -41,10 +41,10 @@ var init_cjs_shims = __esm({
41
41
  }
42
42
  });
43
43
 
44
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
44
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
45
45
  var base;
46
46
  var init_base = __esm({
47
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js"() {
47
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js"() {
48
48
  "use strict";
49
49
  init_cjs_shims();
50
50
  base = {
@@ -63,10 +63,10 @@ var init_base = __esm({
63
63
  }
64
64
  });
65
65
 
66
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
66
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
67
67
  var codeBlocks;
68
68
  var init_code_blocks = __esm({
69
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js"() {
69
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js"() {
70
70
  "use strict";
71
71
  init_cjs_shims();
72
72
  codeBlocks = {
@@ -89,10 +89,10 @@ var init_code_blocks = __esm({
89
89
  }
90
90
  });
91
91
 
92
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
92
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
93
93
  var import_node_fs, import_node_module, import_node_path, arrayify, getPhysicalFilename, getPositionAtFactory, normalizePosition, prevCharOffsetFactory, nextCharOffsetFactory, importMetaUrl2, cjsRequire;
94
94
  var init_helpers = __esm({
95
- "../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js"() {
95
+ "../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js"() {
96
96
  "use strict";
97
97
  init_cjs_shims();
98
98
  import_node_fs = __toESM(require("fs"), 1);
@@ -171,10 +171,10 @@ var init_helpers = __esm({
171
171
  }
172
172
  });
173
173
 
174
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
174
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
175
175
  var pkg, meta;
176
176
  var init_meta = __esm({
177
- "../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js"() {
177
+ "../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js"() {
178
178
  "use strict";
179
179
  init_cjs_shims();
180
180
  init_helpers();
@@ -721,10 +721,10 @@ var init_lib2 = __esm({
721
721
  }
722
722
  });
723
723
 
724
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
724
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
725
725
  var performSyncWork;
726
726
  var init_sync = __esm({
727
- "../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js"() {
727
+ "../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js"() {
728
728
  "use strict";
729
729
  init_cjs_shims();
730
730
  init_lib2();
@@ -733,10 +733,10 @@ var init_sync = __esm({
733
733
  }
734
734
  });
735
735
 
736
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
736
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
737
737
  var import_node_path5, DEFAULT_EXTENSIONS, MARKDOWN_EXTENSIONS, Parser, parser, parse, parseForESLint;
738
738
  var init_parser = __esm({
739
- "../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js"() {
739
+ "../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js"() {
740
740
  "use strict";
741
741
  init_cjs_shims();
742
742
  import_node_path5 = __toESM(require("path"), 1);
@@ -752,7 +752,7 @@ var init_parser = __esm({
752
752
  parse(code, options) {
753
753
  return this.parseForESLint(code, options).ast;
754
754
  }
755
- parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, extensions, markdownExtensions }) {
755
+ parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, remarkConfigPath, extensions, markdownExtensions }) {
756
756
  const extname = import_node_path5.default.extname(filePath);
757
757
  const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(extname);
758
758
  const isMarkdown = [
@@ -768,7 +768,8 @@ var init_parser = __esm({
768
768
  filePath: getPhysicalFilename(filePath),
769
769
  code,
770
770
  isMdx,
771
- ignoreRemarkConfig
771
+ ignoreRemarkConfig,
772
+ remarkConfigPath
772
773
  });
773
774
  } catch (err) {
774
775
  if (process.argv.includes("--debug")) {
@@ -802,7 +803,7 @@ var init_parser = __esm({
802
803
  }
803
804
  });
804
805
 
805
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
806
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
806
807
  var lib_exports = {};
807
808
  __export(lib_exports, {
808
809
  DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
@@ -822,7 +823,7 @@ __export(lib_exports, {
822
823
  prevCharOffsetFactory: () => prevCharOffsetFactory
823
824
  });
824
825
  var init_lib3 = __esm({
825
- "../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js"() {
826
+ "../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js"() {
826
827
  "use strict";
827
828
  init_cjs_shims();
828
829
  init_helpers();
@@ -832,49 +833,10 @@ var init_lib3 = __esm({
832
833
  }
833
834
  });
834
835
 
835
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
836
- var flat, parserOptions, restConfig, flatCodeBlocks;
837
- var init_flat = __esm({
838
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js"() {
839
- "use strict";
840
- init_cjs_shims();
841
- init_lib3();
842
- init_lib4();
843
- init_code_blocks();
844
- flat = {
845
- files: ["**/*.{md,mdx}"],
846
- languageOptions: {
847
- sourceType: "module",
848
- ecmaVersion: "latest",
849
- parser: lib_exports,
850
- globals: {
851
- React: false
852
- }
853
- },
854
- plugins: {
855
- mdx: lib_exports2
856
- },
857
- rules: {
858
- "mdx/remark": "warn",
859
- "no-unused-expressions": "error",
860
- "react/react-in-jsx-scope": "off"
861
- }
862
- };
863
- ({ parserOptions, ...restConfig } = codeBlocks);
864
- flatCodeBlocks = {
865
- files: ["**/*.{md,mdx}/**"],
866
- languageOptions: {
867
- parserOptions
868
- },
869
- ...restConfig
870
- };
871
- }
872
- });
873
-
874
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
836
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
875
837
  var import_node_module4, getGlobals, importMetaUrl4, cjsRequire3;
876
838
  var init_helpers4 = __esm({
877
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js"() {
839
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js"() {
878
840
  "use strict";
879
841
  init_cjs_shims();
880
842
  import_node_module4 = require("module");
@@ -886,126 +848,10 @@ var init_helpers4 = __esm({
886
848
  }
887
849
  });
888
850
 
889
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
890
- var isReactPluginAvailable, overrides;
891
- var init_overrides = __esm({
892
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js"() {
893
- "use strict";
894
- init_cjs_shims();
895
- init_lib3();
896
- init_helpers4();
897
- init_base();
898
- isReactPluginAvailable = false;
899
- try {
900
- cjsRequire3.resolve("eslint-plugin-react");
901
- isReactPluginAvailable = true;
902
- } catch {
903
- }
904
- overrides = {
905
- ...base,
906
- globals: {
907
- React: false
908
- },
909
- plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
910
- rules: {
911
- "react/jsx-no-undef": isReactPluginAvailable ? [
912
- 2,
913
- {
914
- allowGlobals: true
915
- }
916
- ] : 0,
917
- "react/react-in-jsx-scope": 0
918
- }
919
- };
920
- }
921
- });
922
-
923
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
924
- var overrides2, recommended, addPrettierRules;
925
- var init_recommended = __esm({
926
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js"() {
927
- "use strict";
928
- init_cjs_shims();
929
- init_helpers4();
930
- init_base();
931
- overrides2 = [
932
- {
933
- files: ["*.md", "*.mdx"],
934
- extends: "plugin:mdx/overrides",
935
- ...base
936
- },
937
- {
938
- files: "**/*.{md,mdx}/**",
939
- extends: "plugin:mdx/code-blocks"
940
- }
941
- ];
942
- recommended = {
943
- overrides: overrides2
944
- };
945
- addPrettierRules = () => {
946
- try {
947
- cjsRequire3.resolve("prettier");
948
- const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
949
- const version = meta3?.version || "";
950
- const [major, minor, patch] = version.split(".");
951
- if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
952
- return;
953
- }
954
- overrides2.push({
955
- files: "*.md",
956
- rules: {
957
- "prettier/prettier": [
958
- "error",
959
- {
960
- parser: "markdown"
961
- }
962
- ]
963
- }
964
- }, {
965
- files: "*.mdx",
966
- rules: {
967
- "prettier/prettier": [
968
- "error",
969
- {
970
- parser: "mdx"
971
- }
972
- ]
973
- }
974
- });
975
- } catch {
976
- }
977
- };
978
- addPrettierRules();
979
- }
980
- });
981
-
982
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
983
- var configs;
984
- var init_configs = __esm({
985
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js"() {
986
- "use strict";
987
- init_cjs_shims();
988
- init_base();
989
- init_code_blocks();
990
- init_flat();
991
- init_overrides();
992
- init_recommended();
993
- configs = {
994
- base,
995
- "code-blocks": codeBlocks,
996
- codeBlocks,
997
- flat,
998
- flatCodeBlocks,
999
- overrides,
1000
- recommended
1001
- };
1002
- }
1003
- });
1004
-
1005
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
851
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
1006
852
  var pkg2, meta2;
1007
853
  var init_meta2 = __esm({
1008
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js"() {
854
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js"() {
1009
855
  "use strict";
1010
856
  init_cjs_shims();
1011
857
  init_helpers4();
@@ -1014,7 +860,7 @@ var init_meta2 = __esm({
1014
860
  }
1015
861
  });
1016
862
 
1017
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
863
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
1018
864
  function getShortLang(filename, languageMapper) {
1019
865
  const language = filename.split(".").at(-1);
1020
866
  if (languageMapper === false) {
@@ -1030,7 +876,7 @@ function getShortLang(filename, languageMapper) {
1030
876
  }
1031
877
  var DEFAULT_LANGUAGE_MAPPER;
1032
878
  var init_helpers5 = __esm({
1033
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js"() {
879
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js"() {
1034
880
  "use strict";
1035
881
  init_cjs_shims();
1036
882
  DEFAULT_LANGUAGE_MAPPER = {
@@ -1048,7 +894,7 @@ var init_helpers5 = __esm({
1048
894
  }
1049
895
  });
1050
896
 
1051
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
897
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
1052
898
  function traverse(node, callbacks) {
1053
899
  if (callbacks[node.type]) {
1054
900
  callbacks[node.type](node);
@@ -1126,12 +972,13 @@ function getOnDiskFilepath(filepath) {
1126
972
  }
1127
973
  return fallback ? getOnDiskFilepath(import_node_path6.default.dirname(filepath)) : filepath;
1128
974
  }
1129
- function preprocess(sourceText, filename) {
975
+ function preprocess(sourceText, filename, syncOptions) {
1130
976
  const text = sourceText.startsWith(BOM) ? sourceText.slice(1) : sourceText;
1131
977
  const { root } = performSyncWork({
1132
978
  filePath: getOnDiskFilepath(filename),
1133
979
  code: text,
1134
- isMdx: filename.endsWith(".mdx")
980
+ isMdx: filename.endsWith(".mdx"),
981
+ ...syncOptions
1135
982
  });
1136
983
  const blocks = [];
1137
984
  blocksCache.set(filename, blocks);
@@ -1248,7 +1095,7 @@ function postprocess(messages, filename) {
1248
1095
  }
1249
1096
  var import_node_fs4, import_node_path6, UNSATISFIABLE_RULES, SUPPORTS_AUTOFIX, BOM, blocksCache, COMMENTS, eslintCommentRegex, leadingWhitespaceRegex, codeBlockFileNameRegex, markdownProcessor;
1250
1097
  var init_markdown = __esm({
1251
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js"() {
1098
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js"() {
1252
1099
  "use strict";
1253
1100
  init_cjs_shims();
1254
1101
  import_node_fs4 = __toESM(require("fs"), 1);
@@ -1287,10 +1134,10 @@ var init_markdown = __esm({
1287
1134
  }
1288
1135
  });
1289
1136
 
1290
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
1137
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
1291
1138
  var processorOptions, linterPath, ESLinter, verify;
1292
1139
  var init_options = __esm({
1293
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js"() {
1140
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js"() {
1294
1141
  "use strict";
1295
1142
  init_cjs_shims();
1296
1143
  init_helpers4();
@@ -1303,38 +1150,40 @@ var init_options = __esm({
1303
1150
  ({ verify } = ESLinter.prototype);
1304
1151
  ESLinter.prototype.verify = function(code, config, options) {
1305
1152
  const settings = (config.extractConfig?.(typeof options === "undefined" || typeof options === "string" ? options : options.filename) ?? config).settings ?? {};
1306
- processorOptions.lintCodeBlocks = settings["mdx/code-blocks"] === true;
1153
+ processorOptions.lintCodeBlocks = settings["mdx/code-blocks"];
1307
1154
  processorOptions.languageMapper = settings["mdx/language-mapper"];
1155
+ processorOptions.ignoreRemarkConfig = settings["mdx/ignore-remark-config"];
1156
+ processorOptions.remarkConfigPath = settings["mdx/remark-config-path"];
1308
1157
  return verify.call(this, code, config, options);
1309
1158
  };
1310
1159
  }
1311
1160
  });
1312
1161
 
1313
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
1162
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
1314
1163
  var createRemarkProcessor, remark;
1315
1164
  var init_remark = __esm({
1316
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js"() {
1165
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js"() {
1317
1166
  "use strict";
1318
1167
  init_cjs_shims();
1319
1168
  init_meta2();
1320
1169
  init_helpers5();
1321
1170
  init_markdown();
1322
1171
  init_options();
1323
- createRemarkProcessor = (processorOptions2 = processorOptions) => ({
1172
+ createRemarkProcessor = ({ languageMapper, lintCodeBlocks, ...syncOptions } = processorOptions) => ({
1324
1173
  meta: {
1325
1174
  name: "mdx/remark",
1326
1175
  version: meta2.version
1327
1176
  },
1328
1177
  supportsAutofix: true,
1329
1178
  preprocess(text, filename) {
1330
- if (!processorOptions2.lintCodeBlocks) {
1179
+ if (!lintCodeBlocks) {
1331
1180
  return [text];
1332
1181
  }
1333
1182
  return [
1334
1183
  text,
1335
- ...markdownProcessor.preprocess(text, filename).map(({ text: text2, filename: filename2 }) => ({
1184
+ ...markdownProcessor.preprocess(text, filename, syncOptions).map(({ text: text2, filename: filename2 }) => ({
1336
1185
  text: text2,
1337
- filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions2.languageMapper)
1186
+ filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, languageMapper)
1338
1187
  }))
1339
1188
  ];
1340
1189
  },
@@ -1361,10 +1210,165 @@ var init_remark = __esm({
1361
1210
  }
1362
1211
  });
1363
1212
 
1364
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1213
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
1214
+ var flat, parserOptions, restConfig, flatCodeBlocks;
1215
+ var init_flat = __esm({
1216
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js"() {
1217
+ "use strict";
1218
+ init_cjs_shims();
1219
+ init_lib3();
1220
+ init_lib4();
1221
+ init_remark();
1222
+ init_code_blocks();
1223
+ flat = {
1224
+ files: ["**/*.{md,mdx}"],
1225
+ languageOptions: {
1226
+ parser: lib_exports,
1227
+ globals: {
1228
+ React: false
1229
+ }
1230
+ },
1231
+ plugins: {
1232
+ mdx: lib_exports2
1233
+ },
1234
+ processor: remark,
1235
+ rules: {
1236
+ "mdx/remark": "warn",
1237
+ "no-unused-expressions": "error",
1238
+ "react/react-in-jsx-scope": "off"
1239
+ }
1240
+ };
1241
+ ({ parserOptions, ...restConfig } = codeBlocks);
1242
+ flatCodeBlocks = {
1243
+ files: ["**/*.{md,mdx}/**"],
1244
+ languageOptions: {
1245
+ parserOptions
1246
+ },
1247
+ ...restConfig
1248
+ };
1249
+ }
1250
+ });
1251
+
1252
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
1253
+ var isReactPluginAvailable, overrides;
1254
+ var init_overrides = __esm({
1255
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js"() {
1256
+ "use strict";
1257
+ init_cjs_shims();
1258
+ init_lib3();
1259
+ init_helpers4();
1260
+ init_base();
1261
+ isReactPluginAvailable = false;
1262
+ try {
1263
+ cjsRequire3.resolve("eslint-plugin-react");
1264
+ isReactPluginAvailable = true;
1265
+ } catch {
1266
+ }
1267
+ overrides = {
1268
+ ...base,
1269
+ globals: {
1270
+ React: false
1271
+ },
1272
+ plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
1273
+ rules: {
1274
+ "react/jsx-no-undef": isReactPluginAvailable ? [
1275
+ 2,
1276
+ {
1277
+ allowGlobals: true
1278
+ }
1279
+ ] : 0,
1280
+ "react/react-in-jsx-scope": 0
1281
+ }
1282
+ };
1283
+ }
1284
+ });
1285
+
1286
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
1287
+ var overrides2, recommended, addPrettierRules;
1288
+ var init_recommended = __esm({
1289
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js"() {
1290
+ "use strict";
1291
+ init_cjs_shims();
1292
+ init_helpers4();
1293
+ init_base();
1294
+ overrides2 = [
1295
+ {
1296
+ files: ["*.md", "*.mdx"],
1297
+ extends: "plugin:mdx/overrides",
1298
+ ...base
1299
+ },
1300
+ {
1301
+ files: "**/*.{md,mdx}/**",
1302
+ extends: "plugin:mdx/code-blocks"
1303
+ }
1304
+ ];
1305
+ recommended = {
1306
+ overrides: overrides2
1307
+ };
1308
+ addPrettierRules = () => {
1309
+ try {
1310
+ cjsRequire3.resolve("prettier");
1311
+ const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
1312
+ const version = meta3?.version || "";
1313
+ const [major, minor, patch] = version.split(".");
1314
+ if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
1315
+ return;
1316
+ }
1317
+ overrides2.push({
1318
+ files: "*.md",
1319
+ rules: {
1320
+ "prettier/prettier": [
1321
+ "error",
1322
+ {
1323
+ parser: "markdown"
1324
+ }
1325
+ ]
1326
+ }
1327
+ }, {
1328
+ files: "*.mdx",
1329
+ rules: {
1330
+ "prettier/prettier": [
1331
+ "error",
1332
+ {
1333
+ parser: "mdx"
1334
+ }
1335
+ ]
1336
+ }
1337
+ });
1338
+ } catch {
1339
+ }
1340
+ };
1341
+ addPrettierRules();
1342
+ }
1343
+ });
1344
+
1345
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
1346
+ var configs;
1347
+ var init_configs = __esm({
1348
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js"() {
1349
+ "use strict";
1350
+ init_cjs_shims();
1351
+ init_base();
1352
+ init_code_blocks();
1353
+ init_flat();
1354
+ init_overrides();
1355
+ init_recommended();
1356
+ configs = {
1357
+ base,
1358
+ "code-blocks": codeBlocks,
1359
+ codeBlocks,
1360
+ flat,
1361
+ flatCodeBlocks,
1362
+ overrides,
1363
+ recommended
1364
+ };
1365
+ }
1366
+ });
1367
+
1368
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1365
1369
  var processors;
1366
1370
  var init_processors = __esm({
1367
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js"() {
1371
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js"() {
1368
1372
  "use strict";
1369
1373
  init_cjs_shims();
1370
1374
  init_remark();
@@ -1375,10 +1379,10 @@ var init_processors = __esm({
1375
1379
  }
1376
1380
  });
1377
1381
 
1378
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1382
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1379
1383
  var import_node_path7, remark2;
1380
1384
  var init_remark2 = __esm({
1381
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js"() {
1385
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js"() {
1382
1386
  "use strict";
1383
1387
  init_cjs_shims();
1384
1388
  import_node_path7 = __toESM(require("path"), 1);
@@ -1397,21 +1401,20 @@ var init_remark2 = __esm({
1397
1401
  const filename = context.getFilename();
1398
1402
  const extname = import_node_path7.default.extname(filename);
1399
1403
  const sourceCode = context.getSourceCode();
1400
- const options = context.parserOptions;
1401
- const isMdx = [
1402
- ...DEFAULT_EXTENSIONS,
1403
- ...options.extensions || []
1404
- ].includes(extname);
1404
+ const { extensions, markdownExtensions, ignoreRemarkConfig, remarkConfigPath } = {
1405
+ ...context.parserOptions,
1406
+ ...context.languageOptions?.parserOptions
1407
+ };
1408
+ const isMdx = [...DEFAULT_EXTENSIONS, ...extensions || []].includes(extname);
1405
1409
  const isMarkdown = [
1406
1410
  ...MARKDOWN_EXTENSIONS,
1407
- ...options.markdownExtensions || []
1411
+ ...markdownExtensions || []
1408
1412
  ].includes(extname);
1409
1413
  return {
1410
1414
  Program(node) {
1411
1415
  if (!isMdx && !isMarkdown) {
1412
1416
  return;
1413
1417
  }
1414
- const ignoreRemarkConfig = Boolean(options.ignoreRemarkConfig);
1415
1418
  const sourceText = sourceCode.getText(node);
1416
1419
  const { messages, content: fixedText } = performSyncWork({
1417
1420
  filePath: getPhysicalFilename(filename),
@@ -1419,7 +1422,8 @@ var init_remark2 = __esm({
1419
1422
  cwd: context.getCwd(),
1420
1423
  isMdx,
1421
1424
  process: true,
1422
- ignoreRemarkConfig
1425
+ ignoreRemarkConfig,
1426
+ remarkConfigPath
1423
1427
  });
1424
1428
  let fixed = 0;
1425
1429
  for (const { source, reason, ruleId, fatal, line, column, place } of messages) {
@@ -1458,10 +1462,10 @@ var init_remark2 = __esm({
1458
1462
  }
1459
1463
  });
1460
1464
 
1461
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1465
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1462
1466
  var rules;
1463
1467
  var init_rules = __esm({
1464
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js"() {
1468
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js"() {
1465
1469
  "use strict";
1466
1470
  init_cjs_shims();
1467
1471
  init_remark2();
@@ -1469,7 +1473,7 @@ var init_rules = __esm({
1469
1473
  }
1470
1474
  });
1471
1475
 
1472
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
1476
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
1473
1477
  var lib_exports2 = {};
1474
1478
  __export(lib_exports2, {
1475
1479
  DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
@@ -1491,7 +1495,7 @@ __export(lib_exports2, {
1491
1495
  rules: () => rules
1492
1496
  });
1493
1497
  var init_lib4 = __esm({
1494
- "../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js"() {
1498
+ "../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js"() {
1495
1499
  "use strict";
1496
1500
  init_cjs_shims();
1497
1501
  init_configs();
@@ -1595,7 +1599,7 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
1595
1599
  // src/defaults.ts
1596
1600
  init_cjs_shims();
1597
1601
 
1598
- // ../../node_modules/.pnpm/eslint-plugin-vue@10.2.0_eslint@9.30.0_jiti@2.4.2__vue-eslint-parser@10.1.3_eslint@9.30.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1602
+ // ../../node_modules/.pnpm/eslint-plugin-vue@10.3.0_@typescript-eslint+parser@8.37.0_eslint@9.31.0_jiti@2.4.2__typ_5154f935089dd76fc4b2a94db3df836e/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
1599
1603
  var inline_non_void_elements_default = [
1600
1604
  "a",
1601
1605
  "abbr",
package/dist/index.js CHANGED
@@ -75,7 +75,7 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
75
75
  }
76
76
  });
77
77
 
78
- // ../../node_modules/.pnpm/eslint-plugin-vue@10.2.0_eslint@9.30.0_jiti@2.4.2__vue-eslint-parser@10.1.3_eslint@9.30.0_jiti@2.4.2__/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
78
+ // ../../node_modules/.pnpm/eslint-plugin-vue@10.3.0_@typescript-eslint+parser@8.37.0_eslint@9.31.0_jiti@2.4.2__typ_5154f935089dd76fc4b2a94db3df836e/node_modules/eslint-plugin-vue/lib/utils/inline-non-void-elements.json
79
79
  var inline_non_void_elements_default = [
80
80
  "a",
81
81
  "abbr",
@@ -289,7 +289,7 @@ function getPresets(options, mode) {
289
289
  });
290
290
  }
291
291
  if (enableMDX) {
292
- presets.push((0, antfu_exports.interopDefault)(import("./lib-6TMWN2SO.js")).then((mdx) => {
292
+ presets.push((0, antfu_exports.interopDefault)(import("./lib-BBVC6DE4.js")).then((mdx) => {
293
293
  return [
294
294
  {
295
295
  ...mdx.flat,
@@ -4,7 +4,7 @@ import {
4
4
  __require
5
5
  } from "./chunk-AKO2PQXS.js";
6
6
 
7
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
7
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/index.js
8
8
  var lib_exports2 = {};
9
9
  __export(lib_exports2, {
10
10
  DEFAULT_LANGUAGE_MAPPER: () => DEFAULT_LANGUAGE_MAPPER,
@@ -26,7 +26,7 @@ __export(lib_exports2, {
26
26
  rules: () => rules
27
27
  });
28
28
 
29
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
29
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/base.js
30
30
  var base = {
31
31
  parser: "eslint-mdx",
32
32
  parserOptions: {
@@ -41,7 +41,7 @@ var base = {
41
41
  }
42
42
  };
43
43
 
44
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
44
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/code-blocks.js
45
45
  var codeBlocks = {
46
46
  parserOptions: {
47
47
  ecmaFeatures: {
@@ -60,7 +60,7 @@ var codeBlocks = {
60
60
  }
61
61
  };
62
62
 
63
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
63
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/index.js
64
64
  var lib_exports = {};
65
65
  __export(lib_exports, {
66
66
  DEFAULT_EXTENSIONS: () => DEFAULT_EXTENSIONS,
@@ -80,7 +80,7 @@ __export(lib_exports, {
80
80
  prevCharOffsetFactory: () => prevCharOffsetFactory
81
81
  });
82
82
 
83
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
83
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/helpers.js
84
84
  import fs from "fs";
85
85
  import { createRequire } from "module";
86
86
  import path from "path";
@@ -155,11 +155,11 @@ var nextCharOffsetFactory = (text) => {
155
155
  var importMetaUrl = import.meta.url;
156
156
  var cjsRequire = importMetaUrl ? createRequire(importMetaUrl) : __require;
157
157
 
158
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
158
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/meta.js
159
159
  var pkg = cjsRequire("../package.json");
160
160
  var meta = { name: pkg.name, version: pkg.version };
161
161
 
162
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
162
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
163
163
  import path5 from "path";
164
164
 
165
165
  // ../../node_modules/.pnpm/synckit@0.11.8/node_modules/synckit/lib/index.js
@@ -638,10 +638,10 @@ function createSyncFn(workerPath, timeoutOrOptions) {
638
638
  return syncFn;
639
639
  }
640
640
 
641
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
641
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/sync.js
642
642
  var performSyncWork = createSyncFn(cjsRequire.resolve("./worker.js"));
643
643
 
644
- // ../../node_modules/.pnpm/eslint-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
644
+ // ../../node_modules/.pnpm/eslint-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-mdx/lib/parser.js
645
645
  var DEFAULT_EXTENSIONS = [".mdx"];
646
646
  var MARKDOWN_EXTENSIONS = [".md"];
647
647
  var Parser = class {
@@ -652,7 +652,7 @@ var Parser = class {
652
652
  parse(code, options) {
653
653
  return this.parseForESLint(code, options).ast;
654
654
  }
655
- parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, extensions, markdownExtensions }) {
655
+ parseForESLint(code, { filePath, sourceType, ignoreRemarkConfig, remarkConfigPath, extensions, markdownExtensions }) {
656
656
  const extname = path5.extname(filePath);
657
657
  const isMdx = [...DEFAULT_EXTENSIONS, ...arrayify(extensions)].includes(extname);
658
658
  const isMarkdown = [
@@ -668,7 +668,8 @@ var Parser = class {
668
668
  filePath: getPhysicalFilename(filePath),
669
669
  code,
670
670
  isMdx,
671
- ignoreRemarkConfig
671
+ ignoreRemarkConfig,
672
+ remarkConfigPath
672
673
  });
673
674
  } catch (err) {
674
675
  if (process.argv.includes("--debug")) {
@@ -700,36 +701,7 @@ var Parser = class {
700
701
  var parser = new Parser();
701
702
  var { parse, parseForESLint } = parser;
702
703
 
703
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
704
- var flat = {
705
- files: ["**/*.{md,mdx}"],
706
- languageOptions: {
707
- sourceType: "module",
708
- ecmaVersion: "latest",
709
- parser: lib_exports,
710
- globals: {
711
- React: false
712
- }
713
- },
714
- plugins: {
715
- mdx: lib_exports2
716
- },
717
- rules: {
718
- "mdx/remark": "warn",
719
- "no-unused-expressions": "error",
720
- "react/react-in-jsx-scope": "off"
721
- }
722
- };
723
- var { parserOptions, ...restConfig } = codeBlocks;
724
- var flatCodeBlocks = {
725
- files: ["**/*.{md,mdx}/**"],
726
- languageOptions: {
727
- parserOptions
728
- },
729
- ...restConfig
730
- };
731
-
732
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
704
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/helpers.js
733
705
  import { createRequire as createRequire3 } from "module";
734
706
  var getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? sources : Object.keys(sources)).reduce((globals, source) => Object.assign(globals, {
735
707
  [source]: false
@@ -737,96 +709,11 @@ var getGlobals = (sources, initialGlobals = {}) => (Array.isArray(sources) ? sou
737
709
  var importMetaUrl3 = import.meta.url;
738
710
  var cjsRequire3 = importMetaUrl3 ? createRequire3(importMetaUrl3) : __require;
739
711
 
740
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
741
- var isReactPluginAvailable = false;
742
- try {
743
- cjsRequire3.resolve("eslint-plugin-react");
744
- isReactPluginAvailable = true;
745
- } catch {
746
- }
747
- var overrides = {
748
- ...base,
749
- globals: {
750
- React: false
751
- },
752
- plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
753
- rules: {
754
- "react/jsx-no-undef": isReactPluginAvailable ? [
755
- 2,
756
- {
757
- allowGlobals: true
758
- }
759
- ] : 0,
760
- "react/react-in-jsx-scope": 0
761
- }
762
- };
763
-
764
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
765
- var overrides2 = [
766
- {
767
- files: ["*.md", "*.mdx"],
768
- extends: "plugin:mdx/overrides",
769
- ...base
770
- },
771
- {
772
- files: "**/*.{md,mdx}/**",
773
- extends: "plugin:mdx/code-blocks"
774
- }
775
- ];
776
- var recommended = {
777
- overrides: overrides2
778
- };
779
- var addPrettierRules = () => {
780
- try {
781
- cjsRequire3.resolve("prettier");
782
- const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
783
- const version = meta3?.version || "";
784
- const [major, minor, patch] = version.split(".");
785
- if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
786
- return;
787
- }
788
- overrides2.push({
789
- files: "*.md",
790
- rules: {
791
- "prettier/prettier": [
792
- "error",
793
- {
794
- parser: "markdown"
795
- }
796
- ]
797
- }
798
- }, {
799
- files: "*.mdx",
800
- rules: {
801
- "prettier/prettier": [
802
- "error",
803
- {
804
- parser: "mdx"
805
- }
806
- ]
807
- }
808
- });
809
- } catch {
810
- }
811
- };
812
- addPrettierRules();
813
-
814
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
815
- var configs = {
816
- base,
817
- "code-blocks": codeBlocks,
818
- codeBlocks,
819
- flat,
820
- flatCodeBlocks,
821
- overrides,
822
- recommended
823
- };
824
-
825
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
712
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/meta.js
826
713
  var pkg2 = cjsRequire3("../package.json");
827
714
  var meta2 = { name: pkg2.name, version: pkg2.version };
828
715
 
829
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
716
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/helpers.js
830
717
  var DEFAULT_LANGUAGE_MAPPER = {
831
718
  ecmascript: "js",
832
719
  javascript: "js",
@@ -853,7 +740,7 @@ function getShortLang(filename, languageMapper) {
853
740
  return languageMapper[lang] || lang;
854
741
  }
855
742
 
856
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
743
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/markdown.js
857
744
  import fs4 from "fs";
858
745
  import path6 from "path";
859
746
  var UNSATISFIABLE_RULES = /* @__PURE__ */ new Set([
@@ -953,12 +840,13 @@ function getOnDiskFilepath(filepath) {
953
840
  }
954
841
  return fallback ? getOnDiskFilepath(path6.dirname(filepath)) : filepath;
955
842
  }
956
- function preprocess(sourceText, filename) {
843
+ function preprocess(sourceText, filename, syncOptions) {
957
844
  const text = sourceText.startsWith(BOM) ? sourceText.slice(1) : sourceText;
958
845
  const { root } = performSyncWork({
959
846
  filePath: getOnDiskFilepath(filename),
960
847
  code: text,
961
- isMdx: filename.endsWith(".mdx")
848
+ isMdx: filename.endsWith(".mdx"),
849
+ ...syncOptions
962
850
  });
963
851
  const blocks = [];
964
852
  blocksCache.set(filename, blocks);
@@ -1083,7 +971,7 @@ var markdownProcessor = {
1083
971
  supportsAutofix: SUPPORTS_AUTOFIX
1084
972
  };
1085
973
 
1086
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
974
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/options.js
1087
975
  var processorOptions = {};
1088
976
  var linterPath = Object.keys(cjsRequire3.cache).find((path8) => /([/\\])eslint\1lib(?:\1linter){2}\.js$/.test(path8));
1089
977
  if (!linterPath) {
@@ -1093,27 +981,29 @@ var ESLinter = cjsRequire3(linterPath).Linter;
1093
981
  var { verify } = ESLinter.prototype;
1094
982
  ESLinter.prototype.verify = function(code, config, options) {
1095
983
  const settings = (config.extractConfig?.(typeof options === "undefined" || typeof options === "string" ? options : options.filename) ?? config).settings ?? {};
1096
- processorOptions.lintCodeBlocks = settings["mdx/code-blocks"] === true;
984
+ processorOptions.lintCodeBlocks = settings["mdx/code-blocks"];
1097
985
  processorOptions.languageMapper = settings["mdx/language-mapper"];
986
+ processorOptions.ignoreRemarkConfig = settings["mdx/ignore-remark-config"];
987
+ processorOptions.remarkConfigPath = settings["mdx/remark-config-path"];
1098
988
  return verify.call(this, code, config, options);
1099
989
  };
1100
990
 
1101
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
1102
- var createRemarkProcessor = (processorOptions2 = processorOptions) => ({
991
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/remark.js
992
+ var createRemarkProcessor = ({ languageMapper, lintCodeBlocks, ...syncOptions } = processorOptions) => ({
1103
993
  meta: {
1104
994
  name: "mdx/remark",
1105
995
  version: meta2.version
1106
996
  },
1107
997
  supportsAutofix: true,
1108
998
  preprocess(text, filename) {
1109
- if (!processorOptions2.lintCodeBlocks) {
999
+ if (!lintCodeBlocks) {
1110
1000
  return [text];
1111
1001
  }
1112
1002
  return [
1113
1003
  text,
1114
- ...markdownProcessor.preprocess(text, filename).map(({ text: text2, filename: filename2 }) => ({
1004
+ ...markdownProcessor.preprocess(text, filename, syncOptions).map(({ text: text2, filename: filename2 }) => ({
1115
1005
  text: text2,
1116
- filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, processorOptions2.languageMapper)
1006
+ filename: filename2.slice(0, filename2.lastIndexOf(".")) + "." + getShortLang(filename2, languageMapper)
1117
1007
  }))
1118
1008
  ];
1119
1009
  },
@@ -1138,10 +1028,123 @@ var createRemarkProcessor = (processorOptions2 = processorOptions) => ({
1138
1028
  });
1139
1029
  var remark = createRemarkProcessor();
1140
1030
 
1141
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1031
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/flat.js
1032
+ var flat = {
1033
+ files: ["**/*.{md,mdx}"],
1034
+ languageOptions: {
1035
+ parser: lib_exports,
1036
+ globals: {
1037
+ React: false
1038
+ }
1039
+ },
1040
+ plugins: {
1041
+ mdx: lib_exports2
1042
+ },
1043
+ processor: remark,
1044
+ rules: {
1045
+ "mdx/remark": "warn",
1046
+ "no-unused-expressions": "error",
1047
+ "react/react-in-jsx-scope": "off"
1048
+ }
1049
+ };
1050
+ var { parserOptions, ...restConfig } = codeBlocks;
1051
+ var flatCodeBlocks = {
1052
+ files: ["**/*.{md,mdx}/**"],
1053
+ languageOptions: {
1054
+ parserOptions
1055
+ },
1056
+ ...restConfig
1057
+ };
1058
+
1059
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/overrides.js
1060
+ var isReactPluginAvailable = false;
1061
+ try {
1062
+ cjsRequire3.resolve("eslint-plugin-react");
1063
+ isReactPluginAvailable = true;
1064
+ } catch {
1065
+ }
1066
+ var overrides = {
1067
+ ...base,
1068
+ globals: {
1069
+ React: false
1070
+ },
1071
+ plugins: arrayify(base.plugins, isReactPluginAvailable ? "react" : null),
1072
+ rules: {
1073
+ "react/jsx-no-undef": isReactPluginAvailable ? [
1074
+ 2,
1075
+ {
1076
+ allowGlobals: true
1077
+ }
1078
+ ] : 0,
1079
+ "react/react-in-jsx-scope": 0
1080
+ }
1081
+ };
1082
+
1083
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/recommended.js
1084
+ var overrides2 = [
1085
+ {
1086
+ files: ["*.md", "*.mdx"],
1087
+ extends: "plugin:mdx/overrides",
1088
+ ...base
1089
+ },
1090
+ {
1091
+ files: "**/*.{md,mdx}/**",
1092
+ extends: "plugin:mdx/code-blocks"
1093
+ }
1094
+ ];
1095
+ var recommended = {
1096
+ overrides: overrides2
1097
+ };
1098
+ var addPrettierRules = () => {
1099
+ try {
1100
+ cjsRequire3.resolve("prettier");
1101
+ const { meta: meta3 } = cjsRequire3("eslint-plugin-prettier");
1102
+ const version = meta3?.version || "";
1103
+ const [major, minor, patch] = version.split(".");
1104
+ if (+major > 5 || +major === 5 && (+minor > 1 || +minor === 1 && Number.parseInt(patch) >= 2)) {
1105
+ return;
1106
+ }
1107
+ overrides2.push({
1108
+ files: "*.md",
1109
+ rules: {
1110
+ "prettier/prettier": [
1111
+ "error",
1112
+ {
1113
+ parser: "markdown"
1114
+ }
1115
+ ]
1116
+ }
1117
+ }, {
1118
+ files: "*.mdx",
1119
+ rules: {
1120
+ "prettier/prettier": [
1121
+ "error",
1122
+ {
1123
+ parser: "mdx"
1124
+ }
1125
+ ]
1126
+ }
1127
+ });
1128
+ } catch {
1129
+ }
1130
+ };
1131
+ addPrettierRules();
1132
+
1133
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/configs/index.js
1134
+ var configs = {
1135
+ base,
1136
+ "code-blocks": codeBlocks,
1137
+ codeBlocks,
1138
+ flat,
1139
+ flatCodeBlocks,
1140
+ overrides,
1141
+ recommended
1142
+ };
1143
+
1144
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/processors/index.js
1142
1145
  var processors = { remark };
1143
1146
 
1144
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1147
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/remark.js
1145
1148
  import path7 from "path";
1146
1149
  var remark2 = {
1147
1150
  meta: {
@@ -1157,21 +1160,20 @@ var remark2 = {
1157
1160
  const filename = context.getFilename();
1158
1161
  const extname = path7.extname(filename);
1159
1162
  const sourceCode = context.getSourceCode();
1160
- const options = context.parserOptions;
1161
- const isMdx = [
1162
- ...DEFAULT_EXTENSIONS,
1163
- ...options.extensions || []
1164
- ].includes(extname);
1163
+ const { extensions, markdownExtensions, ignoreRemarkConfig, remarkConfigPath } = {
1164
+ ...context.parserOptions,
1165
+ ...context.languageOptions?.parserOptions
1166
+ };
1167
+ const isMdx = [...DEFAULT_EXTENSIONS, ...extensions || []].includes(extname);
1165
1168
  const isMarkdown = [
1166
1169
  ...MARKDOWN_EXTENSIONS,
1167
- ...options.markdownExtensions || []
1170
+ ...markdownExtensions || []
1168
1171
  ].includes(extname);
1169
1172
  return {
1170
1173
  Program(node) {
1171
1174
  if (!isMdx && !isMarkdown) {
1172
1175
  return;
1173
1176
  }
1174
- const ignoreRemarkConfig = Boolean(options.ignoreRemarkConfig);
1175
1177
  const sourceText = sourceCode.getText(node);
1176
1178
  const { messages, content: fixedText } = performSyncWork({
1177
1179
  filePath: getPhysicalFilename(filename),
@@ -1179,7 +1181,8 @@ var remark2 = {
1179
1181
  cwd: context.getCwd(),
1180
1182
  isMdx,
1181
1183
  process: true,
1182
- ignoreRemarkConfig
1184
+ ignoreRemarkConfig,
1185
+ remarkConfigPath
1183
1186
  });
1184
1187
  let fixed = 0;
1185
1188
  for (const { source, reason, ruleId, fatal, line, column, place } of messages) {
@@ -1216,7 +1219,7 @@ var remark2 = {
1216
1219
  }
1217
1220
  };
1218
1221
 
1219
- // ../../node_modules/.pnpm/eslint-plugin-mdx@3.5.0_eslint@9.30.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1222
+ // ../../node_modules/.pnpm/eslint-plugin-mdx@3.6.2_eslint@9.31.0_jiti@2.4.2_/node_modules/eslint-plugin-mdx/lib/rules/index.js
1220
1223
  var rules = { remark: remark2 };
1221
1224
  export {
1222
1225
  DEFAULT_LANGUAGE_MAPPER,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/eslint-config",
3
3
  "type": "module",
4
- "version": "1.2.2",
4
+ "version": "1.2.4",
5
5
  "description": "icebreakers's eslint config",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -40,18 +40,18 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@antfu/eslint-config": "4.16.1",
44
- "@eslint-react/eslint-plugin": "^1.52.2",
43
+ "@antfu/eslint-config": "4.17.0",
44
+ "@eslint-react/eslint-plugin": "^1.52.3",
45
45
  "eslint-plugin-format": "1.0.1",
46
46
  "eslint-plugin-jsx-a11y": "^6.10.2",
47
47
  "eslint-plugin-react-hooks": "^5.2.0",
48
48
  "eslint-plugin-react-refresh": "^0.4.20",
49
- "eslint-plugin-tailwindcss": "3.18.0",
49
+ "eslint-plugin-tailwindcss": "3.18.2",
50
50
  "eslint-plugin-vuejs-accessibility": "^2.4.1"
51
51
  },
52
52
  "optionalDependencies": {
53
- "@unocss/eslint-plugin": "66.3.2",
54
- "eslint-plugin-mdx": "3.5.0"
53
+ "@unocss/eslint-plugin": "66.3.3",
54
+ "eslint-plugin-mdx": "3.6.2"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public",