-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create Block: Fix errors reported by CSS linter in ESNext template #23188
Conversation
Size Change: 0 B Total Size: 1.13 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some tests to make sure that future changes to scripts/ESLint plugin can be detected earlier?
You are reading my mind, I'm refactoring Create Block to make installation of npm i
npx wp-create-block esnext-test --no-wp-scripts
cd esnext-test
../node_modules/.bin/wp-scripts format-js
../node_modules/.bin/wp-scripts lint-js
../node_modules/.bin/wp-scripts lint-css
../node_modules/.bin/wp-scripts build I'm proposing the usage of the Gutenberg local packages here to ensure that scaffolded block works with the recent version of all WordPress packages, not the one published to npm Yet another step to ensure everything works as intended would be to scaffold the block and run e2e test that inserts it into the editor. |
Now, I have #23195 opened which proposes integration testing. I still want to find a way to run it standalone in the local environment. |
Description
When running the command for linting CSS in the scaffolded block I see the following errors reported:
This PR fixes those issues by using hex values.
How has this been tested?
$ npx wp-create-block my-test-block $ cd my-test-block $ npm run lint:css
Follow-up task
We really need some CI integration that would ensure that those scripts in scaffolded blocks pass :)