-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
chore: fix verification of README code snippets #6868
base: unstable
Are you sure you want to change the base?
Changes from all commits
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -54,7 +54,7 @@ describe("web3_provider", function () { | |||||||
mutateProvider: false, | ||||||||
}); | ||||||||
|
||||||||
const web3 = new Web3(nonVerifiedProvider); | ||||||||
const web3 = new Web3(verifiedProvider); //TODO: type is not compatible | ||||||||
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. @nazarhussain the Same in the README, the example does not make sense to me. 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
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. Because we want to get the accounts via normal RPC and then verify it through our 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. the examples in the README show otherwise 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. as per README we pass the lodestar/packages/prover/README.md Line 54 in 14855ea
|
||||||||
const accounts = await web3.eth.getAccounts(); | ||||||||
|
||||||||
await expect(verifiedProvider.request("eth_getBalance", [accounts[0], "latest"])).resolves.toBeDefined(); | ||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": {}, | ||
// `typescript-docs-verifier` uses `ts-node` to compile README snippets | ||
// and hence it is required to disable `transpileOnly` mode as it disables | ||
// all type checks. Set at root to be directly forwarded to `ts-node` until | ||
// https://github.com/bbc/typescript-docs-verifier/issues/31 is resolved | ||
"transpileOnly": false | ||
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. If you want to set this it should go under "ts-node": {
"transpileOnly": true
} 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. This made me think if that config is actually have any effect or not. 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. this is passed directly to ts-node by the |
||
} |
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.
If you want to add comments in JSON, rename those to
.jsoc
extension so it does not highlight as error.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.
that's really only highlighted this way in the diff, we have comments in other tsconfig files as well
lodestar/tsconfig.json
Lines 12 to 15 in 14855ea
tsconfig itself supports comments as is, might be able to remove this if upstream issue is fixed