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

Add ESLint config to docs/sources #1411

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Add ESLint config to docs/sources #1411

merged 4 commits into from
Nov 14, 2023

Conversation

oleiade
Copy link
Member

@oleiade oleiade commented Nov 14, 2023

What

This Pull Request reintroduces the Prettier and ESLint configurations previously utilized in our Gatsby-based documentation site.

It reinstates the effective workflow combining husky and lint-staged, specifically designed to ensure that JavaScript code blocks within markdown files adhere to our code quality standards.

Impact

Post-merge, any changes to the docs/sources folder will be automatically vetted.

Commits containing JavaScript code blocks that don't meet our Prettier and ESLint standards will be flagged, ensuring continuous adherence to our code quality benchmarks.

In this commit we add a rule to the lint-staged configuration file
at the root of the repository to ensure that all the markdown files
contained in the docs/sources folder are formatted using our prettier
config.

Although not absolutely necessary, we enforce prettier to use the
markdown parser, and have it write the result directly to staged files.
@oleiade oleiade self-assigned this Nov 14, 2023
Copy link
Member

@jdbaldry jdbaldry left a comment

Choose a reason for hiding this comment

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

Great! I'm all for consistent formatting :)

Is it really the case that there were no linting changes need in docs/sources already?

I didn't see any changes made in that directory in 29d2787.

@oleiade oleiade merged commit cba8df8 into main Nov 14, 2023
6 checks passed
@oleiade oleiade deleted the new-docs/prettier-eslint branch November 14, 2023 15:38
@oleiade
Copy link
Member Author

oleiade commented Nov 14, 2023

@jdbaldry I'm not sure about what has been made or not before, but considering we already had rules to maintain the formatting/linting prior to the switch, I would expect them to already be formatted 👍🏻

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.

None yet

3 participants