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

ci: Add check to run ESLint on PRs/commits #715

Merged
merged 3 commits into from
Jun 4, 2022
Merged

Conversation

delucis
Copy link
Member

@delucis delucis commented Jun 3, 2022

What kind of changes does this PR include?

  • Minor content fixes (broken links, typos, etc.)
  • New or updated content
  • Translated content
  • Changes to the docs site code
  • Something else!

Description

#710 added a script to allow linting .astro and .js/.ts files. Ideally we should keep on top of any lint errors before they proliferate, so this PR adds a job to our CI workflow to run the new pnpm run lint:eslint command for PRs/commits.

This could introduce a little extra friction to PRs if people need to fix lint errors before merging, but we’ve only enabled a fairly relaxed set of linter rules. You can see these rules here: https://eslint.org/docs/rules/ (marked with ✓). As this and the Astro-ESLint parser is new we may need to tweak the rules as we go, but my idea is that we can try and come up with a best practice config for others to use by dogfooding this. This also doesn’t impact Markdown files, so I don’t think we’re introducing extra friction for content authors, it’s more for layout, component, and other infrastructure code.

(You can see the new CI check running in the checks on this PR.)

Sorry, something went wrong.

@netlify
Copy link

netlify bot commented Jun 3, 2022

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit a854038
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/629b2e9dcbce5b0008530b42
😎 Deploy Preview https://deploy-preview-715--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sarah11918 sarah11918 added the site improvement Some thing that improves the website functionality - ask @delucis for help! label Jun 4, 2022
@sarah11918
Copy link
Member

LGTM! Happy to be using @ota-meshi 's fantastic contribution! 🥳

@delucis delucis merged commit 89c7b77 into main Jun 4, 2022
@delucis delucis deleted the delucis/eslint-ci branch June 4, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site improvement Some thing that improves the website functionality - ask @delucis for help!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants