Add Prettier configuration file (prettier.config.js) (#3713)

* Create prettier.config.js

* Add comment with .editorconfig

* Remove duplicate settings handled by .editorconfig

* Correct printWidth

* Update prettier.config.js to remove "unknown option" editorconfig: true
This commit is contained in:
Dr. Derek Austin 2021-05-13 08:07:24 -05:00 • committed by GitHub
parent 30dc2990c3
commit 4488fc1d0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

19
prettier.config.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
// These settings are duplicated in .editorconfig:
tabWidth: 2, // indent_size = 2
useTabs: false, // indent_style = space
endOfLine: 'lf', // end_of_line = lf
semi: false, // default: true
singleQuote: true, // default: false
printWidth: 100, // default: 80
trailingComma: 'es5',
bracketSpacing: true,
overrides: [
{
files: '*.js',
options: {
parser: 'flow',
},
},
],
}