B
B
bormor2019-10-15 19:41:52
JavaScript
bormor, 2019-10-15 19:41:52

How to run eslint in the console so that the production rules work?

Some rules are disabled in development mode.

rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  },

How to run their check in console not me eslintrc?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2019-10-15
@bormor

https://www.npmjs.com/package/cross-env
cross-env NODE_ENV=production npm run lint

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question