Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed May 7, 2024
1 parent 6279218 commit 8f3eac3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ module.exports = defineConfig({
'no-console': ['error'],
},
},
{
files: ['packages/vite/src/client/**'],
excludedFiles: '**/__tests__/**',
rules: {
'n/no-unsupported-features/node-builtins': 'off',
},
},
{
files: [
'packages/vite/src/types/**',
Expand Down Expand Up @@ -219,6 +226,9 @@ module.exports = defineConfig({
'error',
{
version: pkg.engines.node,
// ideally we would like to allow all experimental features
// https://github.com/eslint-community/eslint-plugin-n/issues/199
ignores: ['fetch'],
},
],
},
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/plugins/wasm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const wasmHelper = async (opts = {}, url: string) => {
// correct MIME type for .wasm files, which unfortunately doesn't work for
// a lot of static file servers, so we just work around it by getting the
// raw buffer.
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- this function runs in browsers
const response = await fetch(url)
const contentType = response.headers.get('Content-Type') || ''
if (
Expand Down

0 comments on commit 8f3eac3

Please sign in to comment.