From 6a660e98fdf4cc5950016a35592d9a52fc5de551 Mon Sep 17 00:00:00 2001 From: Soitora Date: Wed, 29 Jul 2020 19:36:55 +0200 Subject: [PATCH] Create global constants file (#273) * Create global constants file * Update constants import for all files * Tweak project style guides Change printWidth from 80, recommended project widths were at 100/120 so I choose 120. Also while I'm doing it, tweak the EndOfLine setting to prevent VS Code from going ham on LF/CRLF sets. * Remove the ESLint ignore lines in PR And other import whitespace near it * SNAKE_CASE constants instead of camelCase --- .eslintrc.json | 6 ++++-- .prettierrc | 3 ++- src/.vuepress/components/DownloadButtons.vue | 12 ++++-------- src/.vuepress/components/ExtensionList.vue | 6 ++---- src/.vuepress/components/ReleaseNotes.vue | 6 ++---- src/.vuepress/components/VersionTag.vue | 6 ++---- src/.vuepress/constants.js | 4 ++++ src/.vuepress/theme/components/Home.vue | 15 ++++----------- 8 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 src/.vuepress/constants.js diff --git a/.eslintrc.json b/.eslintrc.json index b0d38a5b..6d35f3aa 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,10 +23,12 @@ "markdown" ], "rules": { - "prettier/prettier": "error", + "prettier/prettier": ["error", { + "endOfLine":"auto" + }], "import/no-unresolved": [ 2, { "ignore": ["^@"] } ] } -} \ No newline at end of file +} diff --git a/.prettierrc b/.prettierrc index 15e442db..ddbf76db 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,7 +1,8 @@ { "tabWidth": 4, "useTabs": true, + "printWidth": 120, "trailingComma": "es5", "bracketSpacing": true, - "endOfLine": "lf" + "endOfLine": "auto" } diff --git a/src/.vuepress/components/DownloadButtons.vue b/src/.vuepress/components/DownloadButtons.vue index 2215f426..dba72dbf 100644 --- a/src/.vuepress/components/DownloadButtons.vue +++ b/src/.vuepress/components/DownloadButtons.vue @@ -11,11 +11,7 @@