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

Chore: Update npm dependencies #113

Merged
merged 1 commit into from
Apr 16, 2020
Merged

Chore: Update npm dependencies #113

merged 1 commit into from
Apr 16, 2020

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Apr 16, 2020

The updated @wordpress/eslint-plugin throws errors on one of the introduced rules for i18n API. I had to disable this rule as follows:

wp-scripts lint-js --rule '@wordpress/i18n-text-domain: 0'

/cc @swissspidy

@gziolo gziolo force-pushed the update/npm-packages branch from a8e638d to 5196223 Compare April 16, 2020 07:49
@gziolo gziolo self-assigned this Apr 16, 2020
@gziolo gziolo added the dependencies Pull requests that update a dependency file label Apr 16, 2020
@gziolo gziolo merged commit c4d83b1 into master Apr 16, 2020
@gziolo gziolo deleted the update/npm-packages branch April 16, 2020 07:51
@swissspidy
Copy link
Member

@gziolo why disable?

The following rule should work just fine:

{
"@wordpress/i18n-text-domain": ["error", {
  "allowedTextDomain":  "gutenberg-examples"
}],
}

@gziolo
Copy link
Member Author

gziolo commented Apr 16, 2020

The challenge is that all projects will have to set it up manually. I'm afraid that it will discourage people from using the text domain because ESLint will tell them to remove it by default. Ideally, we should be able to scan the project and detect this domain based on the PHP entry point or block.json definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants