Normalize and enforce single quotes in styles

- Replace stylelint property in package.json with .stylelintrc.js
- Add string-quotes stylelint rule
- Fix quotes
This commit is contained in:
Rhys Braunschweig
2018-05-29 12:12:21 +02:00
parent 9040a3dc75
commit 248c569bff
6 changed files with 49 additions and 48 deletions

29
.stylelintrc.js Normal file
View File

@@ -0,0 +1,29 @@
module.exports = {
'extends': 'stylelint-config-standard',
'rules': {
'no-empty-source': null,
'string-quotes': 'single',
'at-rule-no-unknown': [
true,
{
'ignoreAtRules': [
'extend',
'at-root',
'debug',
'warn',
'error',
'if',
'else',
'for',
'each',
'while',
'mixin',
'include',
'content',
'return',
'function',
],
},
],
},
};

View File

@@ -22,34 +22,6 @@
"android 4", "android 4",
"opera 12" "opera 12"
], ],
"stylelint": {
"extends": "stylelint-config-standard",
"rules": {
"no-empty-source": null,
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"extend",
"at-root",
"debug",
"warn",
"error",
"if",
"else",
"for",
"each",
"while",
"mixin",
"include",
"content",
"return",
"function"
]
}
]
}
},
"scripts": { "scripts": {
"build": "webpack --progress --config resources/assets/build/webpack.config.js", "build": "webpack --progress --config resources/assets/build/webpack.config.js",
"build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js", "build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js",

View File

@@ -1 +1 @@
@import "~bootstrap/scss/bootstrap"; @import '~bootstrap/scss/bootstrap';

View File

@@ -1,5 +1,5 @@
/** Import Bootstrap functions */ /** Import Bootstrap functions */
@import "~bootstrap/scss/functions"; @import '~bootstrap/scss/functions';
$theme-colors: ( $theme-colors: (
primary: #525ddc primary: #525ddc

View File

@@ -10,14 +10,14 @@
@extend .form-group; @extend .form-group;
} }
.comment-form input[type="text"], .comment-form input[type='text'],
.comment-form input[type="email"], .comment-form input[type='email'],
.comment-form input[type="url"], .comment-form input[type='url'],
.comment-form textarea { .comment-form textarea {
@extend .form-control; @extend .form-control;
} }
.comment-form input[type="submit"] { .comment-form input[type='submit'] {
@extend .btn; @extend .btn;
@extend .btn-secondary; @extend .btn-secondary;
} }

View File

@@ -1,7 +1,7 @@
@import "common/variables"; @import 'common/variables';
/** Import everything from autoload */ /** Import everything from autoload */
@import "./autoload/**/*"; @import './autoload/**/*';
/** /**
* Import npm dependencies * Import npm dependencies
@@ -9,17 +9,17 @@
* Prefix your imports with `~` to grab from node_modules/ * Prefix your imports with `~` to grab from node_modules/
* @see https://github.com/webpack-contrib/sass-loader#imports * @see https://github.com/webpack-contrib/sass-loader#imports
*/ */
// @import "~some-node-module"; // @import '~some-node-module';
/** Import theme styles */ /** Import theme styles */
@import "common/global"; @import 'common/global';
@import "components/buttons"; @import 'components/buttons';
@import "components/comments"; @import 'components/comments';
@import "components/forms"; @import 'components/forms';
@import "components/wp-classes"; @import 'components/wp-classes';
@import "layouts/header"; @import 'layouts/header';
@import "layouts/sidebar"; @import 'layouts/sidebar';
@import "layouts/footer"; @import 'layouts/footer';
@import "layouts/pages"; @import 'layouts/pages';
@import "layouts/posts"; @import 'layouts/posts';
@import "layouts/tinymce"; @import 'layouts/tinymce';