generated from sambacha/zen-foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.prettierrc.js
54 lines (53 loc) · 1.36 KB
/
.prettierrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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',
},
},
],
};