Commit d89045b7 authored by Maurelian's avatar Maurelian Committed by Kelvin Fichter

chore(contracts): Add formatting with prettier-plugin-solidity

parent d5442613
module.exports = { module.exports = {
"$schema": "http://json.schemastore.org/prettierrc", $schema: 'http://json.schemastore.org/prettierrc',
"trailingComma": "es5", trailingComma: 'es5',
"tabWidth": 2, tabWidth: 2,
"semi": false, semi: false,
"singleQuote": true, singleQuote: true,
"arrowParens": "always" arrowParens: 'always',
}; overrides: [
{
files: '*.sol',
options: {
// These options are native to Prettier.
printWidth: 100,
tabWidth: 4,
useTabs: false,
singleQuote: false,
bracketSpacing: false,
// These options are specific to the Solidity Plugin
explicitTypes: 'always',
compiler: '0.8.9',
},
},
],
}
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
"lerna": "^4.0.0", "lerna": "^4.0.0",
"patch-package": "^6.4.7", "patch-package": "^6.4.7",
"prettier": "^2.3.1", "prettier": "^2.3.1",
"prettier-plugin-solidity": "^1.0.0-beta.18",
"typescript": "^4.3.5" "typescript": "^4.3.5"
}, },
"scripts": { "scripts": {
......
contracts/L2/predeploys/WETH9.sol
contracts/L2/predeploys/IWETH9.sol
module.exports = { module.exports = {
...require('../../.prettierrc.js'), ...require('../../.prettierrc.js'),
}; }
\ No newline at end of file
...@@ -28,10 +28,13 @@ ...@@ -28,10 +28,13 @@
"test:slither": "slither .", "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", "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", "posttest:slither": "rm -f @openzeppelin && rm -f @ens && rm -f hardhat",
"lint:typescript:check": "eslint .",
"lint:contracts:check": "yarn solhint -f table 'contracts/**/*.sol'",
"lint:check": "yarn lint:contracts:check && yarn lint:typescript:check",
"lint": "yarn lint:check", "lint": "yarn lint:check",
"lint:check": "eslint .", "lint:typescript:fix": "eslint --fix .",
"lint:fix": "yarn lint:check --fix", "lint:contracts:fix": "yarn prettier --write 'contracts/**/*.sol'",
"lint:contracts": "yarn solhint -f table contracts/**/*.sol", "lint:fix": "yarn lint:contracts:fix && yarn lint:typescript:fix",
"clean": "rm -rf ./dist ./artifacts ./cache ./tsconfig.build.tsbuildinfo", "clean": "rm -rf ./dist ./artifacts ./cache ./tsconfig.build.tsbuildinfo",
"deploy": "ts-node bin/deploy.ts && yarn autogen:markdown", "deploy": "ts-node bin/deploy.ts && yarn autogen:markdown",
"prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./", "prepublishOnly": "yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./",
...@@ -71,12 +74,10 @@ ...@@ -71,12 +74,10 @@
"directory-tree": "^2.2.7", "directory-tree": "^2.2.7",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"eslint": "^7.27.0", "eslint": "^7.27.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ban": "^1.5.2", "eslint-plugin-ban": "^1.5.2",
"eslint-plugin-import": "^2.23.4", "eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^35.1.2", "eslint-plugin-jsdoc": "^35.1.2",
"eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.24.0", "eslint-plugin-react": "^7.24.0",
"eslint-plugin-unicorn": "^32.0.1", "eslint-plugin-unicorn": "^32.0.1",
"ethereum-waffle": "^3.3.0", "ethereum-waffle": "^3.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