-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typecheck tests and bump typescript-eslint #2674
base: master
Are you sure you want to change the base?
Changes from all commits
1e12520
1d2b1d1
49542b9
4dd027a
8e29780
efc3c6d
ae2f3d1
090b7b7
f6a36a2
fff384e
ae19195
ad663a1
67f40c9
532026c
42634d6
9d9f878
d3ba182
5f1988c
f7846f2
08faeb0
5e5ed6c
eaf3fad
2add234
fd9a25a
f8b96b6
d43cf2a
266c10e
d6897d4
dc9a3ee
5616803
3944089
a3f89e1
1d04823
30fce0f
3c5dce5
00cd946
7d467c8
347275f
fd3c3f7
e4059e5
8298cdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @ts-nocheck | ||
/* eslint-disable no-restricted-globals */ | ||
/* global print */ | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/dist/ | ||
/scripts/ | ||
/demo/tildot/ | ||
/demo/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @ts-nocheck | ||
/* eslint-disable @endo/restrict-comparison-operands */ | ||
|
||
export { fortune } from './fortune.ts'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @ts-nocheck | ||
export { fortune } from './fortune.ts'; | ||
|
||
if ((0).toFixed.apply<Number, String>(1) === false) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @ts-nocheck | ||
export { meaning } from './meaning.js'; | ||
|
||
if ((0).toFixed.apply<Number, String>(1) === false) { | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,6 +9,7 @@ import bundleSource from '../src/index.js'; | |||||
* @param {string} entry | ||||||
* @param {Options} options | ||||||
*/ | ||||||
// @ts-expect-error 'Options' could be instantiated with a different subtype of constraint 'Partial<any>'. | ||||||
const generate = async (entry, options = {}) => { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This should suppress the error, but then you'll need to supply an empty object somewhere below |
||||||
const entryPath = url.fileURLToPath(new URL(entry, import.meta.url)); | ||||||
return bundleSource(entryPath, { | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ test('no-transforms applies no transforms', async t => { | |
const entryPath = url.fileURLToPath( | ||
new URL(`../demo/circular/a.js`, import.meta.url), | ||
); | ||
// @ts-expect-error Property 'endoZipBase64' does not exist on type '{ moduleFormat: "endoScript"; source: string; } | { moduleFormat: "endoZipBase64"; endoZipBase64: string; endoZipBase64Sha512: string; } | { moduleFormat: "nestedEvaluate"; source: string; sourceMap: string; } | { ...; }'. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like we'll need to use |
||
const { endoZipBase64 } = await bundleSource(entryPath, { | ||
moduleFormat: 'endoZipBase64', | ||
noTransforms: true, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
"allowJs": true | ||
}, | ||
"exclude": [ | ||
"src/exports.*", | ||
"test/" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,8 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"demo", | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import type { Execa } from 'execa'; | ||
import type { ExecaMethod } from 'execa'; | ||
|
||
export type Expectation = { | ||
stdout: RegExp | string | undefined; | ||
stderr?: RegExp | string | undefined; | ||
}; | ||
export type TestCommand = ( | ||
command: ReturnType<Execa>, | ||
command: ReturnType<ExecaMethod>, | ||
expectation: Expectation, | ||
) => Promise<true>; | ||
export type TestRoutine = ( | ||
execa: Execa, | ||
execa: ExecaMethod, | ||
testCommnd: TestCommand, | ||
) => Promise<void>; | ||
export type Context = { | ||
setup: (execa: Execa) => Promise<void>; | ||
teardown?: (execa: Execa) => Promise<void>; | ||
setup: (execa: ExecaMethod) => Promise<void>; | ||
teardown?: (execa: ExecaMethod) => Promise<void>; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"demo", | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ test('test objectMetaMap', async t => { | |
? undefined | ||
: { | ||
...desc, | ||
// @ts-expect-error desc.value possibly undefined | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd probably throw a |
||
value: desc.value * 2, | ||
enumerable: false, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"include": [ | ||
"*.js", | ||
"*.ts", | ||
"src/**/*.js", | ||
"src/**/*.ts" | ||
"src", | ||
"test" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ export const parseJsonp = (bytes, _specifier, _location, _packageLocation) => { | |
const compartment = new Compartment({ | ||
__options__: true, | ||
globals: harden({ | ||
// @ts-expect-error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems like we should enable the rule that requires an explanation for use of |
||
exports(value) { | ||
exports.default = value; | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ const fixture = new URL( | |
import.meta.url, | ||
).toString(); | ||
|
||
// @ts-expect-error XXX Node interface munging | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted this to actually work. 😄
|
||
const { read } = makeReadPowers({ fs, url }); | ||
|
||
const expectedLog = [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @ts-nocheck | ||
import 'ses'; | ||
import fs from 'fs'; | ||
import test from 'ava'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe exclude this dir from typechecking? same with other frequent
@ts-nocheck
directives