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

tools: remove fixer for non-ascii-character ESLint custom rule #38413

Merged
merged 1 commit into from Apr 28, 2021

Conversation

Trott
Copy link
Member

@Trott Trott commented Apr 26, 2021

The fixer for non-ascii-character does not typidally do the right thing. It
removes the entire node, not the offending character. I discovered this
when it removed the entire contents of a file and I wasn't sure which
auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

@github-actions github-actions bot added needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. labels Apr 26, 2021
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: nodejs#38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Member Author

Trott commented Apr 28, 2021

Landed in 896e5af

@Trott Trott merged commit 896e5af into nodejs:master Apr 28, 2021
@Trott Trott deleted the non-ascii branch April 28, 2021 17:36
targos pushed a commit that referenced this pull request Apr 29, 2021
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: #38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos mentioned this pull request May 3, 2021
targos pushed a commit that referenced this pull request May 30, 2021
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: #38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: #38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: #38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 11, 2021
The fixer for non-ascii-character does not typidally do the right thing.
It removes the entire node, not the offending character. I discovered
this when it removed the entire contents of a file and I wasn't sure
which auto-fix rule was doing it.

This commit adds a minimal test for the rule. The tests require that
auto-fix results be supplied, so if someone wants to re-add auto-fixing
to the rule, we'll have tests that it does the right thing.

PR-URL: #38413
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants