|
| 1 | +# Sample Configs |
| 2 | +# - https://github.com/sasstools/sass-lint/blob/develop/docs/sass-lint.yml |
| 3 | +# - https://github.com/sasstools/gulp-sass-lint/blob/master/tests/.sass-lint.yml |
| 4 | + |
| 5 | +# Sass Lint Rules |
| 6 | +# - https://github.com/sasstools/sass-lint/tree/develop/docs/rules |
| 7 | + |
| 8 | +# Severity |
| 9 | +# - 0: turns rule off |
| 10 | +# - 1: set as a warning |
| 11 | +# - 2: set to error |
| 12 | + |
| 13 | +# File Options |
| 14 | +files: |
| 15 | + ignore: |
| 16 | + - 'sass/vendor/**/*.scss' |
| 17 | + - 'sass/tests/**/*.scss' |
| 18 | + - 'bourbon/app/**/*.scss' |
| 19 | + - 'bourbon-neat/app/**/*.scss' |
| 20 | + |
| 21 | +# Rule Configuration |
| 22 | +rules: |
| 23 | + # Extends |
| 24 | + placeholder-in-extend: 0 |
| 25 | + |
| 26 | + # Mixins |
| 27 | + mixins-before-declarations: |
| 28 | + - 1 |
| 29 | + - |
| 30 | + exclude: ['media'] # except @include media(); |
| 31 | + |
| 32 | + # Line Spacing |
| 33 | + empty-line-between-blocks: |
| 34 | + - 1 |
| 35 | + - |
| 36 | + allow-single-line-rulesets: false |
| 37 | + |
| 38 | + # Disallows |
| 39 | + no-color-literals: |
| 40 | + - 1 |
| 41 | + - |
| 42 | + allow-rgba: true |
| 43 | + no-debug: 0 |
| 44 | + no-ids: 0 |
| 45 | + no-mergeable-selectors: 0 |
| 46 | + no-qualifying-elements: |
| 47 | + - 1 |
| 48 | + - |
| 49 | + allow-element-with-attribute: true |
| 50 | + allow-element-with-class: false |
| 51 | + allow-element-with-id: false |
| 52 | + no-vendor-prefixes: 0 |
| 53 | + no-warn: 0 |
| 54 | + |
| 55 | + # Nesting |
| 56 | + force-attribute-nesting: 0 |
| 57 | + force-element-nesting: 0 |
| 58 | + force-pseudo-nesting: 0 |
| 59 | + |
| 60 | + # Name Formats |
| 61 | + function-name-format: |
| 62 | + - 1 |
| 63 | + - |
| 64 | + convention-explanation: Please use hyphenated lowercase for function names. Also, you may use a leading underscore if you prefer. |
| 65 | + mixin-name-format: |
| 66 | + - 1 |
| 67 | + - |
| 68 | + convention-explanation: Please use hyphenated lowercase for mixin names. Also, you may use a leading underscore if you prefer. |
| 69 | + placeholder-name-format: |
| 70 | + - 1 |
| 71 | + - |
| 72 | + convention-explanation: Please use hyphenated lowercase for placeholder names. Also, you may use a leading underscore if you prefer. |
| 73 | + variable-name-format: |
| 74 | + - 1 |
| 75 | + - |
| 76 | + allow-leading-underscore: false |
| 77 | + convention-explanation: Please use hyphenated lowercase for variable names. No leading underscore is allowed. |
| 78 | + |
| 79 | + # Style Guide |
| 80 | + attribute-quotes: 1 |
| 81 | + border-zero: 0 |
| 82 | + brace-style: |
| 83 | + - 1 |
| 84 | + - |
| 85 | + style: 1tbs |
| 86 | + allow-single-line: false |
| 87 | + class-name-format: |
| 88 | + - 1 |
| 89 | + - |
| 90 | + allow-leading-underscore: false |
| 91 | + convention-explanation: Please use hypenated lowercase for class names, and without a leading underscore. If you find a WordPress core condition that conflicts with this convention feel free to modify and extend the ignore option. |
| 92 | + ignore: ['current_page_item', 'widget_search'] # ignore selectors declared by WordPress |
| 93 | + |
| 94 | + empty-args: 0 |
| 95 | + hex-length: 1 |
| 96 | + hex-notation: 1 |
| 97 | + id-name-format: |
| 98 | + - 1 |
| 99 | + - |
| 100 | + convention-explanation: Please try to use hyphenated lowercase ID name format. If overriding a plugin that does not use this format then please ignore or extend the list of ignore option. |
| 101 | + indentation: |
| 102 | + - 1 |
| 103 | + - |
| 104 | + size: tab |
| 105 | + leading-zero: |
| 106 | + - 1 |
| 107 | + - |
| 108 | + include: true |
| 109 | + |
| 110 | + nesting-depth: |
| 111 | + - 1 |
| 112 | + - |
| 113 | + max-depth: 3 |
| 114 | + |
| 115 | + property-units: |
| 116 | + - 1 |
| 117 | + - |
| 118 | + per-property: { width: ['rem', 'vw'], height: ['rem', 'vh'], margin: ['rem'], padding: ['rem'] } |
| 119 | + |
| 120 | + quotes: |
| 121 | + - 1 |
| 122 | + - |
| 123 | + style: double |
| 124 | + |
| 125 | + shorthand-values: |
| 126 | + - 1 |
| 127 | + - |
| 128 | + allowed-shorthands: |
| 129 | + - 1 |
| 130 | + - 2 |
| 131 | + |
| 132 | + # Inner Spacing |
| 133 | + space-between-parens: 0 |
| 134 | + |
| 135 | + # Final Items |
| 136 | + final-newline: 0 |
| 137 | + |
| 138 | + no-misspelled-properties: |
| 139 | + - 1 |
| 140 | + - |
| 141 | + 'extra-properties': |
| 142 | + - '-webkit-overflow-scrolling' |
0 commit comments