Commit e5383c30 authored by Liam Horne's avatar Liam Horne

build: set up prettierrc.js for monorepo

parent 016e65ee
module.exports = {
"$schema": "http://json.schemastore.org/prettierrc",
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"arrowParens": "always"
};
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
// List of extensions which should be recommended for users of this workspace. // List of extensions which should be recommended for users of this workspace.
"recommendations": [ "recommendations": [
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"editorconfig.editorconfig", "editorconfig.editorconfig",
"juanblanco.solidity", "juanblanco.solidity",
"golang.go", "golang.go",
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
"editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true, "editor.formatOnSave": true,
}, },
"eslint.workingDirectories": [
{"directory": "packages/batch-submitter", "changeProcessCWD": true },
],
"eslint.nodePath": "./node_modules/eslint/bin/", "eslint.nodePath": "./node_modules/eslint/bin/",
"eslint.format.enable": true, "eslint.format.enable": true,
"editorconfig.generateAuto": false, "editorconfig.generateAuto": false,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config ./.prettierrc.json --write 'test/**/*.ts'", "lint:fix": "prettier --config ./.prettierrc.js --write 'test/**/*.ts'",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"build:integration": "./scripts/build.sh", "build:integration": "./scripts/build.sh",
"build:contracts": "hardhat compile", "build:contracts": "hardhat compile",
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"build": "tsc -p ./tsconfig.build.json", "build": "tsc -p ./tsconfig.build.json",
"clean": "rimraf cache/ dist/ ./tsconfig.build.tsbuildinfo", "clean": "rimraf cache/ dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write \"hardhat.config.ts\" \"{src,exec,test}/**/*.ts\"",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "prettier --config .prettierrc.js --write \"hardhat.config.ts\" \"{src,exec,test}/**/*.ts\"",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"test": "hardhat test --show-stack-traces" "test": "hardhat test --show-stack-traces"
}, },
......
...@@ -4,4 +4,3 @@ ...@@ -4,4 +4,3 @@
"resolveJsonModule": true "resolveJsonModule": true
} }
} }
\ No newline at end of file
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write '{src,test}/**/*.ts'",
"test": "ts-mocha test/*.spec.ts", "test": "ts-mocha test/*.spec.ts",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "prettier --config .prettierrc.js --write '{src,test}/**/*.ts'",
"lint:check": "eslint -c .eslintrc.js --ext .ts ." "lint:check": "eslint -c .eslintrc.js --ext .ts ."
}, },
"devDependencies": { "devDependencies": {
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write '{src,test}/**/*.ts'",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "prettier --config .prettierrc.js --write '{src,test}/**/*.ts'",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"test": "ts-mocha test/**/*.spec.ts" "test": "ts-mocha test/**/*.spec.ts"
}, },
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo", "clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
"clean:db": "rimraf ./db", "clean:db": "rimraf ./db",
"lint": "yarn run lint:fix && yarn run lint:check", "lint": "yarn run lint:fix && yarn run lint:check",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,exec,test}/**/*.ts\"", "lint:fix": "prettier --config .prettierrc.js --write \"{src,exec,test}/**/*.ts\"",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"start": "ts-node ./src/services/run.ts", "start": "ts-node ./src/services/run.ts",
"start:local": "ts-node ./src/services/run.ts | pino-pretty", "start:local": "ts-node ./src/services/run.ts | pino-pretty",
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
"clean": "rimraf tsconfig.build.tsbuildinfo dist", "clean": "rimraf tsconfig.build.tsbuildinfo dist",
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"lint": "yarn run lint:fix && yarn run lint:check", "lint": "yarn run lint:fix && yarn run lint:check",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,test}/**/*.ts\"",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"pre-commit": "lint-staged" "pre-commit": "lint-staged",
"lint:fix": "prettier --config .prettierrc.js --write \"{src,test}/**/*.ts\""
}, },
"dependencies": { "dependencies": {
"node-fetch": "^2.6.1" "node-fetch": "^2.6.1"
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
"build": "tsc -p ./tsconfig.build.json", "build": "tsc -p ./tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo", "clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,exec,test}/**/*.ts\"",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "prettier --config .prettierrc.js --write \"{src,exec,test}/**/*.ts\"",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"test": "hardhat test --show-stack-traces" "test": "hardhat test --show-stack-traces"
}, },
......
module.exports = {
...require('../../.prettierrc.js'),
};
\ No newline at end of file
../../.prettierrc.json
\ No newline at end of file
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
"build": "tsc -p tsconfig.build.json", "build": "tsc -p tsconfig.build.json",
"test": "hardhat test --show-stack-traces", "test": "hardhat test --show-stack-traces",
"lint": "yarn lint:fix && yarn lint:check", "lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config ./.prettierrc.json --write \"hardhat.config.ts\" \"{src,test}/**/*.ts\"",
"pre-commit": "lint-staged", "pre-commit": "lint-staged",
"lint:fix": "prettier --config ./.prettierrc.js --write \"hardhat.config.ts\" \"{src,test}/**/*.ts\"",
"lint:check": "eslint -c .eslintrc.js --ext .ts .", "lint:check": "eslint -c .eslintrc.js --ext .ts .",
"clean": "rimraf ./artifacts ./cache ./dist ./tsconfig.build.tsbuildinfo" "clean": "rimraf ./artifacts ./cache ./dist ./tsconfig.build.tsbuildinfo"
}, },
......
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