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

Scripts: Added temporary workaround for the default config used with lint-js command #17744

Merged
merged 1 commit into from Oct 3, 2019

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Oct 3, 2019

Description

Related issue: #17061.

This PR adds a temporary workaround for the default config used with lint-js command. It uses linting rules for both e2e and unit tests with all files until override files globbing logic is fixed when using eslint with --config (related issue).

Testing

I tested it with https://github.com/WordPress/gutenberg-examples. It's not that simple but this is what I did:

  1. I removed this line:
    https://github.com/WordPress/gutenberg-examples/blob/fe9c5e5bd2657a8d1fff0eedef398c6f5a2dd1d9/test/examples.js#L1
  2. I copied the content of https://github.com/WordPress/gutenberg/blob/4847c5a717b2734959a41bed769a1ce4cd795aec/packages/scripts/config/.eslintrc.js to node_modules/@wordpress/scripts/config/.eslintrc.js.
  3. I executed npm run lint-js to confirm it no longer reports errors.

@gziolo gziolo added the [Type] Bug An existing feature does not function as intended label Oct 3, 2019
@gziolo gziolo self-assigned this Oct 3, 2019
@gziolo gziolo added the [Package] Scripts /packages/scripts label Oct 3, 2019
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM 👍

@gziolo gziolo merged commit 9494c17 into master Oct 3, 2019
@gziolo gziolo deleted the update/scripts-lint-js branch October 3, 2019 11:11
@gziolo
Copy link
Member Author

gziolo commented Oct 3, 2019

@youknowriad - can we include it in the next npm release, please? :)

@youknowriad
Copy link
Contributor

Sure 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants