Skip to content

Commit 6318d94

Browse files
committed
Added linting scaffold and dusting off the old code
* Lint (#274) * added basic linting * updated html proofer * updated travis to include scss-lint This is a starting point for refactoring the scss on the site as mentioned in #273 * update to jekyll 3.0 * updated author bios
1 parent 3a08ea8 commit 6318d94

13 files changed

+285
-117
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ _site
22
.DS_Store
33
Gemfile.lock
44
.sass-cache
5+
tmp/
6+
npm-debug.log

.scss-lint.yml

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
scss_files: "_sass/**/*.scss"
2+
3+
linters:
4+
BangFormat:
5+
enabled: false
6+
space_before_bang: true
7+
space_after_bang: false
8+
9+
BemDepth:
10+
enabled: false
11+
max_elements: 1
12+
13+
BorderZero:
14+
enabled: false
15+
convention: zero # or `none`
16+
17+
ChainedClasses:
18+
enabled: false
19+
20+
ColorKeyword:
21+
enabled: false
22+
23+
ColorVariable:
24+
enabled: false
25+
26+
Comment:
27+
enabled: false
28+
style: silent
29+
30+
DebugStatement:
31+
enabled: false
32+
33+
DeclarationOrder:
34+
enabled: false
35+
36+
DisableLinterReason:
37+
enabled: false
38+
39+
DuplicateProperty:
40+
enabled: false
41+
42+
ElsePlacement:
43+
enabled: false
44+
style: same_line # or 'new_line'
45+
46+
EmptyLineBetweenBlocks:
47+
enabled: false
48+
ignore_single_line_blocks: true
49+
50+
EmptyRule:
51+
enabled: false
52+
53+
ExtendDirective:
54+
enabled: false
55+
56+
FinalNewline:
57+
enabled: false
58+
present: true
59+
60+
HexLength:
61+
enabled: false
62+
style: short # or 'long'
63+
64+
HexNotation:
65+
enabled: false
66+
style: lowercase # or 'uppercase'
67+
68+
HexValidation:
69+
enabled: false
70+
71+
IdSelector:
72+
enabled: false
73+
74+
ImportantRule:
75+
enabled: false
76+
77+
ImportPath:
78+
enabled: false
79+
leading_underscore: false
80+
filename_extension: false
81+
82+
Indentation:
83+
enabled: false
84+
allow_non_nested_indentation: false
85+
character: space # or 'tab'
86+
width: 2
87+
88+
LeadingZero:
89+
enabled: false
90+
style: exclude_zero # or 'include_zero'
91+
92+
MergeableSelector:
93+
enabled: false
94+
force_nesting: true
95+
96+
NameFormat:
97+
enabled: false
98+
allow_leading_underscore: true
99+
convention: hyphenated_lowercase # or 'camel_case', or 'snake_case', or a regex pattern
100+
101+
NestingDepth:
102+
enabled: false
103+
max_depth: 3
104+
ignore_parent_selectors: false
105+
106+
PlaceholderInExtend:
107+
enabled: false
108+
109+
PrivateNamingConvention:
110+
enabled: false
111+
prefix: _
112+
113+
PropertyCount:
114+
enabled: false
115+
include_nested: false
116+
max_properties: 10
117+
118+
PropertySortOrder:
119+
enabled: false
120+
ignore_unspecified: false
121+
min_properties: 2
122+
separate_groups: false
123+
124+
PropertySpelling:
125+
enabled: false
126+
extra_properties: []
127+
disabled_properties: []
128+
129+
PropertyUnits:
130+
enabled: false
131+
global: [
132+
'ch', 'em', 'ex', 'rem', # Font-relative lengths
133+
'cm', 'in', 'mm', 'pc', 'pt', 'px', 'q', # Absolute lengths
134+
'vh', 'vw', 'vmin', 'vmax', # Viewport-percentage lengths
135+
'deg', 'grad', 'rad', 'turn', # Angle
136+
'ms', 's', # Duration
137+
'Hz', 'kHz', # Frequency
138+
'dpi', 'dpcm', 'dppx', # Resolution
139+
'%'] # Other
140+
properties: {}
141+
142+
PseudoElement:
143+
enabled: false
144+
145+
QualifyingElement:
146+
enabled: false
147+
allow_element_with_attribute: false
148+
allow_element_with_class: false
149+
allow_element_with_id: false
150+
151+
SelectorDepth:
152+
enabled: false
153+
max_depth: 3
154+
155+
SelectorFormat:
156+
enabled: false
157+
convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern
158+
159+
Shorthand:
160+
enabled: false
161+
allowed_shorthands: [1, 2, 3]
162+
163+
SingleLinePerProperty:
164+
enabled: false
165+
allow_single_line_rule_sets: true
166+
167+
SingleLinePerSelector:
168+
enabled: false
169+
170+
SpaceAfterComma:
171+
enabled: false
172+
style: one_space # or 'no_space', or 'at_least_one_space'
173+
174+
SpaceAfterPropertyColon:
175+
enabled: false
176+
style: one_space # or 'no_space', or 'at_least_one_space', or 'aligned'
177+
178+
SpaceAfterPropertyName:
179+
enabled: false
180+
181+
SpaceAfterVariableColon:
182+
enabled: false
183+
style: one_space # or 'no_space', 'at_least_one_space' or 'one_space_or_newline'
184+
185+
SpaceAfterVariableName:
186+
enabled: false
187+
188+
SpaceAroundOperator:
189+
enabled: false
190+
style: one_space # or 'at_least_one_space', or 'no_space'
191+
192+
SpaceBeforeBrace:
193+
enabled: false
194+
style: space # or 'new_line'
195+
allow_single_line_padding: false
196+
197+
SpaceBetweenParens:
198+
enabled: false
199+
spaces: 0
200+
201+
StringQuotes:
202+
enabled: false
203+
style: single_quotes # or double_quotes
204+
205+
TrailingSemicolon:
206+
enabled: false
207+
208+
TrailingWhitespace:
209+
enabled: false
210+
211+
TrailingZero:
212+
enabled: false
213+
214+
TransitionAll:
215+
enabled: false
216+
217+
UnnecessaryMantissa:
218+
enabled: false
219+
220+
UnnecessaryParentReference:
221+
enabled: false
222+
223+
UrlFormat:
224+
enabled: false
225+
226+
UrlQuotes:
227+
enabled: false
228+
229+
VariableForProperty:
230+
enabled: false
231+
properties: []
232+
233+
VendorPrefix:
234+
enabled: false
235+
identifier_list: base
236+
additional_identifiers: []
237+
excluded_identifiers: []
238+
239+
ZeroUnit:
240+
enabled: false
241+
242+
Compass::*:
243+
enabled: false

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: ruby
22
rvm:
33
- 2.1
4-
script: bundle exec rake test
4+
script:
5+
- bundle exec rake test
6+
- bundle exec rake scss_lint
57
sudo: false
68
env:
79
global:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Thanks for wanting to contribute to [Open Design](http://opendesign.foundation).
44

55
## How to Contact Us
66

7-
The fastest way to get ahold of us is to ping us on twitter [@designopen](http://twitter.com/designopen) [@garthdb](http://twitter.com/garthdb) [@una](http://twitter.com/una) [@terracomma](http://twitter.com/terracomma). If you'd prefer, you could jump into our Slack team; [join here](https://osd-slackin.herokuapp.com/). If you want to talk about an issue or propose a feature, start a [GitHub issue](https://github.com/DesignOpen/designopen.github.io/issues). Finally, if you like email, you can contact Garth at garthdb@gmail.com, he's probably looking for a distraction from something he should be doing.
7+
The fastest way to get ahold of us is to ping us on twitter [@designopen](http://twitter.com/designopen) [@garthdb](http://twitter.com/garthdb) [@una](http://twitter.com/una) [@terracomma](http://twitter.com/moodycomputer). If you'd prefer, you could jump into our Slack team; [join here](https://osd-slackin.herokuapp.com/). If you want to talk about an issue or propose a feature, start a [GitHub issue](https://github.com/DesignOpen/designopen.github.io/issues). Finally, if you like email, you can contact Garth at garthdb@gmail.com, he's probably looking for a distraction from something he should be doing.
88

99
## How to Contribute
1010

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ gem 'github-pages'
55
group :test do
66
gem 'rake'
77
gem 'html-proofer'
8+
gem 'scss_lint'
89
end

Rakefile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ require 'rake'
44
require 'yaml'
55
require 'fileutils'
66
require 'rbconfig'
7-
require 'html/proofer'
7+
require 'html-proofer'
8+
require 'scss_lint/rake_task'
89

910
# == Configuration =============================================================
1011

@@ -201,5 +202,28 @@ end
201202
desc "build and test website"
202203
task :test do
203204
sh "bundle exec jekyll build"
204-
HTML::Proofer.new("./_site", {:href_ignore=> ['http://localhost:4000','http://linkedin.com/in/sachabest','http://www.linkedin.com/pub/david-yuxuan-wei/95/488/77/','http://www.linkedin.com/pub/elaine-hwang/9b/830/739','https://www.linkedin.com/in/ngovkevin'], :typhoeus => { :followlocation => true, :ssl_verifypeer => false, :headers => { 'User-Agent' => 'html-proofer' } }}).run
205+
HTMLProofer.check_directory("./_site-test", {
206+
:empty_alt_ignore => true,
207+
:url_ignore => [
208+
'http://localhost:4000',
209+
'http://linkedin.com/in/sachabest',
210+
'http://www.linkedin.com/pub/david-yuxuan-wei/95/488/77/',
211+
'http://www.linkedin.com/pub/elaine-hwang/9b/830/739',
212+
'https://www.linkedin.com/in/ngovkevin'
213+
],
214+
:cache => {
215+
:timeframe => '1d'
216+
},
217+
:typhoeus => {
218+
:followlocation => true,
219+
:ssl_verifypeer => false,
220+
:headers => { 'User-Agent' => 'html-proofer' }
221+
}
222+
}).run
223+
end
224+
225+
226+
# rake lint
227+
desc "Lint SCSS"
228+
SCSSLint::RakeTask.new do |t|
205229
end

_config.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
permalink: /:categories/:title/
2-
highlighter: pygments
2+
highlighter: rouge
33
url: http://opendesign.foundation
44
name: Open Source Design
55
excerpt_separator: <!--more-->
66
markdown: kramdown
7+
gems:
8+
- jekyll-sitemap
79
exclude: [vendor]
810
sass:
911
sass_dir: _sass
@@ -30,15 +32,15 @@ authors:
3032
web: http://unakravets.com/
3133
twitter: una
3234
github: una
33-
bio: 'Front end developer/designer at IBM Watson. Sassvocate and <a href="http://una.github.io">blogger</a>.'
35+
bio: 'UI engineer <a href="http://do.co/welcome">DigitalOcean</a>. Community builder, technical writer, & cohost of <a href="http://toolsday.io">Toolsday</a>.'
3436
garthdb:
3537
display_name: Garth Braithwaite
3638
gravatar: b5cf6e112eeee572d722743dea924487
3739
email: garthdb@gmail.com
3840
web: http://www.garthdb.com/
3941
twitter: garthdb
4042
github: garthdb
41-
bio: 'Hybrid at Adobe. Host of <a href="http://webfriends.io">Web Friends</a>.'
43+
bio: 'Product Designer? and Front End Developer on <a href="http://phonegap.com">PhoneGap</a> at <a href="http://adobe.com">Adobe</a>. <a href="http://opendesign.foundation">The Open Design Foundation</a> Founder.'
4244
ttimsmith:
4345
display_name: Tim Smith
4446
gravatar: febbffcb54abe1be1435720fc2268237
@@ -62,7 +64,7 @@ authors:
6264
web: http://moody.coffee/
6365
twitter: terracomma
6466
github: terracomma
65-
bio: 'Designer and Developer.'
67+
bio: 'Designer & Developer. Product designer at IBM. Core Contributor <a href="http://opendesign.foundation/">The Open Design Foundation</a>. Licensed Intoxicologist.'
6668
vitorio:
6769
display_name: Vitorio Miliano
6870
gravatar: 1b2ea3fc983558c15216a609af35f709

articles/_posts/2014-10-24-facebook-open-academy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Open Design is excited to announce that we have been invited to participate in [
1111

1212
<img src="/img/foa_1.jpg" width="100%" height="auto" alt="picture of students working"/>
1313

14-
I'm pleased to introduce [David Wei](http://www.linkedin.com/pub/david-yuxuan-wei/95/488/77/), [Elaine Hwang](http://www.linkedin.com/pub/elaine-hwang/9b/830/739), and [Kevin Ngo](https://www.linkedin.com/in/ngovkevin) from <abbr title="University of California San Diego">UCSD</abbr>, as well as [Becca Hallac](http://rebeccahallac.com) and [Sacha Best](http://linkedin.com/in/sachabest) from <abbr title="University of Pennsylvania">UPENN</abbr> as our newest contributors. They have decided to tackle the [Open Design job board](https://github.com/DesignOpen/board). [Chris Moody](http://twitter.com/terracomma) and I had the pleasure of participating in an initial orientation and project sprint with them in person at Facebook's headquarters earlier this month, and they are fantastic.
14+
I'm pleased to introduce [David Wei](http://www.linkedin.com/pub/david-yuxuan-wei/95/488/77/), [Elaine Hwang](http://www.linkedin.com/pub/elaine-hwang/9b/830/739), and [Kevin Ngo](https://www.linkedin.com/in/ngovkevin) from <abbr title="University of California San Diego">UCSD</abbr>, as well as [Becca Hallac](http://rebeccahallac.com) and [Sacha Best](http://linkedin.com/in/sachabest) from <abbr title="University of Pennsylvania">UPENN</abbr> as our newest contributors. They have decided to tackle the [Open Design job board](https://github.com/DesignOpen/board). [Chris Moody](http://twitter.com/moodycomputer) and I had the pleasure of participating in an initial orientation and project sprint with them in person at Facebook's headquarters earlier this month, and they are fantastic.
1515

1616
<h2>2014 Group</h2>
1717
<div class="guys">
@@ -46,4 +46,4 @@ I'm pleased to introduce [David Wei](http://www.linkedin.com/pub/david-yuxuan-we
4646
<img src="/img/foa_2.jpg" width="100%" height="auto" alt="picture of students working"/>
4747
<h2>About Facebook Open Academy</h2>
4848
<p>Open source is a huge part of Facebook engineering. We also believe that contributing to open source projects is one of the best ways a student can prepare for a job in the industry. Open Academy is a program designed to provide a practical, applied software engineering experience as part of a university student’s CS education.</p>
49-
<p>Source: <a href="https://www.facebook.com/notes/facebook-engineering/facebook-open-academy-bringing-open-source-to-cs-curricula/10151806121378920">Facebook&trade;</a></p>
49+
<p>Source: <a href="https://www.facebook.com/OpenAcademyProgram/">Facebook</a></p>

0 commit comments

Comments
 (0)