-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configured markdownlint
to load custom config 🪇
#5
Merged
Conversation
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 can be used to have conditional code removed when building the module (for example, when file paths are different post-build).
This function, `colourLog.error`, can log an error in a consistent way throughout the codebase. If `global.debug` is true, the original error will also be logged.
Custom config is loaded from a `markdownlint.json` file. If no config is found, default config provided by Lint Pilot is used.
01taylop
force-pushed
the
markdownlint-config
branch
from
July 15, 2024 15:52
5963e8c
to
6429fef
Compare
01taylop
changed the title
Improved the utils code and tests 🐠
Configured markdownlint to load custom config 🪇
Jul 15, 2024
01taylop
changed the title
Configured markdownlint to load custom config 🪇
Configured Jul 16, 2024
markdownlint
to load custom config 🪇
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
What have you changed?
markdownlint
to load custom config, defaulting to config defined by Lint Pilot.@rollup/plugin-replace
.toHaveBeenCalledOnceWith
.debug
.Why are you making these changes?
@rollup/plugin-replace
plugin means we can have conditional logic, such asif (process.env.NODE_ENV === 'development') { ... }
, which can be removed from the bundle when compiling the module.console.log
to ensure there are no unexpected logs. This custom matcher combines two assertions into one which helps keep the tests cleaner, leaner, and therefore easier to read and maintain.colourLog
has been improved and can now be used for all logging, including errors.