forked from graphprotocol/graph-tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: use the guild's shared config for eslint and prettier (graphpr…
…otocol#1031) * add eslint and use the guild shared config * prettier * eslint * node protocol for imports not ready yet
- Loading branch information
Showing
127 changed files
with
6,789 additions
and
5,438 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
node_modules | ||
dist | ||
build | ||
generated | ||
packages/cli/tests/cli/init | ||
packages/cli/tests/cli/validation | ||
|
||
# TODO: cleanup examples and lint | ||
examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
extends: ['@theguild'], | ||
rules: { | ||
// not necessary here, we dont build with bob | ||
'import/extensions': 'off', | ||
// pushing to array multiple times is not a big deal | ||
'unicorn/no-array-push-push': 'off', | ||
// TODO: warning for now, clean up | ||
'@typescript-eslint/no-this-alias': 'warn', | ||
// TODO: remove default exports, breaking change? | ||
'import/no-default-export': 'off', | ||
// TODO: remove once we get rid of all anys | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// TODO: not ready yet | ||
'unicorn/prefer-node-protocol': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@theguild/prettier-config'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Example Subgraph | ||
|
||
An example to help you get started with The Graph. For more information see the docs on https://thegraph.com/docs/. | ||
An example to help you get started with The Graph. For more information see the docs on | ||
https://thegraph.com/docs/. |
6 changes: 3 additions & 3 deletions
6
examples/basic-event-handlers/migrations/1_initial_migration.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
var Migrations = artifacts.require('./Migrations.sol') | ||
var Migrations = artifacts.require('./Migrations.sol'); | ||
|
||
module.exports = function (deployer) { | ||
deployer.deploy(Migrations) | ||
} | ||
deployer.deploy(Migrations); | ||
}; |
6 changes: 3 additions & 3 deletions
6
examples/basic-event-handlers/migrations/2_deploy_contract.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol') | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol'); | ||
|
||
module.exports = async function (deployer) { | ||
await deployer.deploy(GravatarRegistry) | ||
} | ||
await deployer.deploy(GravatarRegistry); | ||
}; |
14 changes: 7 additions & 7 deletions
14
examples/basic-event-handlers/migrations/3_create_gravatars.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol') | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol'); | ||
|
||
module.exports = async function (deployer) { | ||
let accounts = await web3.eth.getAccounts() | ||
const accounts = await web3.eth.getAccounts(); | ||
|
||
const registry = await GravatarRegistry.deployed() | ||
await registry.setMythicalGravatar({ from: accounts[0] }) | ||
const registry = await GravatarRegistry.deployed(); | ||
await registry.setMythicalGravatar({ from: accounts[0] }); | ||
await registry.createGravatar('Carl', 'https://thegraph.com/img/team/team_04.png', { | ||
from: accounts[0], | ||
}) | ||
}); | ||
await registry.createGravatar('Lucas', 'https://thegraph.com/img/team/bw_Lucas.jpg', { | ||
from: accounts[1], | ||
}) | ||
} | ||
}); | ||
}; |
12 changes: 6 additions & 6 deletions
12
examples/basic-event-handlers/migrations/4_update_gravatars.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol') | ||
const GravatarRegistry = artifacts.require('./GravatarRegistry.sol'); | ||
|
||
module.exports = async function (deployer) { | ||
let accounts = await web3.eth.getAccounts() | ||
const accounts = await web3.eth.getAccounts(); | ||
|
||
const registry = await GravatarRegistry.deployed() | ||
await registry.updateGravatarName('Nena', { from: accounts[0] }) | ||
await registry.updateGravatarName('Jorge', { from: accounts[1] }) | ||
} | ||
const registry = await GravatarRegistry.deployed(); | ||
await registry.updateGravatarName('Nena', { from: accounts[0] }); | ||
await registry.updateGravatarName('Jorge', { from: accounts[1] }); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.