|
| 1 | +--- |
| 2 | +######################### |
| 3 | +## Sample Sass Lint File |
| 4 | +######################### |
| 5 | + |
| 6 | +# Linter Options |
| 7 | +# see: https://github.com/sasstools/sass-lint/tree/develop/docs/options |
| 8 | +options: |
| 9 | + # Don't merge default rules |
| 10 | + merge-default-rules: false |
| 11 | + # Set the formatter to 'html' |
| 12 | + # formatter: html |
| 13 | + # Output file instead of logging results |
| 14 | + # output-file: 'linters/sass-lint.html' |
| 15 | + # Raise an error if more than 42 warnings are generated |
| 16 | + max-warnings: 42 |
| 17 | + |
| 18 | +# File Options |
| 19 | +files: |
| 20 | + include: 'src/**/*.s+(a|c)ss' |
| 21 | + # ignore: |
| 22 | + # - 'build/**/*.*' |
| 23 | + # - 'dist/**/*.*' |
| 24 | + # - 'node_modules/**/*.*' |
| 25 | + |
| 26 | +# Rule Configuration |
| 27 | +# see: https://github.com/sasstools/sass-lint/blob/develop/docs/rules |
| 28 | +rules: |
| 29 | + # Extends |
| 30 | + extends-before-mixins: 2 |
| 31 | + extends-before-declarations: 2 |
| 32 | + placeholder-in-extend: 2 |
| 33 | + |
| 34 | + # Mixins |
| 35 | + mixins-before-declarations: 2 |
| 36 | + |
| 37 | + # Line Spacing |
| 38 | + one-declaration-per-line: 1 |
| 39 | + empty-line-between-blocks: 0 |
| 40 | + single-line-per-selector: 2 |
| 41 | + |
| 42 | + # Disallows |
| 43 | + no-attribute-selectors: 0 |
| 44 | + no-color-hex: 0 |
| 45 | + no-color-keywords: 1 |
| 46 | + no-color-literals: 1 |
| 47 | + no-combinators: 0 |
| 48 | + no-css-comments: 2 |
| 49 | + no-debug: 2 |
| 50 | + no-disallowed-properties: 0 |
| 51 | + no-duplicate-properties: 2 |
| 52 | + no-empty-rulesets: 1 |
| 53 | + no-extends: 0 |
| 54 | + no-ids: 0 |
| 55 | + no-important: 1 |
| 56 | + no-invalid-hex: 2 |
| 57 | + no-mergeable-selectors: 1 |
| 58 | + no-misspelled-properties: 1 |
| 59 | + no-qualifying-elements: 1 |
| 60 | + no-trailing-whitespace: 2 |
| 61 | + no-trailing-zero: 1 |
| 62 | + no-transition-all: 1 |
| 63 | + no-universal-selectors: 0 |
| 64 | + no-url-domains: 1 |
| 65 | + no-url-protocols: 1 |
| 66 | + no-vendor-prefixes: 0 |
| 67 | + no-warn: 1 |
| 68 | + property-units: 0 |
| 69 | + |
| 70 | + # Nesting |
| 71 | + declarations-before-nesting: 1 |
| 72 | + force-attribute-nesting: 1 |
| 73 | + force-element-nesting: 1 |
| 74 | + force-pseudo-nesting: 1 |
| 75 | + |
| 76 | + # Name Formats |
| 77 | + class-name-format: 1 |
| 78 | + function-name-format: |
| 79 | + - 2 |
| 80 | + - allow-leading-underscore: true |
| 81 | + convention: snakecase |
| 82 | + id-name-format: 1 |
| 83 | + mixin-name-format: 2 |
| 84 | + placeholder-name-format: 1 |
| 85 | + variable-name-format: 2 |
| 86 | + |
| 87 | + # Style Guide |
| 88 | + attribute-quotes: 1 |
| 89 | + bem-depth: 0 |
| 90 | + border-zero: 1 |
| 91 | + brace-style: 2 |
| 92 | + clean-import-paths: |
| 93 | + - 0 |
| 94 | + - leading-underscore: true |
| 95 | + empty-args: 1 |
| 96 | + hex-length: 2 |
| 97 | + hex-notation: 2 |
| 98 | + indentation: |
| 99 | + - 2 |
| 100 | + - size: 2 |
| 101 | + leading-zero: 0 |
| 102 | + max-line-length: |
| 103 | + - 2 |
| 104 | + - length: 140 |
| 105 | + max-file-line-count: |
| 106 | + - 1 |
| 107 | + - length: 1000 |
| 108 | + nesting-depth: |
| 109 | + - 1 |
| 110 | + - max-depth: 4 |
| 111 | + property-sort-order: 1 |
| 112 | + pseudo-element: 2 |
| 113 | + quotes: 1 |
| 114 | + shorthand-values: 2 |
| 115 | + url-quotes: 2 |
| 116 | + variable-for-property: 1 |
| 117 | + zero-unit: 2 |
| 118 | + |
| 119 | + # Inner Spacing |
| 120 | + space-after-comma: 0 |
| 121 | + space-before-colon: 1 |
| 122 | + space-after-colon: 1 |
| 123 | + space-before-brace: 2 |
| 124 | + space-before-bang: 2 |
| 125 | + space-after-bang: 1 |
| 126 | + space-between-parens: 1 |
| 127 | + space-around-operator: 2 |
| 128 | + |
| 129 | + # Final Items |
| 130 | + trailing-semicolon: 2 |
| 131 | + final-newline: 2 |
0 commit comments