Skip to content

Commit 126c7f6

Browse files
committed
Node globals added to eslint config
1 parent 0952769 commit 126c7f6

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

eslint.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
const { configs } = require('@eslint/js');
22
const jest = require('eslint-plugin-jest');
3-
4-
let _test = 0;
3+
const globals = require('globals');
54

65
module.exports = [
76
configs.recommended,
87
{
98
languageOptions: {
109
ecmaVersion: 2018,
1110
sourceType: 'commonjs',
12-
globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' }
11+
globals: { ...globals.node, Atomics: 'readonly', SharedArrayBuffer: 'readonly' }
1312
},
1413
rules: {
1514
semi: 'error',

package-lock.json

Lines changed: 26 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@eslint/js": "^9.8.0",
3838
"eslint": "^9.8.0",
3939
"eslint-plugin-jest": "^28.7.0",
40+
"globals": "^15.9.0",
4041
"jest": "^29.7.0",
4142
"mongodb-memory-server": "^10.0.0",
4243
"supertest": "^7.0.0"

0 commit comments

Comments
 (0)