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

112
Views
How to run eslint rules on just typescript files?

I have a codebase with lots of .js and .ts/.tsx files. I want to run some rules on the whole codebase and some rules just on typescript files.

How can I achieve this in the best possible way?

specifically I want the rule: "react/prop-types": "error", to only run on .ts files

but it only gives one option of error, so not sure how to say just .ts for this?

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

0

you can use an overrides option in your .eslintrc file:

{
  rules: {
    // all your general rules that apply to everyone
  },
  overrides: {
    files: ['*.ts', '*.tsx'],
    rules: {
      // rules you want for ts/tsx files
      react/prop-types: 'error',
    },
  },
}
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!