@kazupon/eslint-config 0.37.0 → 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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16325,7 +16325,7 @@ interface MarkdownOptions {
|
|
|
16325
16325
|
* @param {MarkdownOptions & OverridesOptions} options - eslint unicorn configuration options
|
|
16326
16326
|
* @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/markdown` and overrides
|
|
16327
16327
|
*/
|
|
16328
|
-
declare function markdown(options?: MarkdownOptions & OverridesOptions): Promise<Linter.Config[]>;
|
|
16328
|
+
declare function markdown(options?: MarkdownOptions & OverridesOptions<MarkdownRules>): Promise<Linter.Config[]>;
|
|
16329
16329
|
declare const md: typeof markdown;
|
|
16330
16330
|
//#endregion
|
|
16331
16331
|
//#region src/configs/prettier.d.ts
|
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
|
-
|
|
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: [
|
|
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
|
}
|