-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(check-examples): change default extension for simulated file name…
… of `@example` from `md` to `md/*.js`. Only applies when `matchingFileName` is not used. BREAKING CHANGE: Per update to `eslint-plugin-markdown` v2 and its support of ESLint 7's new processor API, fenced blocks can (and must) be targeted separately from the Markdown parent file as a whole, so in order to allow the same `overrides` config to be reusable between Markdown fenced blocks and `@example` tags (since one often wishes to disable the same kind of rules for each, being as that each may deliberately lack full context, e.g., undefined or unused variables), we update the default simulated extension set for `@example` tags by `check-examples` to simulate an expression which will now be a suitable choice for `overrides` in targeting Markdown fenced blocks using the new parser API, as with eslint-plugin-markdown@2 (i.e., "md/*.js" instead of "md"). If you need to use ESLint 6 (or eslint-plugin-markdown < 2, for example) with `check-examples`, you should be able to manually supply the `matchingFileName` option targeting "md", e.g., set to `'dummy.md`. This commit also simplifies a testing example to avoid it throwing with changed config not having proper babel support (not meaningful to test anyways)
- Loading branch information
Showing
4 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters