@kazupon/eslint-config 0.37.1 → 0.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -613,13 +613,18 @@ async function markdown(options = {}) {
613
613
  languageOptions: { parserOptions: { project: null } }
614
614
  }
615
615
  ];
616
+ let preferencesPlugin;
616
617
  if (preferences) {
617
- const preferencesPlugin = await loadPlugin("eslint-plugin-markdown-preferences");
618
+ preferencesPlugin = await loadPlugin("eslint-plugin-markdown-preferences");
618
619
  configs.push({ ...preferencesPlugin.configs.recommended });
619
620
  }
620
621
  const custom = {
621
622
  name: "@kazupon/markdown",
622
- files: [`${GLOB_MARKDOWN}/${GLOB_SRC}`, ...blockExtensions.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)],
623
+ files: [
624
+ ...files,
625
+ `${GLOB_MARKDOWN}/${GLOB_SRC}`,
626
+ ...blockExtensions.map((ext) => `${GLOB_MARKDOWN}/**/*.${ext}`)
627
+ ],
623
628
  languageOptions: { parserOptions: { ecmaFeatures: { impliedStrict: true } } },
624
629
  rules: {
625
630
  ...codeblocks.rules,
@@ -629,6 +634,7 @@ async function markdown(options = {}) {
629
634
  ...overrideRules
630
635
  }
631
636
  };
637
+ if (preferences && preferencesPlugin) custom.plugins = { "markdown-preferences": preferencesPlugin.configs.recommended.plugins["markdown-preferences"] };
632
638
  configs.push(custom);
633
639
  return configs;
634
640
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kazupon/eslint-config",
3
3
  "description": "ESLint config for @kazupon",
4
- "version": "0.37.1",
4
+ "version": "0.37.2",
5
5
  "author": {
6
6
  "email": "kawakazu80@gmail.com",
7
7
  "name": "kazuya kawaguchi"