-
Notifications
You must be signed in to change notification settings - Fork 11
/
sass.js
50 lines (46 loc) · 1.8 KB
/
sass.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* Copyright 2017-present Palantir Technologies
* @license Apache-2.0
*/
// Additional configuration for Sass code.
// Be sure to install `stylelint-scss` for the `scss/*` rules (it's only optional if you're not using Sass).
const namingPattern = require("./stylelint.config.js").namingPattern;
module.exports = {
"plugins": [
"stylelint-scss",
],
customSyntax: "postcss-scss",
"rules": {
"at-rule-empty-line-before": ["always", {
except: ["blockless-after-blockless", "first-nested"],
ignore: ["after-comment"],
// allow @else to come on same line as closing @if brace
ignoreAtRules: ["import", "else"],
}],
"at-rule-no-unknown": [true, {
ignoreAtRules: [
// additional scss at-rules:
"content", "each", "else", "error", "extend", "for", "function", "if", "include", "mixin", "return", "use",
],
}],
"scss/at-extend-no-missing-placeholder": true,
"scss/at-function-pattern": namingPattern,
"scss/load-no-partial-leading-underscore": true,
"scss/at-import-partial-extension-disallowed-list": ["scss"],
"scss/at-mixin-argumentless-call-parentheses": "always",
"scss/at-mixin-pattern": namingPattern,
"scss/dollar-variable-no-missing-interpolation": true,
"scss/dollar-variable-pattern": namingPattern,
"scss/media-feature-value-dollar-variable": "always",
"scss/percent-placeholder-pattern": namingPattern,
"scss/selector-no-redundant-nesting-selector": true,
// The rules below aren't exactly appropriate for LESS/SCSS. Following the stylelint-config-recommended-scss config,
// we disable them.
"annotation-no-unknown": null,
"at-rule-no-unknown": null,
"comment-no-empty": null,
"function-no-unknown": null,
"import-notation": null,
"media-query-no-invalid": null,
},
}