Skip to content

Commit

Permalink
fix(fmt): lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha committed Aug 2, 2022
1 parent e94cbdd commit aef2757
Show file tree
Hide file tree
Showing 41 changed files with 1,588 additions and 370 deletions.
54 changes: 54 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @package Prettier configuration for Solidity
* @version 1.8.0
* @summary base config adapted from AirBNB to reduce diff churn
* @note solidity settings from Solidity Documentation
* @solidity versions ^0.8.0 bytes1
* this.scheama = require('http://json.schemastore.org/prettierrc'),
*/

// @ts-check
/**
* @type {import('./index')}
*/
module.exports = {
/* editorconfig: true, */
arrowParens: 'always',
bracketSpacing: true,
endOfLine: 'lf',
printWidth: 80,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
quoteProps: 'as-needed',
semi: true,
overrides: [
{
files: ['*.sol', '*.t.sol'],
plugins: [require.resolve('prettier-plugin-solidity')],
options: {
/**
* @param printWidth
* @summary printWidth is not a line character capture
* @see {@link https://prettier.io/docs/en/rationale.html#print-width}
*/
printWidth: 100,
tabWidth: 4,
useTabs: false,
singleQuote: false,
/**
* @param bracketSpacing
* @summary enforces `bracketSpacing` to be `true`,
*
*/
bracketSpacing: true,
/**
* @param explicitTypes
* @summary enforces `explicitTypes` to be `true`,
* @example Example: unit = unit256
*/
explicitTypes: 'always',
},
},
],
};
278 changes: 278 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"directories": {
"test": "test"
},
"scripts": {
},
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/sambacha/layerzero-contracts.git"
Expand All @@ -20,5 +19,9 @@
"homepage": "https://github.com/sambacha/layerzero-contracts#readme",
"dependencies": {
"@openzeppelin/contracts": "4.5.0"
},
"devDependencies": {
"prettier": "^2.7.1",
"prettier-plugin-solidity": "^1.0.0-dev.23"
}
}
Loading

0 comments on commit aef2757

Please sign in to comment.