fix(prettier): convert original prettier code linting config from javascript to default .json due to change of project type to module avoiding lint process throwing erros on incompatible configs

This commit is contained in:
Anda Toshiki 2023-09-16 20:01:44 -07:00
parent 23ce20af6c
commit c63ed7b99c
2 changed files with 41 additions and 41 deletions

41
.prettierrc.json Normal file
View File

@ -0,0 +1,41 @@
{
"tabWidth": 4,
"printWidth": 120,
"proseWrap": "preserve",
"semi": false,
"trailingComma": "es5",
"singleQuote": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"overrides": [
{
"files": "{*.md,.prettierrc,.stylelintrc,.babelrc,.html}",
"options": {
"tabWidth": 4
}
},
{
"files": "{*.js?(on),*.js, *.ts, *.vue, *.css, *.scss}",
"options": {
"trailingComma": "none",
"tabWidth": 2
}
},
{
"files": "{**/.vscode/*.json,**/tsconfig.json,**/tsconfig.*.json}",
"options": {
"parser": "json5",
"quoteProps": "preserve",
"singleQuote": false,
"trailingComma": "all",
"tabWidth": 2
}
},
{
"files": "*.y?(a)ml,",
"options": {
"singleQuote": true
}
}
]
}

View File

@ -1,41 +0,0 @@
module.exports = {
tabWidth: 4,
printWidth: 120,
proseWrap: 'preserve',
semi: false,
trailingComma: 'es5',
singleQuote: true,
arrowParens: 'avoid',
endOfLine: 'lf',
overrides: [
{
files: '{*.md,.prettierrc,.stylelintrc,.babelrc,.html}',
options: {
tabWidth: 4
}
},
{
files: '{*.js?(on),*.js, *.ts, *.vue, *.css, *.scss}',
options: {
trailingComma: 'none',
tabWidth: 2
}
},
{
files: '{**/.vscode/*.json,**/tsconfig.json,**/tsconfig.*.json}',
options: {
parser: 'json5',
quoteProps: 'preserve',
singleQuote: false,
trailingComma: 'all',
tabWidth: '2'
}
},
{
files: '*.y?(a)ml,',
options: {
singleQuote: true
}
}
]
}