Skip to content

Commit

Permalink
feat: only support globals shared between node and browsers by default
Browse files Browse the repository at this point in the history
BREAKING CHANGE: By default, only globals shared between Node.js and
browsers are enabled (except in Jest tests). To support Node.js globals
everywhere as before, add `env: { node: true }` to your config.
  • Loading branch information
targos committed Oct 12, 2021
1 parent f9c4a93 commit 79581cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
env: {
es6: true,
es2021: true,
node: true,
'shared-node-browser': true,
},
parserOptions: {
ecmaVersion: '2021',
Expand All @@ -17,6 +17,7 @@ module.exports = {
files: ['**/__tests__/**/*.{js,jsx,ts,tsx}', '*.test.{js,jsx,ts,tsx}'],
env: {
jest: true,
node: true,
},
rules: {
// Jest plugin (https://github.com/jest-community/eslint-plugin-jest)
Expand Down

0 comments on commit 79581cd

Please sign in to comment.