diff --git a/Gruntfile.js b/Gruntfile.js index eba38704f3ee..626774843444 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -311,6 +311,7 @@ module.exports = function (grunt) { ]); registerTaskAndAddToHelp('serve', 'Serve out/ (without building anything)', ['run:serve']); + registerTaskAndAddToHelp('lint', 'Check lint and formatting', ['run:lint']); registerTaskAndAddToHelp('fix', 'Fix lint and formatting', ['run:fix']); addExistingTaskToHelp('clean', 'Delete built and generated files'); diff --git a/package-lock.json b/package-lock.json index 83dbb0a58e87..6ed799243ea0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "@types/express": "^4.17.20", "@types/jquery": "^3.5.25", "@types/morgan": "^1.9.7", - "@types/node": "^20.8.10", "@types/offscreencanvas": "^2019.7.2", "@types/pngjs": "^6.0.3", "@types/serve-index": "^1.9.3", diff --git a/package.json b/package.json index 8f2718ab370a..bce2966dc0a8 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "checks": "grunt checks", "unittest": "grunt unittest", "typecheck": "grunt typecheck", + "lint": "grunt run:lint", "fix": "grunt fix", "gen_wpt_cts_html": "node tools/gen_wpt_cts_html", "gen_cache": "node tools/gen_cache", @@ -43,7 +44,6 @@ "@types/express": "^4.17.20", "@types/jquery": "^3.5.25", "@types/morgan": "^1.9.7", - "@types/node": "^20.8.10", "@types/offscreencanvas": "^2019.7.2", "@types/pngjs": "^6.0.3", "@types/serve-index": "^1.9.3", diff --git a/src/common/runtime/standalone.ts b/src/common/runtime/standalone.ts index dc75e6fd01a4..3c402fadbe9f 100644 --- a/src/common/runtime/standalone.ts +++ b/src/common/runtime/standalone.ts @@ -1,4 +1,5 @@ // Implements the standalone test runner (see also: /standalone/index.html). + /* eslint no-console: "off" */ import { dataCache } from '../framework/data_cache.js'; diff --git a/src/common/util/navigator_gpu.ts b/src/common/util/navigator_gpu.ts index 4110a0edb531..47adecc59ef8 100644 --- a/src/common/util/navigator_gpu.ts +++ b/src/common/util/navigator_gpu.ts @@ -1,5 +1,3 @@ -/// - import { TestCaseRecorder } from '../framework/fixture.js'; import { ErrorWithExtra, assert, objectEquals } from './util.js'; diff --git a/tsconfig.json b/tsconfig.json index 6d3b0d98bfcd..9f7f874591ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,15 @@ "compilerOptions": { "lib": ["dom", "es2020"], "module": "esnext", + // Use types only from these packages (not everything in package.json, which is the default). + // Note that TypeScript's `/// ` is the same as adding an entry here - it's global + // to the whole project. + "types": [ + "@types/dom-mediacapture-transform", + "@webgpu/types", + // Required for standalone.ts + "@types/jquery", + ], /* Output options */ "noEmit": true, /* Strict type-checking options */