Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
integration
prechecker
Commits
773e68b0
Commit
773e68b0
authored
Sep 21, 2016
by
Dan Poltawski
Browse files
MDL-55071 stylelint: Config & grunt task for scss
Part of MDL-55071
parent
8a40bc36
Changes
3
Hide whitespace changes
Inline
Side-by-side
.stylelintignore
View file @
773e68b0
# Generated by "grunt ignorefiles"
theme/bootstrapbase/style/
theme/boost/scss/preset-*
node_modules/
vendor/
auth/cas/CAS/
...
...
.stylelintrc
View file @
773e68b0
{
"rules": {
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-group"
, "all-nested"
], ignore: ["after-comment"]}
{"except": [ "blockless-group"], ignore: ["after-comment"
, "all-nested"
]}
],
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always-single-line",
"at-rule-no-unknown":
[true, ignoreAtRules: ["extend", "include"]],
"at-rule-no-unknown":
null, # Enabled for non-scss in grunt.
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always-multi-line",
...
...
@@ -57,7 +57,7 @@
"media-query-list-comma-newline-after": "always-multi-line",
"media-query-list-comma-space-after": "always-single-line",
"media-query-list-comma-space-before": "never",
"no-browser-hacks":
[true, { "severity": "warning" }],
"no-browser-hacks":
null, # Enabled for non-scss in grunt.
"no-empty-source": true,
"no-eol-whitespace": true,
"no-extra-semicolons": [true, { "severity": "warning" }],
...
...
@@ -87,7 +87,7 @@
"unit-blacklist": ["pt", "rem"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/
@
/"]}],
"value-keyword-case": ["lower", {"ignoreKeywords": ["/
(@|$)
/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
...
...
Gruntfile.js
View file @
773e68b0
...
...
@@ -192,11 +192,31 @@ module.exports = function(grunt) {
"
selector-type-no-unknown
"
:
null
,
"
length-zero-no-unit
"
:
null
,
"
color-hex-case
"
:
null
,
"
color-hex-length
"
:
null
"
color-hex-length
"
:
null
,
// These rules have to be disabled in .stylelintrc for scss compat.
"
at-rule-no-unknown
"
:
true
,
"
no-browser-hacks
"
:
[
true
,
{
"
severity
"
:
"
warning
"
}]
}
}
},
src
:
[
'
theme/**/*.less
'
]
},
scss
:
{
options
:
{
syntax
:
'
scss
'
,
configOverrides
:
{
rules
:
{
"
unit-blacklist
"
:
null
,
// TODO: alter based on outcome of MDL-56061.
"
declaration-no-important
"
:
null
,
// TODO: to be addressed by MDL-56063.
// TODO: MDL-55165 - Enable the following rules once we make output-changing changes to scss.
"
declaration-block-no-duplicate-properties
"
:
null
,
"
declaration-block-no-ignored-properties
"
:
null
,
"
declaration-block-no-shorthand-property-overrides
"
:
null
,
"
property-no-unknown
"
:
null
,
}
},
},
src
:
[
'
*/**/*.scss
'
]
}
}
});
...
...
@@ -211,7 +231,11 @@ module.exports = function(grunt) {
var
eslintIgnores
=
[
'
# Generated by "grunt ignorefiles"
'
,
'
*/**/yui/src/*/meta/
'
,
'
*/**/build/
'
].
concat
(
thirdPartyPaths
);
grunt
.
file
.
write
(
'
.eslintignore
'
,
eslintIgnores
.
join
(
'
\n
'
));
// Generate .stylelintignore.
var
stylelintIgnores
=
[
'
# Generated by "grunt ignorefiles"
'
,
'
theme/bootstrapbase/style/
'
].
concat
(
thirdPartyPaths
);
var
stylelintIgnores
=
[
'
# Generated by "grunt ignorefiles"
'
,
'
theme/bootstrapbase/style/
'
,
'
theme/boost/scss/preset-*
'
].
concat
(
thirdPartyPaths
);
grunt
.
file
.
write
(
'
.stylelintignore
'
,
stylelintIgnores
.
join
(
'
\n
'
));
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment