Start here
The safe first move
Move env settings to languageOptions.globals using the globals package, and move globals directly into languageOptions.globals.
Stop before automation when: Dynamic env selection based on file patterns. Overlapping globals from multiple sources.
Target shape
const globals = require("globals");
module.exports = [{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
myGlobal: "readonly",
},
},
}];