Skip to content

Commit a946a01

Browse files
committed
chore(linting): add node globals
1 parent 672fb00 commit a946a01

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

eslint.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import eslintPluginJs from '@eslint/js'
2+
import globals from 'globals'
23
import eslintTypescript from 'typescript-eslint'
34

45
export default eslintTypescript.config(
56
{
67
languageOptions: {
8+
globals: { ...globals.node },
79
parser: eslintTypescript.parser,
810
ecmaVersion: 2018,
911
sourceType: 'module',
@@ -12,9 +14,9 @@ export default eslintTypescript.config(
1214
},
1315
eslintPluginJs.configs.recommended,
1416
eslintTypescript.configs.recommended,
15-
{ rules: { 'newline-before-return': 'error' } },
1617
{
1718
rules: {
19+
'newline-before-return': 'error',
1820
'@typescript-eslint/no-unused-vars': [
1921
'error',
2022
{ argsIgnorePattern: '^_' }

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@types/validator": "^13.12.2",
4646
"eslint": "^9.20.1",
4747
"eslint-formatter-mo": "^2.2.0",
48+
"globals": "^15.15.0",
4849
"husky": "^9.1.7",
4950
"jiti": "^2.4.2",
5051
"lint-staged": "^15.4.3",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,6 +2166,11 @@ globals@^14.0.0:
21662166
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
21672167
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
21682168

2169+
globals@^15.15.0:
2170+
version "15.15.0"
2171+
resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8"
2172+
integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==
2173+
21692174
google-auth-library@^9.15.1:
21702175
version "9.15.1"
21712176
resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-9.15.1.tgz#0c5d84ed1890b2375f1cd74f03ac7b806b392928"

0 commit comments

Comments
 (0)