Skip to content

Conversation

@boneskull
Copy link
Contributor

@boneskull boneskull commented Dec 13, 2021

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.

@boneskull
Copy link
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.
@boneskull boneskull force-pushed the boneskull/yaml-check branch from fc5f590 to 37654c0 Compare December 13, 2021 23:08
@boneskull boneskull requested a review from diemol December 13, 2021 23:09
@boneskull boneskull self-assigned this Dec 13, 2021
@diemol diemol changed the base branch from boneskull/markdown-lint to dev December 18, 2021 00:41
@diemol diemol changed the base branch from dev to boneskull/markdown-lint December 18, 2021 00:42
Copy link
Member

@diemol diemol left a 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 diemol merged commit 78e6242 into boneskull/markdown-lint Dec 18, 2021
@diemol diemol deleted the boneskull/yaml-check branch December 18, 2021 00:52
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants