From 818382bd13fa7fc92cecaad4cbbefd3de2411f45 Mon Sep 17 00:00:00 2001 From: crstin Date: Thu, 25 Jun 2020 23:31:51 +0200 Subject: [PATCH] Prettify codebase --- .eslintrc.js | 14 ++++---- .prettierrc | 6 ++++ babel.config.js | 4 +-- jest.config.js | 4 +-- src/App.vue | 6 ++-- src/components/HelloWorld.vue | 4 +-- src/main.js | 10 +++--- tests/e2e/.eslintrc.js | 4 +-- tests/e2e/custom-assertions/elementCount.js | 22 ++++++------ tests/e2e/custom-commands/customExecute.js | 10 +++--- tests/e2e/custom-commands/openHomepage.js | 10 +++--- .../e2e/custom-commands/openHomepageClass.js | 12 +++---- tests/e2e/globals.js | 2 +- tests/e2e/page-objects/homepage.js | 16 ++++----- tests/e2e/specs/test-with-pageobjects.js | 34 ++++++++++--------- tests/e2e/specs/test.js | 20 +++++------ tests/unit/example.spec.js | 18 +++++----- 17 files changed, 102 insertions(+), 94 deletions(-) create mode 100644 .prettierrc diff --git a/.eslintrc.js b/.eslintrc.js index 6c046c6..cdbe900 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,23 +3,23 @@ module.exports = { env: { node: true }, - extends: ["plugin:vue/essential", "eslint:recommended", "@vue/prettier"], + extends: ['plugin:vue/essential', 'eslint:recommended', '@vue/prettier'], parserOptions: { - parser: "babel-eslint" + parser: 'babel-eslint' }, rules: { - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off" + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' }, overrides: [ { files: [ - "**/__tests__/*.{j,t}s?(x)", - "**/tests/unit/**/*.spec.{j,t}s?(x)" + '**/__tests__/*.{j,t}s?(x)', + '**/tests/unit/**/*.spec.{j,t}s?(x)' ], env: { jest: true } } ] -}; +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e06d2f8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "arrowParens": "always", + "singleQuote": true, + "trailingComma": none +} diff --git a/babel.config.js b/babel.config.js index 397abca..716b023 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: ["@vue/cli-plugin-babel/preset"] -}; + presets: ['@vue/cli-plugin-babel/preset'] +} diff --git a/jest.config.js b/jest.config.js index 3c6f7c8..0f95791 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,3 +1,3 @@ module.exports = { - preset: "@vue/cli-plugin-unit-jest" -}; + preset: '@vue/cli-plugin-unit-jest' +} diff --git a/src/App.vue b/src/App.vue index 1e47315..a27a672 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,14 +6,14 @@