-
Notifications
You must be signed in to change notification settings - Fork 5
lint and format YAML, TOML, JS #93
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
Merged
Merged
Conversation
This file contains hidden or 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
Contributor
Author
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite and will continue to be automatically updated while this PR remains open. |
This PR adds ESLint support for YAML and TOML files in addition to formatting via Prettier. - Most rules *other than the spell checker) are kept closely to the defaults; other stuff is generally for compatibility. - This PR replaces the `markdownlint-cli2` tool with an ESLint plugin. - All YAML, TOML, Markdown and JS files are formatted automatically upon commit via `husky` - In addition, fixed an issue where `README.md` also gets formatted in the `lint:markdown` task. - Does _not_ format or lint HTML files, as the template engine we're using requires further plugins/configuration which I haven't investigated. I'm pretty sure this is possible if we treat the `.html` files as Handlebars templates, though. - I have changed the ESLint configuration to use semicolons and two-character spacing since Bromann can’t argue with me about it.
fc5f590 to
37654c0
Compare
diemol
approved these changes
Dec 18, 2021
Member
diemol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I enabled deploys for all branches in Netlfy so now these PRs that depend on each other wil be previewed as well.
diemol
added a commit
that referenced
this pull request
Dec 18, 2021
* chore: add automatic markdown linting and formatting several things make this happen: - `husky` for installing pre-commit hooks - `lint-staged` for performing operations on _only staged files_; run as pre-commit hook - `prettier` for formatting the markdown sensibly - `markdownlint-cli2` for other concerns not addressed by prettier The `markdownlint-cli2` executable provides linting (`npm run lint:markdown`) and the `markdownlint-cli2-fix` executable fixes problems (_that it can_ fix -- like `eslint --fix`) via `npm run format`. `npm run format` runs both `prettier` and `markdownlint-cli2-fix`. fix: modified Hugo config to allow raw HTML (in some circumstances), which was previously broken. note that there seems to be a bug in Hugo where raw html will render only on first build of a development server. subsequent builds will strip the html. * chore: lint all markdown * chore: try to fix netlify previews * Adding BUILD_ID to be used when running in Netlify * lint and format YAML, TOML, JS (#93) * chore: configure linting/formatting for YAML, TOML, JS, MD This PR adds ESLint support for YAML and TOML files in addition to formatting via Prettier. - Most rules *other than the spell checker) are kept closely to the defaults; other stuff is generally for compatibility. - This PR replaces the `markdownlint-cli2` tool with an ESLint plugin. - All YAML, TOML, Markdown and JS files are formatted automatically upon commit via `husky` - In addition, fixed an issue where `README.md` also gets formatted in the `lint:markdown` task. - Does _not_ format or lint HTML files, as the template engine we're using requires further plugins/configuration which I haven't investigated. I'm pretty sure this is possible if we treat the `.html` files as Handlebars templates, though. - I have changed the ESLint configuration to use semicolons and two-character spacing since Bromann can’t argue with me about it. * chore: lint everything * Running actions for all branches * Fixing syntax error * Update package.json Co-authored-by: Diego Molina <[email protected]> Co-authored-by: Diego Molina <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Dec 18, 2021
* chore: add automatic markdown linting and formatting several things make this happen: - `husky` for installing pre-commit hooks - `lint-staged` for performing operations on _only staged files_; run as pre-commit hook - `prettier` for formatting the markdown sensibly - `markdownlint-cli2` for other concerns not addressed by prettier The `markdownlint-cli2` executable provides linting (`npm run lint:markdown`) and the `markdownlint-cli2-fix` executable fixes problems (_that it can_ fix -- like `eslint --fix`) via `npm run format`. `npm run format` runs both `prettier` and `markdownlint-cli2-fix`. fix: modified Hugo config to allow raw HTML (in some circumstances), which was previously broken. note that there seems to be a bug in Hugo where raw html will render only on first build of a development server. subsequent builds will strip the html. * chore: lint all markdown * chore: try to fix netlify previews * Adding BUILD_ID to be used when running in Netlify * lint and format YAML, TOML, JS (#93) * chore: configure linting/formatting for YAML, TOML, JS, MD This PR adds ESLint support for YAML and TOML files in addition to formatting via Prettier. - Most rules *other than the spell checker) are kept closely to the defaults; other stuff is generally for compatibility. - This PR replaces the `markdownlint-cli2` tool with an ESLint plugin. - All YAML, TOML, Markdown and JS files are formatted automatically upon commit via `husky` - In addition, fixed an issue where `README.md` also gets formatted in the `lint:markdown` task. - Does _not_ format or lint HTML files, as the template engine we're using requires further plugins/configuration which I haven't investigated. I'm pretty sure this is possible if we treat the `.html` files as Handlebars templates, though. - I have changed the ESLint configuration to use semicolons and two-character spacing since Bromann can’t argue with me about it. * chore: lint everything * Running actions for all branches * Fixing syntax error * Update package.json Co-authored-by: Diego Molina <[email protected]> Co-authored-by: Diego Molina <[email protected]> db7ef67
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.
This PR adds ESLint support for YAML and TOML files in addition to formatting via Prettier.
markdownlint-cli2tool with an ESLint plugin.huskyREADME.mdalso gets formatted in thelint:markdowntask..htmlfiles as Handlebars templates, though.