Skip to content

Conversation

@JonathanMatthey
Copy link

Changes proposed in this pull request

  • Added ESLint dependencies (eslint, @typescript-eslint/*, eslint-plugin-astro, astro-eslint-parser)
  • Created .eslintrc.cjs with TypeScript and Astro support
  • Added scripts: lint, lint:fix, format
  • Created .eslintignore to exclude build artifacts and dependencies
  • Updated README with formatting setup and usage instructions
  • Added/updated PR template with formatting checklist
  • Added CI workflow to enforce ESLint checks on PRs

Context

DOCS-29: Add and enforce code formatting across the docs repos

@netlify
Copy link

netlify bot commented Nov 17, 2025

Deploy Preview for styleguide-preview ready!

Name Link
🔨 Latest commit e57aafc
🔍 Latest deploy log https://app.netlify.com/projects/styleguide-preview/deploys/6924e683a1c48c0008f873ed
😎 Deploy Preview https://deploy-preview-99--styleguide-preview.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 project configuration.

@JonathanMatthey JonathanMatthey force-pushed the jm/eslint-formatting branch 3 times, most recently from 93110b3 to 7b8aefa Compare November 20, 2025 18:55
Copy link
Contributor

@Anca2022 Anca2022 left a comment

Choose a reason for hiding this comment

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

Consistency changes

- Add ESLint 9 and Prettier for consistent code formatting across docs repos
- Configure ESLint with TypeScript and Astro support
- Standardize lint and format commands across all repositories
- Upgrade to ESLint 9 flat config format (eslint.config.js)
- Update all ESLint and Prettier packages to latest versions
- Add CI checks to enforce formatting standards
@JonathanMatthey
Copy link
Author

JonathanMatthey commented Nov 24, 2025

mdx files that go into starlight cant be linted / formatted with the plugins, so for now they're ignored. astro files are lint/formatted

MDX files contain Starlight-specific constructs that aren't valid plain MDX: things like <$> wrappers, inline HTML comments inside components, raw JSON blocks, and JavaScript arrays declared at the top of an .mdx file. Prettier's MDX parser (even with prettier-plugin-astro) doesn't understand those patterns, so it throws syntax errors instead of formatting them. That causes pnpm lint to fail before ESLint even runs.

@JonathanMatthey JonathanMatthey deleted the jm/eslint-formatting branch November 28, 2025 20:12
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