-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
WP-Scripts Ignores Root Stylelint Configuration on Build & Start #15056
Comments
Can you explain what do you exactly expect to happen when you run |
Expecting When running One could get zero errors on linting commands but errors on |
Do you import |
I see this separate from #14847 or #14801. WP-Scripts should follow standard of using ESlint or Stylelint in root folder regardless of SCSS or CSS. One may want to add additional rules or ignore rules in their wp-scripts config. But for SCSS I'm importing I do not see a way to modify the Webpack to use my Stylelint or ESlint configuration on |
@isvictorious - can you share your code. I admit that I don't understand what do you expect from the build script. At the moment it's role is limited to building the production version of JavaScript code from the provided source file. I don't quite understand what role ESLint of Stylelint would play here? Can't you pipe those commands instead: |
Code is here: https://github.com/isvictorious/demo-video-block Clarifying: When you run This means Screenshot: Result when I run Screenshot: Result when I run I'm expecting that the entire configuration regardless of commands should respect the root stylelint or ESlint configuration. This is a standard according to stylelint / ESlint docs. |
I don't think the issue comes from the linter. I don't see it integrated in the webpack config shared: |
The issue is with WP-Scripts configuration in the The
It is incorrect for |
To make it clear. If you feel like this should be included in I'm closing this issue as there is nothing to fix on Gutenberg's side. |
Describe the bug
I am attempting an advanced configuration of @wordpress/scripts
Override instructions for stylelint and eslint in @wordpress/scripts are to follow stylelint & eslint handbooks. Both state that root configurations should be used.
When running
wp-scripts lint-style
orwp-scripts lint-js
it works as expected using root configuration.When running
wp-scripts build
it is referencing default configurationsTo reproduce
Steps to reproduce the behavior:
Expected behavior
Expecting root linting configurations to take precedent on
build
andstart
The text was updated successfully, but these errors were encountered: