-
Notifications
You must be signed in to change notification settings - Fork 214
Add global variables to ESLint and JSDoc annotations validated by Typescript
Michael FIG edited this page Jun 16, 2021
·
2 revisions
Add an entry in the globals
object in the eslint-config package settings:
"globals": {
"globalThis": "readonly",
"BigInt": "readonly",
...
},
Make sure to remove any /* global */
comments as they will cause a linting error (no-redeclare) due to the variable already being declared.
Find or add a globals.d.ts
to your package. Within the file, add a line, like:
declare global {
var makeKind: function;
}
In the jsconfig.json
for your package, make sure the globals.d.ts
is included:
"include": ["src/**/*.js", "exported.js", "globals.d.ts"],
This wiki is for developing agoric-sdk. For help using Agoric SDK, see https://docs.agoric.com/ and https://agoric-sdk.pages.dev/