scss_lint-govuk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/.scss-lint.yml +208 -0
  3. data/CHANGELOG.md +3 -0
  4. data/LICENSE.md +21 -0
  5. data/README.md +30 -0
  6. metadata +88 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3460011b6c1ce8f8d4b37e7ac5574ee39b12cdd6685d81aba9d96088b9e70b36
4
+ data.tar.gz: 2268e2c6b68c12d8bbbb07d65f90ab0c214bab0335105f7c1b2a0d06973f4c39
5
+ SHA512:
6
+ metadata.gz: 15190061bcf818e6e91e29539d4084a9f9cbd3ecacbb1c9286b5aa99d5a6c55f510e8dbc8c499eb5f5b2ad560caed7db040c2c3a933c64b9a7e503dccbc27afe
7
+ data.tar.gz: 4f531a6309e00e496d8766a2e573764f15cf14c03f2c473f65f9ff5de8ad348ef42954300e36676a5114cf88eb299ee1e1a0e9dd1bb2fd48b0395a081784e729
data/.scss-lint.yml ADDED
@@ -0,0 +1,208 @@
1
+ # Default severity of all linters.
2
+ severity: warning
3
+
4
+ linters:
5
+ BangFormat:
6
+ enabled: true
7
+ space_before_bang: true
8
+ space_after_bang: false
9
+
10
+ BemDepth:
11
+ enabled: false
12
+
13
+ BorderZero:
14
+ enabled: false
15
+
16
+ ChainedClasses:
17
+ enabled: false
18
+
19
+ ColorKeyword:
20
+ enabled: true
21
+
22
+ ColorVariable:
23
+ enabled: true
24
+
25
+ Comment:
26
+ enabled: true
27
+ style: silent
28
+
29
+ DebugStatement:
30
+ enabled: true
31
+
32
+ DeclarationOrder:
33
+ enabled: false
34
+
35
+ DisableLinterReason:
36
+ enabled: false
37
+
38
+ DuplicateProperty:
39
+ enabled: true
40
+
41
+ ElsePlacement:
42
+ enabled: true
43
+ style: same_line
44
+
45
+ EmptyLineBetweenBlocks:
46
+ enabled: true
47
+ ignore_single_line_blocks: true
48
+
49
+ EmptyRule:
50
+ enabled: true
51
+
52
+ ExtendDirective:
53
+ enabled: false
54
+
55
+ FinalNewline:
56
+ enabled: true
57
+ present: true
58
+
59
+ HexLength:
60
+ enabled: false
61
+
62
+ HexNotation:
63
+ enabled: false # colours should be variables
64
+ style: lowercase
65
+
66
+ HexValidation:
67
+ enabled: true
68
+
69
+ IdSelector:
70
+ enabled: true
71
+
72
+ ImportantRule:
73
+ enabled: false
74
+
75
+ ImportPath:
76
+ enabled: true
77
+ leading_underscore: false
78
+ filename_extension: false
79
+
80
+ Indentation:
81
+ enabled: true
82
+ allow_non_nested_indentation: false
83
+ character: space
84
+ width: 2
85
+
86
+ LeadingZero:
87
+ enabled: false
88
+
89
+ MergeableSelector:
90
+ enabled: false
91
+
92
+ NameFormat:
93
+ enabled: true
94
+ allow_leading_underscore: true
95
+ convention: hyphenated_lowercase
96
+
97
+ NestingDepth:
98
+ enabled: true
99
+ max_depth: 5 # ideally 3
100
+ ignore_parent_selectors: true
101
+
102
+ PlaceholderInExtend:
103
+ enabled: true
104
+
105
+ PropertyCount:
106
+ enabled: false
107
+
108
+ PropertySortOrder:
109
+ enabled: false
110
+
111
+ PropertySpelling:
112
+ enabled: false # avoid false positives on new CSS features
113
+
114
+ PropertyUnits:
115
+ enabled: false
116
+
117
+ PseudoElement:
118
+ enabled: false # using `:after` is acceptable for older browsers
119
+
120
+ QualifyingElement:
121
+ enabled: true
122
+ allow_element_with_attribute: true # eg elements based on aria attributes
123
+ allow_element_with_class: false
124
+ allow_element_with_id: false
125
+
126
+ SelectorDepth:
127
+ enabled: false
128
+
129
+ SelectorFormat:
130
+ enabled: true
131
+ convention: hyphenated_BEM
132
+
133
+ Shorthand:
134
+ enabled: false
135
+ allowed_shorthands: [1, 2, 3]
136
+
137
+ SingleLinePerProperty:
138
+ enabled: true
139
+ allow_single_line_rule_sets: true
140
+
141
+ SingleLinePerSelector:
142
+ enabled: true
143
+
144
+ SpaceAfterComma:
145
+ enabled: true
146
+ style: one_space
147
+
148
+ SpaceAfterPropertyColon:
149
+ enabled: true
150
+ style: one_space
151
+
152
+ SpaceAfterPropertyName:
153
+ enabled: true
154
+
155
+ SpaceAfterVariableName:
156
+ enabled: true
157
+
158
+ SpaceAroundOperator:
159
+ enabled: true
160
+ style: one_space
161
+
162
+ SpaceBeforeBrace:
163
+ enabled: true
164
+ style: space
165
+ allow_single_line_padding: true
166
+
167
+ SpaceBetweenParens:
168
+ enabled: false
169
+
170
+ StringQuotes:
171
+ enabled: false
172
+
173
+ TrailingSemicolon:
174
+ enabled: true
175
+
176
+ TrailingWhitespace:
177
+ enabled: true
178
+
179
+ TrailingZero:
180
+ enabled: true
181
+
182
+ TransitionAll:
183
+ enabled: true
184
+
185
+ UnnecessaryMantissa:
186
+ enabled: true
187
+
188
+ UnnecessaryParentReference:
189
+ enabled: true
190
+
191
+ UrlFormat:
192
+ enabled: true
193
+
194
+ UrlQuotes:
195
+ enabled: true
196
+
197
+ VariableForProperty:
198
+ enabled: false
199
+ properties: []
200
+
201
+ VendorPrefix:
202
+ enabled: false
203
+
204
+ ZeroUnit:
205
+ enabled: true
206
+
207
+ Compass::*:
208
+ enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ # 0.1.0
2
+
3
+ * Initial release with previous work from `govuk-lint`
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License(MIT)
2
+
3
+ Copyright (C) 2015 Crown Copyright (Government Digital Service)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # scss-lint GOV.UK
2
+
3
+ This repository provides common [scss-lint][scss-lint] rules for use with GOV.UK SCSS projects to comply with our [style guides][guides].
4
+
5
+ ## Installation
6
+
7
+ Add `scss_lint-govuk` to your Gemfile and then run `bundle install`:
8
+
9
+ ```ruby
10
+ # Gemfile
11
+ gem 'scss_lint-govuk'
12
+ ```
13
+
14
+ Add the plugin to your project's scss-lint config:
15
+
16
+ ```yaml
17
+ # .scss-lint.yml
18
+ plugin_gems: ['scss_lint-govuk']
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Run scss-lint:
24
+
25
+ ```sh
26
+ bundle exec scss-lint
27
+ ```
28
+
29
+ [guides]: https://github.com/alphagov/styleguides
30
+ [scss-lint]: https://github.com/brigade/scss-lint
metadata ADDED
@@ -0,0 +1,88 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: scss_lint-govuk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Government Digital Service
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-11-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop-govuk
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: scss_lint
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Shared scss-lint rules for SASS projects in GOV.UK
56
+ email:
57
+ - govuk-dev@digital.cabinet-office.gov.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".scss-lint.yml"
63
+ - CHANGELOG.md
64
+ - LICENSE.md
65
+ - README.md
66
+ homepage: https://github.com/alphagov/scss-lint-govuk
67
+ licenses: []
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubygems_version: 3.0.3
85
+ signing_key:
86
+ specification_version: 4
87
+ summary: scss-lint GOV.UK plugin
88
+ test_files: []