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
• 6,880 points
41 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,620 points

Related Questions In DevOps Tools

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,810 points
34 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,810 points
45 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 16, 2018 in DevOps Tools by shubham
• 6,890 points
63 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
145 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,620 points
78 views