Closed quinnbaetz closed 3 years ago
Hi @quinnbaetz, can you provide a bit more detail on what ENV vars in your environment need to be available to the plugin and why? I'm not very familiar with the eslint-plugin-react-native
plugin, so I'm not clear on what env it's using for this.
It "whitelists all browser-like globals". Currently I would use it for fetch
and require
. I have added those to globals directly, but the above should still work.
Any luck with this one?
HI @quinnbaetz - apologies for dropping this!
I'm still getting this issue:
/usr/src/app/lib/validate_config.js:17
throw e;
^
Error: /code/.eslintrc:
Environment key "react-native/react-native" is unknown
at Object.keys.forEach.env (/usr/local/node_modules/eslint/lib/config/config-validator.js:138:23)
at Array.forEach (native)
at validateEnvironment (/usr/local/node_modules/eslint/lib/config/config-validator.js:131:34)
at Object.validate (/usr/local/node_modules/eslint/lib/config/config-validator.js:160:5)
at Object.load (/usr/local/node_modules/eslint/lib/config/config-file.js:559:19)
at loadConfig (/usr/local/node_modules/eslint/lib/config.js:63:33)
at getLocalConfig (/usr/local/node_modules/eslint/lib/config.js:130:29)
at Config.getConfig (/usr/local/node_modules/eslint/lib/config.js:260:26)
at Config.getConfig (/usr/src/app/lib/eslint-patch.js:45:46)
at CLIEngine.getConfigForFile (/usr/local/node_modules/eslint/lib/cli-engine.js:776:29)
Bug Template
Actual Behavior
/usr/src/app/lib/validate_config.js:17 throw e; ^
Error: /code/.eslintrc.js: Environment key "react-native/react-native" is unknown
Expected Behavior
The engine should support plugins allowing global variables through the env.
Steps to reproduce
Add the following to .eslintrc.js
Relevant links
https://www.npmjs.com/package/eslint-plugin-react-native