Skip to content
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

NOJIRA: use markdownlint-config-fluid instead of embedded config #26

Conversation

greatislander
Copy link
Contributor

This PR uses the new markdownlint-config-fluid shareable configuration for Markdownlint instead of directly configuring the linter in the task.

"code-block-style": false, // Allow both fenced and indented styles
"ol-prefix": {style: "ordered"} // 1. 2. 3. etc
}
config: grunt.file.readJSON("./node_modules/markdownlint-config-fluid/.markdownlintrc.json")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the location configurable? I'm fine with the fluid config being the default, but it should be configurable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@the-t-in-rtf Sure! What's your preferred method of doing this? I'm a bit of a Grunt novice so I based this approach on the config locations for the other linters (the notable distinction being that markdownlint requires a JSON object rather than a file path, hence my use of grunt.file.readJSON).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's an example of how we've used options elsewhere in the package. In the same file, you can see the default config. If you can load the JSON there and add that to the defaults, then people can override config options in their Gruntfile without having to create their own settings file (we won't to support both ways of working).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm still not quite clear on what's expected— wouldn't overriding lintAll.markdownlint.options.config in a user's Gruntfile work without any additional changes here?

Copy link
Collaborator

@the-t-in-rtf the-t-in-rtf Dec 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the 10 days since I left my last comment, I've made a first pass at rewriting this package to avoid using Grunt altogether. Given that we absolutely cannot use grunt.file.readJSON in that package, I'll take care of adding comparable functionality to the replacement package. I'd suggest closing this one out.

@the-t-in-rtf
Copy link
Collaborator

Apologies for the extreme delay in responding. I think this is good to go with one minor change (see comments).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants