Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added stylelinter
  • Loading branch information
umbrella-web-tech committed Jun 12, 2018
1 parent f951ce5 commit 154a14f
Show file tree
Hide file tree
Showing 5 changed files with 873 additions and 28 deletions.
24 changes: 24 additions & 0 deletions .stylelintrc.js
@@ -0,0 +1,24 @@
module.exports = {
processors: [
'stylelint-processor-html',
],
extends: [
'stylelint-config-standard',
],
rules: {
'no-empty-source': null, // prevent errors on Vue components without the style block
'selector-pseudo-element-colon-notation': 'single',
'at-rule-no-unknown': [true, {
ignoreAtRules: [
'include',
'if',
'else',
'each',
'for',
'mixin',
'content',
'function'
]
}]
}
}
6 changes: 3 additions & 3 deletions components/AppLogo.vue
Expand Up @@ -29,7 +29,7 @@
.Triangle--one {
border-left: 105px solid transparent;
border-right: 105px solid transparent;
border-bottom: 180px solid #41B883;
border-bottom: 180px solid #41b883;
}
.Triangle--two {
Expand All @@ -38,7 +38,7 @@
animation: goright 0.5s linear forwards 3.5s;
border-left: 87.5px solid transparent;
border-right: 87.5px solid transparent;
border-bottom: 150px solid #3B8070;
border-bottom: 150px solid #3b8070;
}
.Triangle--three {
Expand All @@ -47,7 +47,7 @@
animation: goright 0.5s linear forwards 3.5s;
border-left: 70px solid transparent;
border-right: 70px solid transparent;
border-bottom: 120px solid #35495E;
border-bottom: 120px solid #35495e;
}
.Triangle--four {
Expand Down
12 changes: 12 additions & 0 deletions nuxt.config.js
@@ -1,3 +1,5 @@
const StylelintPlugin = require('stylelint-webpack-plugin')

module.exports = {
/*
** Headers of the page
Expand Down Expand Up @@ -32,6 +34,16 @@ module.exports = {
loader: 'eslint-loader',
exclude: /(node_modules)/
})

config.plugins.push(
new StylelintPlugin({
files: [
'**/*.vue',
'assets/scss/**/*.scss'
],
configFile: './.stylelintrc.dev.js'
})
)
}
}
},
Expand Down
13 changes: 11 additions & 2 deletions package.json
Expand Up @@ -9,7 +9,12 @@
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "yarn lint:js && yarn lint:css",
"lint:fix": "yarn lint:fix:js && yarn lint:fix:css",
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint:css": "stylelint 'assets/scss/**/*.scss' '**/*.vue'",
"lint:fix:css": "stylelint 'assets/scss/**/*.scss' --fix",
"lint:fix:js": "eslint --ext .js,.vue --ignore-path .gitignore . --fix",
"precommit": "npm run lint"
},
"dependencies": {
Expand All @@ -21,6 +26,10 @@
"eslint": "^4.15.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-vue": "^4.0.0"
"eslint-plugin-vue": "^4.0.0",
"stylelint": "^8.2.0",
"stylelint-config-standard": "^17.0.0",
"stylelint-processor-html": "^1.0.0",
"stylelint-webpack-plugin": "^0.9.0"
}
}

0 comments on commit 154a14f

Please sign in to comment.