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

166
Views
Disable all eslint rules from a plugin for a file

I have two files which are siblings.

  • index.js
  • index.test.js

First is for source, second is the unit tests for first file.

I have a lot of eslint rules to check my sources. And I use some plugins to enhance thoses checks. Especially security-plugin.

It makes sense to check security into source code, but i don't mind for tests files. How can i disable into tests files only security rules?

I already have tried those but it's not working:

/* eslint-disable security */
/* eslint-disable security/* */

Any idea is welcomed. I just want to keep source and test files as siblings

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

0

Have a found a trick. I just run eslint twice. One time for "normal" sources with tests excluded, and a second time with another configuration file without security plugin declared inside only for tests. Not the smartest way but does the job.

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!