Commit 72294c70 authored by Liam Horne's avatar Liam Horne

style: update configuration to include babel-eslint for .js linting

parent b17cfbe0
This diff is collapsed.
module.exports = {
"extends": "../.eslintrc.js"
extends: '../.eslintrc.js',
}
......@@ -8,7 +8,7 @@
"scripts": {
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"build:integration": "./scripts/build.sh",
"build:contracts": "hardhat compile",
"build:contracts:ovm": "hardhat compile --network optimism",
......@@ -34,6 +34,7 @@
"chai-as-promised": "^7.1.1",
"docker-compose": "^0.23.8",
"envalid": "^7.1.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
const { DockerComposeNetwork } = require("./shared/docker-compose")
const { DockerComposeNetwork } = require('./shared/docker-compose')
before(async () => {
if (!process.env.NO_NETWORK) {
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
#!/usr/bin/env node
const batchSubmitter = require("../dist/src/exec/run-batch-submitter")
const batchSubmitter = require('../dist/src/exec/run-batch-submitter')
batchSubmitter.run()
......@@ -15,7 +15,7 @@
"lint": "yarn lint:fix && yarn lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"test": "hardhat test --show-stack-traces"
},
"keywords": [
......@@ -61,6 +61,7 @@
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"chai": "^4.2.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
......@@ -12,7 +12,7 @@
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"lint:fix": "yarn lint:check --fix",
"lint": "yarn lint:fix && yarn lint:check",
"pre-commit": "lint-staged",
......@@ -28,6 +28,7 @@
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"chai": "^4.3.4",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
......@@ -23,8 +23,8 @@ export class BaseService<T> {
protected options: T
protected logger: Logger
protected metrics: Metrics
protected initialized: boolean = false
protected running: boolean = false
protected initialized = false
protected running = false
constructor(
name: string,
......
module.exports = {
"extends": "../../.eslintrc.js",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
}
extends: '../../.eslintrc.js',
}
......@@ -35,8 +35,8 @@
"test:slither": "slither .",
"pretest:slither": "rm -f @openzeppelin && rm -f @ens && rm -f hardhat && ln -s ../../node_modules/@openzeppelin @openzeppelin && ln -s ../../node_modules/@ens @ens && ln -s ../../node_modules/hardhat hardhat",
"posttest:slither": "rm -f @openzeppelin && rm -f @ens && rm -f hardhat",
"lint:check": "eslint -c .eslintrc.js --ext .ts . ",
"lint:fix": "eslint -c .eslintrc.js --ext .ts . --fix",
"lint:check": "eslint .",
"lint:fix": "yarn lint:check --fix",
"clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm ./tsconfig.build.tsbuildinfo",
"deploy": "ts-node \"./bin/deploy.ts\" && yarn generate-markdown",
"serve": "./bin/serve_dump.sh",
......@@ -80,6 +80,7 @@
"copyfiles": "^2.3.0",
"directory-tree": "^2.2.7",
"dotenv": "^8.2.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
......@@ -34,8 +34,8 @@ const argv = yargs(hideBin(process.argv)).argv
for (const name of Object.keys(addresses)) {
if (addresses[name] !== ethers.constants.AddressZero) {
table.push({
name: name,
address: addresses[name]
name,
address: addresses[name],
})
}
}
......
......@@ -77,10 +77,10 @@ const networks = {
proxiedContracts = []
for (let i = 0; i < contracts.length; i++) {
if (contracts[i] == 'OVM_L1CrossDomainMessenger') {
if (contracts[i] === 'OVM_L1CrossDomainMessenger') {
proxiedContracts.push(contracts.splice(i, 1)[0])
}
if (contracts[i] == 'OVM_L1ETHGateway') {
if (contracts[i] === 'OVM_L1ETHGateway') {
proxiedContracts.push(contracts.splice(i, 1)[0])
}
}
......
......@@ -6,7 +6,7 @@ const { hideBin } = require('yargs/helpers')
const argv = yargs(hideBin(process.argv)).argv
const nicknames = {
'mockOVM_BondManager': 'OVM_BondManager'
mockOVM_BondManager: 'OVM_BondManager',
}
;(async () => {
......@@ -27,17 +27,21 @@ const nicknames = {
throw new Error(`unable to get a reference to Lib_AddressManager`)
}
const contracts = dirtree(`./deployments/${argv.network}`).children.filter((child) => {
return child.extension === '.json'
}).map((child) => {
return child.name.replace('.json', '')
})
const contracts = dirtree(`./deployments/${argv.network}`)
.children.filter((child) => {
return child.extension === '.json'
})
.map((child) => {
return child.name.replace('.json', '')
})
for (const contract of contracts) {
const deployment = require(`../deployments/${argv.network}/${contract}.json`)
if (contract !== 'Lib_AddressManager') {
const address = await Lib_AddressManager.getAddress(nicknames[contract] || contract)
const address = await Lib_AddressManager.getAddress(
nicknames[contract] || contract
)
if (address !== deployment.address) {
console.log(`✖ ${contract} (ADDRESS MISMATCH DETECTED)`)
continue
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
......@@ -14,7 +14,7 @@
"build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"lint:fix": "yarn lint:check --fix",
"pre-commit": "lint-staged",
"test": "ts-mocha test/**/*.spec.ts"
......@@ -27,6 +27,7 @@
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"chai": "^4.3.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
......@@ -16,8 +16,8 @@ export interface WatcherOptions {
export class Watcher {
public l1: Layer
public l2: Layer
public pollInterval: number = 3000
public NUM_BLOCKS_TO_FETCH: number = 10_000_000
public pollInterval = 3000
public NUM_BLOCKS_TO_FETCH = 10_000_000
constructor(opts: WatcherOptions) {
this.l1 = opts.l1
......@@ -36,14 +36,14 @@ export class Watcher {
public async getL1TransactionReceipt(
l2ToL1MsgHash: string,
pollForPending: boolean = true
pollForPending = true
): Promise<TransactionReceipt> {
return this.getTransactionReceipt(this.l1, l2ToL1MsgHash, pollForPending)
}
public async getL2TransactionReceipt(
l1ToL2MsgHash: string,
pollForPending: boolean = true
pollForPending = true
): Promise<TransactionReceipt> {
return this.getTransactionReceipt(this.l2, l1ToL2MsgHash, pollForPending)
}
......@@ -76,7 +76,7 @@ export class Watcher {
public async getTransactionReceipt(
layer: Layer,
msgHash: string,
pollForPending: boolean = true
pollForPending = true
): Promise<TransactionReceipt> {
let matches: ethers.providers.Log[] = []
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
......@@ -14,7 +14,7 @@
"clean:db": "rimraf ./db",
"lint": "yarn run lint:fix && yarn run lint:check",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"start": "ts-node ./src/services/run.ts",
"start:local": "ts-node ./src/services/run.ts | pino-pretty",
"test": "hardhat --config test/config/hardhat.config.ts test",
......@@ -58,6 +58,7 @@
"@typescript-eslint/parser": "^4.26.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
......@@ -14,7 +14,7 @@
"lint": "yarn run lint:fix && yarn run lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts ."
"lint:check": "eslint ."
},
"dependencies": {
"node-fetch": "^2.6.1"
......@@ -28,6 +28,7 @@
"@types/node-fetch": "^2.5.10",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
module.exports = {
"extends": "../../.eslintrc.js"
extends: '../../.eslintrc.js',
}
#!/usr/bin/env node
const main = require("../dist/exec/run").default
const main = require('../dist/exec/run').default
;(async () => {
await main()
......
......@@ -17,7 +17,7 @@
"lint": "yarn lint:fix && yarn lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"test": "hardhat test --show-stack-traces"
},
"keywords": [
......@@ -66,6 +66,7 @@
"hardhat": "^2.3.0",
"lodash": "^4.17.21",
"mocha": "^8.4.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"lint-staged": "11.0.0",
"prettier": "^2.2.1",
......
module.exports = {
"extends": "../../.eslintrc.js",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
}
extends: '../../.eslintrc.js',
}
......@@ -14,7 +14,7 @@
"lint": "yarn lint:fix && yarn lint:check",
"pre-commit": "lint-staged",
"lint:fix": "yarn lint:check --fix",
"lint:check": "eslint -c .eslintrc.js --ext .ts .",
"lint:check": "eslint .",
"clean": "rimraf ./artifacts ./cache ./dist ./tsconfig.build.tsbuildinfo"
},
"peerDependencies": {
......@@ -45,6 +45,7 @@
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"chai": "^4.3.0",
"babel-eslint": "^10.1.0",
"eslint": "^7.27.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-config-prettier": "^8.3.0",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment