Creating different eslint rules for local development

0 votes

I am developing some code and want to figure out what's going wrong, so I have

function foo() {
    console.log("Look its 2016 and I'm still printf debugging");
}

Except, our build process runs esLint as part of the build system and by-design prevents even running the rest of the build pipeline if esLint fails. error Unexpected console statement no-console

What I effectively want is to set up a dev environment where certain rules are turned off (or converted to warnings), and then a production environment with the strict rules turned on. And I want to be able to easily toggle that locally so I can verify my code works before submitting it to a CI server.

Jul 10, 2018 in DevOps Tools by Nilesh
• 7,060 points
817 views

1 answer to this question.

0 votes
You can make a dev.eslintrc or similar and have that extend the main .eslintrc. And then I can use command line args to switch between the two rulesets as needed. Or use pre-commit hook where your code gets checked before any commit happens. You can always disable any rule you want using a comment if local or using .eslintrc file.
answered Jul 10, 2018 by Kalgi
• 2,680 points

Related Questions In DevOps Tools

0 votes
0 answers

What strategies do you use for secrets management across different environments in DevOps workflows?

What strategies do you use for secrets ...READ MORE

1 day ago in DevOps Tools by Anila
• 1,320 points
16 views
0 votes
1 answer

Any rate limiter for kitura

Try using KituraLimiter as a rate limiting ...READ MORE

answered Jun 4, 2018 in DevOps Tools by DareDev
• 6,890 points
634 views
0 votes
1 answer

dpkg a deb file in a local fodler on vagrant

Copy the file in the vagrant folder ...READ MORE

answered Jun 14, 2018 in DevOps Tools by DareDev
• 6,890 points
637 views
0 votes
1 answer

For Gradle & Spring Boot, how do I choose dependency with implementation?

Below is the answer to your question: Both ...READ MORE

answered Jun 17, 2018 in DevOps Tools by shubham
• 7,340 points
758 views
0 votes
1 answer
+1 vote
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,987 views
0 votes
1 answer

Using 'salt.module.tomcat' for deploying war file

tomcat.deploy_war is an execution module, not a state module. In ...READ MORE

answered Jul 11, 2018 in DevOps Tools by Kalgi
• 2,680 points
745 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP