From 91ddd2f9cb7ecb24dbab1166ec0472d6aa3d1b37 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 29 Jan 2021 17:40:51 +0000 Subject: [PATCH 1/3] fix: allow globalThis Setting the value to `false` means it is not writable --- js.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js.js b/js.js index cab7b5a..282f133 100644 --- a/js.js +++ b/js.js @@ -7,7 +7,8 @@ module.exports = { }, globals: { self: true, - mocha: true + mocha: true, + globalThis: false // means it is not writable }, plugins: [ 'no-only-tests', From 3e8a2cea3c977c5d72e1c2b255a6106fb0609ae6 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 29 Jan 2021 17:58:27 +0000 Subject: [PATCH 2/3] chore: mark readonly --- js.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js.js b/js.js index 282f133..34b55a4 100644 --- a/js.js +++ b/js.js @@ -6,9 +6,9 @@ module.exports = { sourceType: 'script' }, globals: { - self: true, - mocha: true, - globalThis: false // means it is not writable + self: 'writable', + mocha: 'writable', + globalThis: 'readonly' }, plugins: [ 'no-only-tests', From 741c4fbb0e6e320aeb0e2d8d082ae5b23c48b25b Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 29 Jan 2021 18:07:09 +0000 Subject: [PATCH 3/3] chore: replace globals with env presets --- js.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js.js b/js.js index 34b55a4..ae06b82 100644 --- a/js.js +++ b/js.js @@ -5,10 +5,10 @@ module.exports = { parserOptions: { sourceType: 'script' }, - globals: { - self: 'writable', - mocha: 'writable', - globalThis: 'readonly' + env: { + es2020: true, + browser: true, + node: true }, plugins: [ 'no-only-tests',