-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
feat: add skipJSXText
option to no-irregular-whitespace
rule
#17182
Conversation
✅ Deploy Preview for docs-eslint canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @azat-io, thanks for the suggestion. Please follow the pull request template in the description providing more info for the reviewers. Thanks.
@Rec0iL99 Done ✅ |
@azat-io can you also copy & paste this template into the original post and fill it out? |
@mdjermanovic Done ✅ |
Thanks for the input! Given that this rule already has an option to ignore strings, I think it makes sense to add an option to ignore JSX text too, so I support this proposal 👍 Let's hear what other team members think about the proposal before reviewing the code. |
Any feedback? |
Ping |
@azat-io some of our team members are unavailable at the moment. Please be patient as we might experience some delays in the review process. |
I'm support this change. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would like another team member to verify before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, I left suggestions about the docs and tests.
@mdjermanovic Done ✅ Strange, |
@azat-io looks like your package manager doesn't work with |
877ad2d
to
b1f0db4
Compare
@mdjermanovic Rebased ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.42.0` -> `8.43.0`](https://renovatebot.com/diffs/npm/eslint/8.42.0/8.43.0) | --- ### Release Notes <details> <summary>eslint/eslint (eslint)</summary> ### [`v8.43.0`](https://github.com/eslint/eslint/releases/tag/v8.43.0) [Compare Source](eslint/eslint@v8.42.0...v8.43.0) #### Features - [`14581ff`](eslint/eslint@14581ff) feat: directive prologue detection and autofix condition in `quotes` ([#​17284](eslint/eslint#17284)) (Francesco Trotta) - [`e50fac3`](eslint/eslint@e50fac3) feat: add declaration loc to message in block-scoped-var ([#​17252](eslint/eslint#17252)) (Milos Djermanovic) - [`1b7faf0`](eslint/eslint@1b7faf0) feat: add `skipJSXText` option to `no-irregular-whitespace` rule ([#​17182](eslint/eslint#17182)) (Azat S) #### Bug Fixes - [`5338b56`](eslint/eslint@5338b56) fix: normalize `cwd` passed to `ESLint`/`FlatESLint` constructor ([#​17277](eslint/eslint#17277)) (Milos Djermanovic) - [`54383e6`](eslint/eslint@54383e6) fix: Remove `no-extra-parens` autofix for potential directives ([#​17022](eslint/eslint#17022)) (Francesco Trotta) #### Documentation - [`8b855ea`](eslint/eslint@8b855ea) docs: resubmit pr17061 doc changes ([#​17292](eslint/eslint#17292)) (唯然) - [`372722e`](eslint/eslint@372722e) docs: resubmit pr17012 doc changes ([#​17293](eslint/eslint#17293)) (唯然) - [`67e7af3`](eslint/eslint@67e7af3) docs: resubmit custom-rules doc changes ([#​17294](eslint/eslint#17294)) (唯然) - [`9e3d77c`](eslint/eslint@9e3d77c) docs: Resubmit Fix formatting in Custom Rules docs ([#​17281](eslint/eslint#17281)) (Milos Djermanovic) - [`503647a`](eslint/eslint@503647a) docs: Resubmit markVariableAsUsed docs ([#​17280](eslint/eslint#17280)) (Nicholas C. Zakas) - [`e0cf0d8`](eslint/eslint@e0cf0d8) docs: Custom rule & plugin tutorial ([#​170...
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
What changes did you make? (Give an overview)
Currently you can use irregular whitespace with rule options in strings: https://eslint.org/docs/latest/rules/no-irregular-whitespace#options
Sometimes I use non-breaking spaces also in JSX text. It would be nice to have this option in
no-irregular-whitespace
rule.Is there anything you'd like reviewers to focus on?
Nope
What rule do you want to change?
no-irregular-whitespace
What change do you want to make (place an "X" next to just one item)?
None of this. I added one more option to rule.
How will the change be implemented (place an "X" next to just one item)?
Please provide some example code that this change will affect:
Currently I cannot do that:
What does the rule currently do for this code?
Currently, if I use non-breaking spaces in JSX text, I get the error.
What will the rule do after it's changed?
Added option to use irregular spaces in JSX text, similar to options for regular expressions and strings.