Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

259
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda