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

Temporarily disable the unicorn/string-content rule #462

Merged
merged 3 commits into from Apr 12, 2020
Merged

Temporarily disable the unicorn/string-content rule #462

merged 3 commits into from Apr 12, 2020

Conversation

fregante
Copy link
Member

@fregante fregante commented Apr 11, 2020

Not all strings are user-facing so a blanket "replace all ... with …" can break all non-tagged strings.

As reported in #439 (comment)

@fregante
Copy link
Member Author

fregante commented Apr 11, 2020

Actually I don't think this can be enabled in XO at all and sindresorhus/eslint-plugin-unicorn#681 (whitelisting) would be a better user-facing solution.

Maaaaybe via whitelist XO could include a configuration for "definitely user-facing" strings like:

  • JSX’s title attribute and strings
  • HTMLElement#textContent
  • any common i18n pattern

@sindresorhus
Copy link
Member

I don't think this PR is needed as we changed the rule to include no patterns by default: sindresorhus/eslint-plugin-unicorn@08fad55

@fregante
Copy link
Member Author

fregante commented Apr 12, 2020

Uhm? Yeah, that’s the rule itself, but XO does configure the rule right here

@sindresorhus
Copy link
Member

I was confused which repo I was on.

@sindresorhus
Copy link
Member

Can you comment it out instead of removing it completely?

@sindresorhus sindresorhus changed the title Temporarily disable dangerous unicorn/string-content Temporarily disable the unicorn/string-content rule Apr 12, 2020
@sindresorhus sindresorhus merged commit 967927d into xojs:master Apr 12, 2020
@fregante fregante deleted the patch-1 branch April 12, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants