add prettier, update a few rules

This commit is contained in:
RingOfStorms (Joshua Bell) 2021-05-06 16:24:46 -05:00
parent c52a6a5d93
commit 71c67f66de
No known key found for this signature in database
GPG key ID: 674883DFE7C77047
8 changed files with 164 additions and 50 deletions

5
src/index.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
base: require('../base'),
react: require('../react'),
prettierConfig: require('./prettier'),
}

12
src/prettier.js Normal file
View file

@ -0,0 +1,12 @@
// https://prettier.io/docs/en/options.html
module.exports = {
printWidth: 120,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
};

View file

@ -18,6 +18,6 @@ module.exports = {
arrow: 'parens-new-line',
condition: 'parens-new-line',
logical: 'parens-new-line',
prop: 'parens-new-line'
prop: 'ignore',
}],
};