diff --git a/.vscode/settings.json b/.vscode/settings.json index 8bb3f1673..14a097045 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "eslint.packageManager": "yarn", "eslint.codeActionsOnSave.mode": "all", "editor.formatOnSave": true, + "files.trimTrailingWhitespace": false, // This one is broken as it cleans string literals as well, killing Jest snapshots: https://github.com/Microsoft/vscode/issues/52711 "prettier.formatAlreadyFormattedFilesOnSave": false, "files.eol": "\n", "editor.codeActionsOnSave": { diff --git a/desktop/.eslintrc.js b/desktop/.eslintrc.js index a4f9d8cdc..1505d60bf 100644 --- a/desktop/.eslintrc.js +++ b/desktop/.eslintrc.js @@ -22,18 +22,7 @@ const builtInModules = [ '@emotion/styled', ]; -const prettierConfig = { - // arrowParens=always is the default for Prettier 2.0, but other configs - // at Facebook appear to be leaking into this file, which is still on - // Prettier 1.x at the moment, so it is best to be explicit. - arrowParens: 'always', - requirePragma: true, - singleQuote: true, - trailingComma: 'all', - bracketSpacing: false, - jsxBracketSameLine: true, - parser: 'flow', -}; +const prettierConfig = require('./.prettierrc'); module.exports = { parser: 'babel-eslint', diff --git a/desktop/.prettierrc.json b/desktop/.prettierrc.json new file mode 100644 index 000000000..ce64e5f17 --- /dev/null +++ b/desktop/.prettierrc.json @@ -0,0 +1,8 @@ +{ + "arrowParens": "always", + "requirePragma": true, + "singleQuote": true, + "trailingComma": "all", + "bracketSpacing": false, + "jsxBracketSameLine": true +}