From 99261e27f749b05fb0877059ec5337dbece5e82b Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Thu, 20 Jun 2024 14:20:30 -0400 Subject: [PATCH] feat: add support for es2020 syntax in eslint (#153) --- .eslintrc.js | 1 + test.jsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 3a11915c..14967891 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,6 +21,7 @@ module.exports = { es6: true, browser: true, jest: true, + es2020: true, }, extends: [ // The airbnb config includes configuraton for import, react, and jsx-a11y. diff --git a/test.jsx b/test.jsx index 44d48fa3..46b7836b 100644 --- a/test.jsx +++ b/test.jsx @@ -24,3 +24,6 @@ class MethodDoesNotUseThis { // disable no-plusplus let i = 0; i++; + +// globalThis is allowed +const value = globalThis.localStorage.getItem('foo');