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

Update ESLint config #1068

Merged
merged 7 commits into from
Apr 16, 2020
Merged

Update ESLint config #1068

merged 7 commits into from
Apr 16, 2020

Conversation

swissspidy
Copy link
Collaborator

@swissspidy swissspidy commented Apr 6, 2020

  • Use ESLint’s recommend ruleset
  • Make config more explicit
  • Do not blindly use @wordpress/eslint-plugin/recommended ESLint ruleset. Makes it easier to extract / split out later.
  • Update @wordpress/eslint-plugin
  • Use @wordpress/eslint-plugin/i18n ruleset and fix issues

- Use ESLint’s recommend ruleset
- Make config more explicit
- Do not blindly use wordpress/recommended ESLint ruleset. Makes it easier to extract / split out later.
@swissspidy swissspidy added the Type: Infrastructure Changes impacting testing infrastructure or build tooling label Apr 6, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2020

Size Change: -63 B (0%)

Total Size: 871 kB

Filename Size Change
assets/js/edit-story.js 445 kB -31 B (0%)
assets/js/stories-dashboard.js 420 kB -32 B (0%)
ℹ️ View Unchanged
Filename Size Change
assets/css/edit-story.css 3.04 kB 0 B
assets/css/stories-dashboard.css 3.01 kB 0 B

compressed-size-action

@swissspidy swissspidy marked this pull request as draft April 10, 2020 08:10
@swissspidy swissspidy changed the title [WIP] Update ESLint config Update ESLint config Apr 15, 2020
@swissspidy swissspidy marked this pull request as ready for review April 15, 2020 19:28
@@ -47,6 +47,7 @@ function EditElement({ element }) {
actions: { getBox },
} = useUnits();

//eslint-disable-next-line @wordpress/no-unused-vars-before-return
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering why doesn't it know about the usage? Does it not expand JSX before running these rules?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

WordPress/gutenberg#21358 has a pending fix with details.

@swissspidy swissspidy merged commit 8903326 into master Apr 16, 2020
@swissspidy swissspidy deleted the fix/wp-eslint-plugin-dep branch April 16, 2020 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Infrastructure Changes impacting testing infrastructure or build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants