-
Notifications
You must be signed in to change notification settings - Fork 151
ensure js/ts
codeblocks in markdown doesn't contain syntax errors + lint them with ESLint
#356
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
base: main
Are you sure you want to change the base?
Conversation
fixes fixes fixes import sort prefer const ban types no var eqeqeq no array constructor prefer const fixes fixes fixes import sort prefer const last fixes prettier
id: Bytes | ||
logs: string[] | ||
receiptIds: Bytes[] | ||
tokensBurnt: bigint |
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.
"test": "graph test", | ||
... | ||
"test": "graph test" | ||
//... |
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.
//... | |
// ... |
|
||
beforeEach(() => { | ||
let gravatar = new Gravatar("0x0") | ||
gravatar.displayName = “First Gravatar” |
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.
no more illegal “
assert.equals(ethereum.Value.fromString("hello"); ethereum.Value.fromString("hello")); | ||
assert.equals(ethereum.Value.fromString('hello'), ethereum.Value.fromString('hello')) |
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.
should be ,
@@ -89,36 +90,38 @@ async function getDomainNames() { | |||
|
|||
// The first query will get the first page of results and also get the block | |||
// hash so that the remainder of the queries are consistent with the first. | |||
const listDomainsQuery = ` | |||
const listDomainsQuery = /* GraphQL */ ` |
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.
it always better adds special comment /* GraphQL */
for graphql documents, so prettier will prettify them and graphql-eslint could validate even in markdown
📦 Next.js Bundle Analysis for @graphprotocol/docsThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Eight Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored. |
|
||
x + y // give compile time error about nullability | ||
console.log(x + y) // give compile time error about nullability |
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.
I added console.log
to omit eslint error about unused expression
newGravatarEvent.parameters = new Array() | ||
let idParam = new ethereum.EventParam('id', ethereum.Value.fromI32(id)) | ||
let addressParam = new ethereum.EventParam( | ||
newGravatarEvent.parameters = [] |
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.
replaced new Array()
with []
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.
This is AssemblyScript and I think we need to declare it like that https://www.assemblyscript.org/stdlib/array.html#array
No description provided.