elicwhite / ESLint-Formatter

Sublime Text 3 Plugin to Autoformat with Eslint
MIT License
139 stars 20 forks source link

How to set NODE_ENV or BABEL_ENV in formatter config #75

Open anotheri opened 4 years ago

anotheri commented 4 years ago

Hey there!

I'm using babel module resolver and getting this error:

Error: [eslint-import-resolver-babel-module] Error: [BABEL] 
Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables. Valid values are "development", "test", and "production". Instead, received: undefined. (While processing: "node_modules/babel-preset-react-app/index.js")
    at module.exports (node_modules/babel-preset-react-app/create.js:33:11)
    at module.exports (node_modules/babel-preset-react-app/index.js:19:10)
    at node_modules/@babel/core/lib/config/full.js:165:14
    at cachedFunction (node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (node_modules/@babel/core/lib/config/full.js:235:63)

How can I define env vars in eslint-formatter config? Thanks in advance.