From dbe39468413498ea3f9d387a7265252da8a3883e Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 21 Apr 2020 21:34:03 +0100 Subject: [PATCH 1/6] feat(lint): add stylelint-config-standard and separate lint scripts --- .stylelintignore | 3 + .stylelintrc | 3 + package.json | 8 +- .../template/_stylelint.config.js | 1 + .../framevuerk/components/FramevuerkLogo.vue | 15 +- .../frameworks/framevuerk/layouts/default.vue | 18 +- .../frameworks/framevuerk/pages/index.vue | 1 + .../template/frameworks/iview/pages/index.vue | 15 +- .../vuesax/components/VuesaxLogo.vue | 3 +- .../frameworks/vuesax/pages/index.vue | 34 +- .../vuetify/components/VuetifyLogo.vue | 2 +- .../template/nuxt/components/Logo.vue | 1 + .../template/nuxt/layouts/default.vue | 15 +- .../cna-template/template/nuxt/package.js | 15 +- .../cna-template/template/nuxt/package.json | 6 +- .../template/nuxt/pages/index.vue | 17 +- packages/create-nuxt-app/lib/saofile.js | 5 +- yarn.lock | 965 +++++++++++++++++- 18 files changed, 1081 insertions(+), 46 deletions(-) create mode 100644 .stylelintignore create mode 100644 .stylelintrc diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 000000000..8443d9a1d --- /dev/null +++ b/.stylelintignore @@ -0,0 +1,3 @@ +node_modules +packages/cna-template/template/nuxt/pages/index.vue +packages/cna-template/template/frameworks/iview/pages/index.vue diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 000000000..40db42c66 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,3 @@ +{ + "extends": "stylelint-config-standard" +} diff --git a/package.json b/package.json index c9554ecdf..2d03f67af 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "type": "git" }, "scripts": { - "lint": "eslint --ext .js,.mjs,.vue .", + "lint": "yarn lint:js && yarn lint:style", + "lint:js": "eslint --ext .js,.mjs,.vue .", + "lint:style": "stylelint **/*.{vue,css}", "test": "ava --verbose", "test:snapshot": "ava --verbose --update-snapshots" }, @@ -17,7 +19,9 @@ "@nuxtjs/eslint-config": "^2.0.2", "ava": "^3.7.1", "eslint": "^6.8.0", - "lerna": "^3.20.2" + "lerna": "^3.20.2", + "stylelint": "^13.3.3", + "stylelint-config-standard": "^20.0.0" }, "name": "create-nuxt-app" } diff --git a/packages/cna-template/template/_stylelint.config.js b/packages/cna-template/template/_stylelint.config.js index a89441b7d..6c2b3e18d 100644 --- a/packages/cna-template/template/_stylelint.config.js +++ b/packages/cna-template/template/_stylelint.config.js @@ -1,4 +1,5 @@ module.exports = { + extends: 'stylelint-config-standard', // add your custom config here // https://stylelint.io/user-guide/configuration rules: {} diff --git a/packages/cna-template/template/frameworks/framevuerk/components/FramevuerkLogo.vue b/packages/cna-template/template/frameworks/framevuerk/components/FramevuerkLogo.vue index 98ddfbd50..913b43400 100644 --- a/packages/cna-template/template/frameworks/framevuerk/components/FramevuerkLogo.vue +++ b/packages/cna-template/template/frameworks/framevuerk/components/FramevuerkLogo.vue @@ -48,26 +48,31 @@ export default { vertical-align: middle; width: 43px; } + .logo svg { - width: 100%; - height: auto; - max-height: 12em; - margin: 0 auto; + width: 100%; + height: auto; + max-height: 12em; + margin: 0 auto; } + .logo svg polygon { transform: translateY(-100%); transition-duration: 2s; } + .logo svg path { fill: transparent; transition-delay: 0.6s; transition-duration: 1s; } + .logo.ready svg polygon { transform: translateY(0); fill: #fff; } -.logo.ready svg path { + +.logo.ready svg path { stroke: transparent; stroke-width: 0; fill: #fff; diff --git a/packages/cna-template/template/frameworks/framevuerk/layouts/default.vue b/packages/cna-template/template/frameworks/framevuerk/layouts/default.vue index 92011f27f..ff83b7243 100644 --- a/packages/cna-template/template/frameworks/framevuerk/layouts/default.vue +++ b/packages/cna-template/template/frameworks/framevuerk/layouts/default.vue @@ -4,8 +4,15 @@ diff --git a/packages/cna-template/template/frameworks/vuesax/pages/index.vue b/packages/cna-template/template/frameworks/vuesax/pages/index.vue index 37fc3b97d..da457e40e 100644 --- a/packages/cna-template/template/frameworks/vuesax/pages/index.vue +++ b/packages/cna-template/template/frameworks/vuesax/pages/index.vue @@ -84,15 +84,23 @@ export default { } .title { - font-family: 'Quicksand', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, - 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + font-family: + 'Quicksand', + 'Source Sans Pro', + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + 'Helvetica Neue', + Arial, + sans-serif; display: block; font-weight: 300; font-size: 55px; color: #35495e; letter-spacing: 1px; text-transform: capitalize; - margin: 25px 0px + margin: 25px 0; } .subtitle { @@ -106,12 +114,12 @@ export default { .subtitle a { font-weight: 500; - color: inherit + color: inherit; } .links { padding-top: 15px; - margin-bottom: 20px + margin-bottom: 20px; } .content-logos { @@ -120,14 +128,24 @@ export default { justify-content: center; min-width: 500px; } + .plus { font-size: 2.5rem; margin: 15px; - color: #35495e + color: #35495e; } + .h3 { - font-family: 'Quicksand', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, - 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + font-family: + 'Quicksand', + 'Source Sans Pro', + -apple-system, + BlinkMacSystemFont, + 'Segoe UI', + Roboto, + 'Helvetica Neue', + Arial, + sans-serif; font-weight: 400; margin: 10px; } diff --git a/packages/cna-template/template/frameworks/vuetify/components/VuetifyLogo.vue b/packages/cna-template/template/frameworks/vuetify/components/VuetifyLogo.vue index d6689ea84..54aae8ce8 100644 --- a/packages/cna-template/template/frameworks/vuetify/components/VuetifyLogo.vue +++ b/packages/cna-template/template/frameworks/vuetify/components/VuetifyLogo.vue @@ -8,7 +8,7 @@