10up / wp-scaffold

10up WordPress project scaffold.
MIT License
184 stars 46 forks source link

Feature/eslint config setup #206

Closed nicholasio closed 4 months ago

nicholasio commented 5 months ago

Description of the Change

This PR adds shared vscode configs a vscode user needs to get eslint formating on save working.

It also adds a .lintstagedrc file per theme/plugin so that on commit eslint runs relative to each workspace meaning eslint config can be customized on a workspace level and that's what lintstaged is going to use. Before we were always assuming the whole monorepo would use the same eslint config.

Closes https://github.com/10up/10up-toolkit/issues/324

How to test the Change

  1. Clone the repo
  2. npm install
  3. Open in vscode and ensure autoformating on save is working
  4. from root run npm run lint-js, npm run format-js, npm run lint-css.

Changelog Entry

Added - New feature Changed - Existing functionality Deprecated - Soon-to-be removed feature Removed - Feature Fixed - Bug fix Security - Vulnerability

Credits

Props @username, @username2, ...

Checklist: