Bug: not all override patterns containing ".." should be rejected
See original GitHub issueEnvironment
Node version: 18.4.0 npm version: 8.12.1 Local ESLint version: 8.18.0
What parser are you using?
Default (Espree)
What did you do?
Configuration:
{
"overrides": [
{
"files": [
"A...Z.js"
]
}
]
}
What did you expect to happen?
I was expecting the config to be accepted.
What actually happened?
The configuration above results in an error:
Error: Invalid override pattern (expected relative path not containing '..'): A...Z.js
There is no reason to forbid override patterns containing two or more dots, unless when they refer to a parent directory, i.e. when they constitute a path segment, either found at the start or at the end of the pattern or surrounded by a path separator (/
or \
).
Not sure if this classifies as a bug or an improvement. If it’s too late to change the current behavior, it would be great to have this fixed in the new config system.
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Java static code analysis: "@Override" should be used on ...
Using the @Override annotation is useful for two reasons : It elicits a warning from the compiler if the annotated method doesn't actually...
Read more >Override abstract method error with extensions — oracle-tech
Hi everyone, I'm trying to work with a Tree and use some of the visitor pattern. However, I get an "is not abstract...
Read more >overriding - Problems with understanding how override method ...
I'm relatively new in c++ and I have problem with understanding If I have a method that should be overridden and requires no...
Read more >[Network Username Restrictions Override] Support
[Plugin: Network Username Restrictions Override] All usernames rejected with error "Username mu. Started by: Mohsin Rasool. 2; 4; 10 years, 4 months ago....
Read more >Cross-Site Request Forgery Prevention Cheat Sheet
For the Synchronised Token Pattern, CSRF tokens should not be transmitted using cookies. The CSRF token can be transmitted to the client as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the report. Indeed we can’t fix it in the current config system at this point. We can check similar behavior in the new config system when it’s finished.
This has already been solved for flat config. I’ll just add some tests to verify.