Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

256
Views
eslint-disable does not suppress errors for the unicorn/filename-case eslint rule

I have a file called

payment-shipping.tsx

and eslint is throwing an error

Filename is not in camel case. Rename it to `paymentShipping.tsx`  unicorn/filename-case

However, the file needs to be in kebab case since it's a next.js page that shows up in the URL.

Adding the following line to the top of said file:

// eslint-disable-next-line unicorn/filename-case

Does not suppress the error, it instead throws another error:

'unicorn/filename-case' rule is disabled but never reported        eslint-comments/no-unused-disable

How do I suppres the filename-case error?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use ignore option of that rule.

.eslintrc

...
rules: {
    ...
    "unicorn/filename-case": [
       "error",
       {
           "case": "kebabCase",
           "ignore": [
               /pages/.*\.js$/
           ]
       }
    ]
}
...
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!