From c63ed7b99c31cf09fefa301b068a1ba68759c3fb Mon Sep 17 00:00:00 2001 From: "@andatoshiki" Date: Sat, 16 Sep 2023 20:01:44 -0700 Subject: [PATCH] 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 --- .prettierrc.json | 41 +++++++++++++++++++++++++++++++++++++++++ prettier.config.js | 41 ----------------------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 .prettierrc.json delete mode 100644 prettier.config.js diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..59704cfb --- /dev/null +++ b/.prettierrc.json @@ -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 + } + } + ] +} diff --git a/prettier.config.js b/prettier.config.js deleted file mode 100644 index 155dc58e..00000000 --- a/prettier.config.js +++ /dev/null @@ -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 - } - } - ] -}