Skip to content

Commit 140c7bf

Browse files
fix(eslint-config-next): Add missing Node globals (#282)
2 parents 56bd592 + 58073a3 commit 140c7bf

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

.changeset/deep-snakes-win.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tcd-devkit/eslint-config-next': patch
3+
---
4+
5+
Add missing Node globals

packages/eslint/eslint-config-next/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"lint:types": "tcd-scripts lint --only=tsc"
6565
},
6666
"dependencies": {
67-
"@next/eslint-plugin-next": "16.0.1"
67+
"@next/eslint-plugin-next": "16.0.1",
68+
"globals": "16.5.0"
6869
},
6970
"devDependencies": {
7071
"@tcd-devkit/internal-utils": "workspace:*",

packages/eslint/eslint-config-next/src/next.linter.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import eslintPluginNext from '@next/eslint-plugin-next';
22
import { defineConfig } from 'eslint/config';
3+
import globals from 'globals';
34

45
const nextCoreWebVitals = eslintPluginNext.configs['core-web-vitals'];
56

67
export const nextConfig = defineConfig({
78
name: '@tcd-devkit/eslint-config-next',
9+
languageOptions: {
10+
globals: {
11+
...globals.node,
12+
},
13+
},
814
extends: [nextCoreWebVitals],
915
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs}'],
1016
});

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)