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
Breaking: lint overrides
files (fixes #10828, refs eslint/rfcs#20)
#12677
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysticatea
added
enhancement
This change enhances an existing feature of ESLint
core
Relates to ESLint's core APIs and features
accepted
There is consensus among the team that this change meets the criteria for inclusion
breaking
This change is backwards-incompatible
do not merge
This pull request should not be merged yet
labels
Dec 17, 2019
# Conflicts: # lib/cli-engine/file-enumerator.js # tests/lib/_utils.js
See also: #12700 (comment)
kaicataldo
approved these changes
Jan 17, 2020
btmills
approved these changes
Jan 17, 2020
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. There's a lot to this - nice work!
montmanu
pushed a commit
to montmanu/eslint
that referenced
this pull request
Mar 4, 2020
…s#20) (eslint#12677) * Breaking: lint `overrides` files (fixes eslint#10828, refs eslint/rfcs#20) * update docs * sort for tests See also: eslint#12700 (comment)
btmills
added a commit
that referenced
this pull request
Apr 12, 2020
PR #12677, `Breaking: lint overrides files`, removed the default `.js` value from the default CLIEngine options. However, it did not remove the same default value from the `--ext` option parsed by Optionator. Because of this, when running `eslint .` without the `--ext` option, Optionator would insert a default `--ext .js` value that would be passed on to the CLIEngine. ESLint only lints `overrides` files if the `--ext` CLI option is not passed, so the default `--ext .js` option prevented ESLint from ever reaching the `overrides` file path checking flow. but the `--ext` option's default `.js` value in Optionator remained, so when running `eslint .` without passing the `--ext` option,
btmills
added a commit
that referenced
this pull request
Apr 12, 2020
PR #12677, `Breaking: lint overrides files`, removed the default `.js` value from the default CLIEngine options. However, it did not remove the same default value from the `--ext` option parsed by Optionator. Because of this, when running `eslint .` without the `--ext` option, Optionator would insert a default `--ext .js` value that would be passed on to the CLIEngine. ESLint only lints `overrides` files if the `--ext` CLI option is not passed, so the default `--ext .js` option prevented ESLint from ever reaching the `overrides` file path checking flow.
btmills
added a commit
that referenced
this pull request
Apr 12, 2020
PR #12677, `Breaking: lint overrides files`, removed the default `.js` value from the default CLIEngine options. However, it did not remove the same default value from the `--ext` option parsed by Optionator. Because of this, when running `eslint .` without the `--ext` option, Optionator would insert a default `--ext .js` value that would be passed on to the CLIEngine. ESLint only lints `overrides` files if the `--ext` CLI option is not passed, so the default `--ext .js` option prevented ESLint from ever reaching the `overrides` file path checking flow.
2 tasks
btmills
added a commit
that referenced
this pull request
Apr 14, 2020
PR #12677, `Breaking: lint overrides files`, removed the default `.js` value from the default CLIEngine options. However, it did not remove the same default value from the `--ext` option parsed by Optionator. Because of this, when running `eslint .` without the `--ext` option, Optionator would insert a default `--ext .js` value that would be passed on to the CLIEngine. ESLint only lints `overrides` files if the `--ext` CLI option is not passed, so the default `--ext .js` option prevented ESLint from ever reaching the `overrides` file path checking flow.
kaicataldo
pushed a commit
that referenced
this pull request
Apr 23, 2020
PR #12677, `Breaking: lint overrides files`, removed the default `.js` value from the default CLIEngine options. However, it did not remove the same default value from the `--ext` option parsed by Optionator. Because of this, when running `eslint .` without the `--ext` option, Optionator would insert a default `--ext .js` value that would be passed on to the CLIEngine. ESLint only lints `overrides` files if the `--ext` CLI option is not passed, so the default `--ext .js` option prevented ESLint from ever reaching the `overrides` file path checking flow.
papandreou
added a commit
to unexpectedjs/unexpected
that referenced
this pull request
May 9, 2020
Made possible by eslint 7.0.0 because of eslint/eslint#12677
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Jul 17, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
breaking
This change is backwards-incompatible
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request? (put an "X" next to item)
[X] Add something to the core
What changes did you make? (Give an overview)
This PR implements RFC20 then fixes #10828. If
overrides[].files
property matches, ESLint lints other files than JS even if--ext
option is not present.Main logics are:
ConfigArray#isAdditionalTargetPath(filePath)
... checks if a file path is matched with anyoverrides
entry.FileEnumerator#isTargetPath(filePath)
... checks if a file path is a lint target.Is there anything you'd like reviewers to focus on?
Nothing in particular.