question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: not all override patterns containing ".." should be rejected

See original GitHub issue

Environment

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:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nzakascommented, Jul 1, 2022

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.

0reactions
nzakascommented, Nov 11, 2022

This has already been solved for flat config. I’ll just add some tests to verify.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found