Skip to content

Commit 6cccef7

Browse files
chore(deps): update dependency eslint-plugin-n to v17 (#16381)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sapphi-red <[email protected]>
1 parent a77707d commit 6cccef7

File tree

9 files changed

+53
-35
lines changed

9 files changed

+53
-35
lines changed

.eslintrc.cjs

+20-13
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,8 @@ module.exports = defineConfig({
175175
'n/no-extraneous-require': 'off',
176176
'n/no-missing-import': 'off',
177177
'n/no-missing-require': 'off',
178-
// engine field doesn't exist in playgrounds
179-
'n/no-unsupported-features/es-builtins': [
180-
'error',
181-
{
182-
version: pkg.engines.node,
183-
},
184-
],
185-
'n/no-unsupported-features/node-builtins': [
186-
'error',
187-
{
188-
version: pkg.engines.node,
189-
},
190-
],
178+
'n/no-unsupported-features/es-builtins': 'off',
179+
'n/no-unsupported-features/node-builtins': 'off',
191180
'@typescript-eslint/explicit-module-boundary-types': 'off',
192181
},
193182
},
@@ -216,6 +205,24 @@ module.exports = defineConfig({
216205
'i/no-commonjs': 'error',
217206
},
218207
},
208+
{
209+
files: ['playground/**/__tests__/**'],
210+
rules: {
211+
// engine field doesn't exist in playgrounds
212+
'n/no-unsupported-features/es-builtins': [
213+
'error',
214+
{
215+
version: pkg.engines.node,
216+
},
217+
],
218+
'n/no-unsupported-features/node-builtins': [
219+
'error',
220+
{
221+
version: pkg.engines.node,
222+
},
223+
],
224+
},
225+
},
219226
{
220227
files: [
221228
'playground/tsconfig-json/**',

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"eslint": "^8.57.0",
6666
"eslint-define-config": "^2.1.0",
6767
"eslint-plugin-i": "^2.29.1",
68-
"eslint-plugin-n": "^16.6.2",
68+
"eslint-plugin-n": "^17.2.0",
6969
"eslint-plugin-regexp": "^2.5.0",
7070
"execa": "^8.0.1",
7171
"feed": "^4.2.2",

packages/vite/index.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ warnCjsUsage()
66
module.exports.defineConfig = (config) => config
77

88
// proxy cjs utils (sync functions)
9+
// eslint-disable-next-line n/no-missing-require -- will be generated by build
910
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
1011

1112
// async functions, can be redirect from ESM build

packages/vite/src/node/ssr/runtime/__tests__/fixtures/circular/circular-index.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ export { b } from './circular-b'
33

44
// since there is no .accept, it does full reload
55
import.meta.hot.on('vite:beforeFullReload', () => {
6-
// eslint-disable-next-line no-console
76
console.log('full reload')
87
})
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import { nonExisting } from '@vitejs/cjs-external'
22

3-
// eslint-disable-next-line no-console
43
console.log(nonExisting)
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import { nonExisting } from '@vitejs/esm-external'
22

3-
// eslint-disable-next-line no-console
43
console.log(nonExisting)

packages/vite/src/node/utils.ts

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ function testCaseInsensitiveFS() {
196196
}
197197

198198
export const urlCanParse =
199+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
199200
URL.canParse ??
200201
// URL.canParse is supported from Node.js 18.17.0+, 20.0.0+
201202
((path: string, base?: string | undefined): boolean => {

packages/vite/src/runtime/sourcemap/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export function enableSourceMapSupport(runtime: ViteRuntime): () => void {
88
`Cannot use "sourcemapInterceptor: 'node'" because global "process" variable is not available.`,
99
)
1010
}
11+
/* eslint-disable n/no-unsupported-features/node-builtins -- process.setSourceMapsEnabled and process.sourceMapsEnabled */
1112
if (typeof process.setSourceMapsEnabled !== 'function') {
1213
throw new TypeError(
1314
`Cannot use "sourcemapInterceptor: 'node'" because "process.setSourceMapsEnabled" function is not available. Please use Node >= 16.6.0.`,
@@ -16,6 +17,7 @@ export function enableSourceMapSupport(runtime: ViteRuntime): () => void {
1617
const isEnabledAlready = process.sourceMapsEnabled ?? false
1718
process.setSourceMapsEnabled(true)
1819
return () => !isEnabledAlready && process.setSourceMapsEnabled(false)
20+
/* eslint-enable n/no-unsupported-features/node-builtins */
1921
}
2022
return interceptStackTrace(
2123
runtime,

pnpm-lock.yaml

+28-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)