From b11e9c0e515c8227ffc8f53657e5a76939a9e90c Mon Sep 17 00:00:00 2001 From: Clark Du Date: Fri, 31 Aug 2018 21:34:12 +0100 Subject: [PATCH] feat: upgrade eslint to 5.x (#3494) - [ ] babel-eslint https://github.com/babel/babel-eslint/issues/664 - [x] eslint-config-standard-jsx https://github.com/standard/eslint-config-standard-jsx/issues/32 - [x] eslint-config-standard to be stable release https://github.com/standard/eslint-config-standard/issues/123 - [x] eslint-plugin-html - [x] eslint-plugin-import - [x] eslint-plugin-jest - [x] eslint-plugin-node - [x] eslint-plugin-promise - [x] eslint-plugin-standard https://github.com/standard/eslint-plugin-standard/issues/29 - [x] eslint-plugin-vue https://github.com/vuejs/eslint-plugin-vue/pull/504 - [x] eslint-plugin-react https://github.com/yannickcr/eslint-plugin-react/releases/tag/v7.10.0 --- bin/nuxt-dev | 2 +- .../layouts/default.vue | 2 +- .../async-component-injection/pages/_slug.vue | 2 +- examples/auth-routes/pages/index.vue | 4 +- examples/axios/pages/index.vue | 2 +- examples/coffeescript/components/Logo.vue | 8 +- examples/coffeescript/layouts/default.vue | 2 +- examples/custom-build/pages/index.vue | 2 +- examples/custom-layouts/layouts/dark.vue | 2 +- examples/custom-layouts/layouts/default.vue | 2 +- .../dynamic-components/components/image.vue | 31 +- .../dynamic-components/components/text.vue | 4 +- examples/dynamic-components/pages/index.vue | 2 +- examples/dynamic-components/pages/ssr.vue | 2 +- examples/dynamic-layouts/layouts/mobile.vue | 2 +- examples/i18n/layouts/default.vue | 2 +- examples/jsx/components/test.vue | 4 +- .../layout-transitions/layouts/secondary.vue | 2 +- examples/layout-transitions/pages/users-2.vue | 2 +- examples/layout-transitions/pages/users.vue | 2 +- .../components/twitter-head-card.vue | 2 +- examples/meta-info/pages/about.vue | 2 +- examples/middleware/layouts/default.vue | 4 +- .../components/paragraph.vue | 2 +- .../nested-components/components/post.vue | 2 +- examples/nested-components/pages/index.vue | 8 +- examples/nested-routes/pages/index.vue | 2 +- examples/plugins-vendor/pages/about.vue | 2 +- examples/routes-meta/pages/parent.vue | 2 +- examples/routes-transitions/pages/users.vue | 2 +- examples/scroll-behavior/pages/about.vue | 2 +- .../scroll-behavior/pages/about/contact.vue | 2 +- .../scroll-behavior/pages/about/profile.vue | 2 +- examples/scroll-behavior/pages/index.vue | 2 +- examples/scroll-behavior/pages/users.vue | 2 +- examples/static-images/pages/about.vue | 2 +- examples/static-images/pages/index.vue | 2 +- examples/storybook/components/Button.vue | 2 +- examples/storybook/components/Layout.vue | 6 +- examples/storybook/components/Logo.vue | 8 +- examples/storybook/components/Welcome.vue | 3 +- examples/storybook/layouts/default.vue | 18 +- examples/storybook/package.json | 2 +- examples/storybook/pages/index.vue | 6 +- examples/tailwindcss/layouts/default.vue | 4 +- examples/typescript/components/Card.vue | 2 +- examples/typescript/layouts/default.vue | 2 +- examples/typescript/pages/index.vue | 2 +- examples/uikit/layouts/default.vue | 2 +- examples/uikit/pages/about.vue | 4 +- examples/vue-chartjs/layouts/default.vue | 2 +- examples/vue-chartjs/pages/contributors.vue | 2 +- examples/vue-chartjs/pages/index.vue | 2 +- examples/vuex-store-modules/pages/index.vue | 2 +- examples/web-worker/components/AppLogo.vue | 8 +- examples/web-worker/layouts/default.vue | 2 +- examples/web-worker/pages/index.vue | 17 +- examples/with-amp/pages/dog.vue | 4 +- examples/with-amp/pages/index.vue | 4 +- examples/with-cookies/pages/index.vue | 2 +- examples/with-element-ui/layouts/default.vue | 2 +- examples/with-element-ui/pages/index.vue | 8 +- examples/with-feathers/test/app.test.js | 2 +- examples/with-firebase/layouts/default.vue | 2 +- examples/with-keep-alive/layouts/default.vue | 2 +- examples/with-museui/pages/index.vue | 2 +- examples/with-purgecss/layouts/default.vue | 4 +- examples/with-sockets/pages/index.vue | 2 +- examples/with-vuetify/layouts/default.vue | 2 +- examples/with-vuetify/pages/about.vue | 2 +- examples/with-vuikit/layouts/default.vue | 2 +- examples/with-vuikit/pages/index.vue | 2 +- examples/with-vux/layouts/default.vue | 2 +- examples/with-vux/pages/index.vue | 2 +- lib/builder/builder.js | 2 +- package.json | 20 +- test/fixtures/basic/pages/extractCSS.vue | 2 +- test/fixtures/basic/pages/redirect-name.vue | 2 +- test/fixtures/basic/pages/router-guard.vue | 2 +- test/fixtures/children/layouts/patch.vue | 2 +- test/fixtures/children/pages/parent.vue | 2 +- test/fixtures/children/pages/patch.vue | 2 +- test/fixtures/children/pages/patch/_id.vue | 2 +- .../children/pages/patch/_id/child.vue | 2 +- .../custom-dirs/custom-layouts/default.vue | 2 +- test/fixtures/extract-css/layouts/default.vue | 2 +- test/fixtures/spa/layouts/custom.vue | 2 +- test/fixtures/spa/layouts/default.vue | 2 +- test/fixtures/ssr/pages/asyncComponent.vue | 2 +- test/fixtures/ssr/pages/component.vue | 2 +- test/fixtures/ssr/pages/fetch.vue | 2 +- .../with-config/layouts/custom-env.vue | 2 +- test/fixtures/with-config/layouts/custom.vue | 2 +- test/fixtures/with-config/layouts/default.vue | 2 +- .../with-config/layouts/desktop/default.vue | 2 +- .../with-config/layouts/mobile/default.vue | 2 +- test/unit/basic.ssr.csp.test.js | 4 +- test/unit/dist-options.test.js | 2 +- test/unit/fallback.generate.test.js | 2 +- test/unit/with-config.test.js | 2 +- yarn.lock | 305 ++++++++++-------- 101 files changed, 337 insertions(+), 305 deletions(-) diff --git a/bin/nuxt-dev b/bin/nuxt-dev index 6e742db0ec..722a99c846 100755 --- a/bin/nuxt-dev +++ b/bin/nuxt-dev @@ -96,6 +96,6 @@ const errorHandler = (err, instance) => { .then(() => !oldInstance && nuxt.showReady(false)) .then(() => builder.watchServer()) // Handle errors - .catch(err => errorHandler(err, {builder, nuxt})) + .catch(err => errorHandler(err, { builder, nuxt })) ) })() diff --git a/examples/async-component-injection/layouts/default.vue b/examples/async-component-injection/layouts/default.vue index 092ebb1420..82bfa911c9 100644 --- a/examples/async-component-injection/layouts/default.vue +++ b/examples/async-component-injection/layouts/default.vue @@ -8,7 +8,7 @@

- +
diff --git a/examples/async-component-injection/pages/_slug.vue b/examples/async-component-injection/pages/_slug.vue index 62700c7a87..73ff71e4a9 100644 --- a/examples/async-component-injection/pages/_slug.vue +++ b/examples/async-component-injection/pages/_slug.vue @@ -1,6 +1,6 @@ diff --git a/examples/auth-routes/pages/index.vue b/examples/auth-routes/pages/index.vue index 00320ff2ff..401db4150d 100644 --- a/examples/auth-routes/pages/index.vue +++ b/examples/auth-routes/pages/index.vue @@ -4,8 +4,8 @@

{{ formError }}

To login, use demo as username and demo as password.

-

Username:

-

Password:

+

Username:

+

Password:

diff --git a/examples/axios/pages/index.vue b/examples/axios/pages/index.vue index 7661c226de..7c3a4cc65c 100644 --- a/examples/axios/pages/index.vue +++ b/examples/axios/pages/index.vue @@ -1,7 +1,7 @@ diff --git a/examples/coffeescript/components/Logo.vue b/examples/coffeescript/components/Logo.vue index 8885e9498a..a4f590a688 100644 --- a/examples/coffeescript/components/Logo.vue +++ b/examples/coffeescript/components/Logo.vue @@ -1,9 +1,9 @@ diff --git a/examples/coffeescript/layouts/default.vue b/examples/coffeescript/layouts/default.vue index a749bdd457..acfe1d2cf0 100644 --- a/examples/coffeescript/layouts/default.vue +++ b/examples/coffeescript/layouts/default.vue @@ -1,6 +1,6 @@ diff --git a/examples/custom-build/pages/index.vue b/examples/custom-build/pages/index.vue index 2e5499140f..b1f35869f2 100644 --- a/examples/custom-build/pages/index.vue +++ b/examples/custom-build/pages/index.vue @@ -1,6 +1,6 @@ diff --git a/examples/plugins-vendor/pages/about.vue b/examples/plugins-vendor/pages/about.vue index 32c498fa19..c0fcbe822c 100644 --- a/examples/plugins-vendor/pages/about.vue +++ b/examples/plugins-vendor/pages/about.vue @@ -1,6 +1,6 @@ diff --git a/examples/routes-meta/pages/parent.vue b/examples/routes-meta/pages/parent.vue index 6258e78f51..c207293965 100644 --- a/examples/routes-meta/pages/parent.vue +++ b/examples/routes-meta/pages/parent.vue @@ -3,7 +3,7 @@

Parent

Checkout Blue page - +
diff --git a/examples/routes-transitions/pages/users.vue b/examples/routes-transitions/pages/users.vue index f1ef0e7c81..b738da77f1 100644 --- a/examples/routes-transitions/pages/users.vue +++ b/examples/routes-transitions/pages/users.vue @@ -7,7 +7,7 @@ Next > diff --git a/examples/scroll-behavior/pages/about.vue b/examples/scroll-behavior/pages/about.vue index 1104c0d814..79d7d2c09e 100644 --- a/examples/scroll-behavior/pages/about.vue +++ b/examples/scroll-behavior/pages/about.vue @@ -9,7 +9,7 @@ Contact - + Home page diff --git a/examples/scroll-behavior/pages/about/contact.vue b/examples/scroll-behavior/pages/about/contact.vue index d88d8df392..8c3f36f4d9 100644 --- a/examples/scroll-behavior/pages/about/contact.vue +++ b/examples/scroll-behavior/pages/about/contact.vue @@ -1,7 +1,7 @@ diff --git a/examples/scroll-behavior/pages/about/profile.vue b/examples/scroll-behavior/pages/about/profile.vue index 0c8eac0ff3..28c0b38e50 100644 --- a/examples/scroll-behavior/pages/about/profile.vue +++ b/examples/scroll-behavior/pages/about/profile.vue @@ -1,7 +1,7 @@ diff --git a/examples/scroll-behavior/pages/index.vue b/examples/scroll-behavior/pages/index.vue index 0f24e17d6f..ee81801479 100644 --- a/examples/scroll-behavior/pages/index.vue +++ b/examples/scroll-behavior/pages/index.vue @@ -5,6 +5,6 @@

Lists of users

Long page

Long page #anchor

-
+
diff --git a/examples/scroll-behavior/pages/users.vue b/examples/scroll-behavior/pages/users.vue index f1ef0e7c81..b738da77f1 100644 --- a/examples/scroll-behavior/pages/users.vue +++ b/examples/scroll-behavior/pages/users.vue @@ -7,7 +7,7 @@ Next >
  • - + {{ user.first_name }} {{ user.last_name }}
diff --git a/examples/static-images/pages/about.vue b/examples/static-images/pages/about.vue index d0bf522099..71dc2952fe 100644 --- a/examples/static-images/pages/about.vue +++ b/examples/static-images/pages/about.vue @@ -1,6 +1,6 @@