Skip to content

Commit bf25926

Browse files
Add CSScomb and Sass Lint, fix linter errors
1 parent f7d66e6 commit bf25926

31 files changed

+1261
-1061
lines changed

.csscomb.json

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
{
2+
"exclude": [
3+
".git/**",
4+
"node_modules/**",
5+
"bower_components/**"
6+
],
7+
"remove-empty-rulesets": true,
8+
"always-semicolon": true,
9+
"color-case": "lower",
10+
"block-indent": " ",
11+
"color-shorthand": true,
12+
"element-case": "lower",
13+
"eof-newline": true,
14+
"leading-zero": false,
15+
"quotes": "single",
16+
"space-before-colon": "",
17+
"space-after-colon": " ",
18+
"space-before-combinator": " ",
19+
"space-after-combinator": " ",
20+
"space-between-declarations": "\n",
21+
"space-before-opening-brace": " ",
22+
"space-after-opening-brace": "\n",
23+
"space-after-selector-delimiter": "\n",
24+
"space-before-selector-delimiter": "",
25+
"space-before-closing-brace": "\n",
26+
"strip-spaces": true,
27+
"tab-size": true,
28+
"unitless-zero": true,
29+
"vendor-prefix-align": true,
30+
"sort-order": [
31+
[
32+
"$variable",
33+
"$include"
34+
],
35+
[
36+
"display",
37+
"position",
38+
"top",
39+
"right",
40+
"bottom",
41+
"left",
42+
43+
"columns",
44+
"column-gap",
45+
"column-fill",
46+
"column-rule",
47+
"column-span",
48+
"column-count",
49+
"column-width",
50+
51+
"float",
52+
"clear",
53+
54+
"transform",
55+
"transition",
56+
57+
"animation",
58+
"animation-name",
59+
"animation-duration",
60+
"animation-timing-function",
61+
"animation-delay",
62+
"animation-iteration-count",
63+
"animation-direction",
64+
"animation-fill-mode",
65+
"animation-play-state",
66+
67+
"visibility",
68+
"opacity",
69+
"z-index",
70+
71+
"margin",
72+
"margin-top",
73+
"margin-right",
74+
"margin-bottom",
75+
"margin-left",
76+
77+
"outline",
78+
79+
"border",
80+
"border-top",
81+
"border-right",
82+
"border-bottom",
83+
"border-left",
84+
"border-width",
85+
"border-top-width",
86+
"border-right-width",
87+
"border-bottom-width",
88+
"border-left-width",
89+
90+
"border-style",
91+
"border-top-style",
92+
"border-right-style",
93+
"border-bottom-style",
94+
"border-left-style",
95+
96+
"border-radius",
97+
"border-top-left-radius",
98+
"border-top-right-radius",
99+
"border-bottom-left-radius",
100+
"border-bottom-right-radius",
101+
102+
"border-color",
103+
"border-top-color",
104+
"border-right-color",
105+
"border-bottom-color",
106+
"border-left-color",
107+
108+
"box-shadow",
109+
110+
"background",
111+
"background-color",
112+
"background-image",
113+
"background-repeat",
114+
"background-position",
115+
"background-size",
116+
"cursor",
117+
118+
"padding",
119+
"padding-top",
120+
"padding-right",
121+
"padding-bottom",
122+
"padding-left",
123+
124+
"width",
125+
"min-width",
126+
"max-width",
127+
128+
"height",
129+
"min-height",
130+
"max-height",
131+
132+
"overflow",
133+
134+
"list-style",
135+
"caption-side",
136+
137+
"table-layout",
138+
"border-collapse",
139+
"border-spacing",
140+
"empty-cells",
141+
142+
"vertical-align",
143+
144+
"text-align",
145+
"text-indent",
146+
"text-transform",
147+
"text-decoration",
148+
"text-rendering",
149+
"text-shadow",
150+
"text-overflow",
151+
152+
"line-height",
153+
"word-spacing",
154+
"letter-spacing",
155+
"white-space",
156+
"color",
157+
158+
"font",
159+
"font-family",
160+
"font-size",
161+
"font-weight",
162+
"font-smoothing",
163+
"font-style",
164+
165+
"content",
166+
"quotes"
167+
]
168+
]
169+
}

.sass-lint.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
options:
2+
formatter: stylish
3+
files:
4+
include: 'frontend/stylesheets/**/*.s+(a|c)ss'
5+
ignore:
6+
- 'frontend/stylesheets/components/sweet-alert/**'
7+
rules:
8+
# Extends
9+
extends-before-mixins: 1
10+
extends-before-declarations: 1
11+
placeholder-in-extend: 1
12+
13+
# Mixins
14+
mixins-before-declarations: 1
15+
16+
# Line Spacing
17+
one-declaration-per-line: 1
18+
empty-line-between-blocks: 0
19+
single-line-per-selector: 1
20+
21+
# Disallows
22+
no-attribute-selectors: 0
23+
no-color-keywords: 1
24+
no-color-literals: 0
25+
no-combinators: 0
26+
no-css-comments: 0
27+
no-debug: 1
28+
no-disallowed-properties: 0
29+
no-duplicate-properties: 1
30+
no-empty-rulesets: 1
31+
no-extends: 0
32+
no-ids: 1
33+
no-important: 0
34+
no-invalid-hex: 1
35+
no-mergeable-selectors: 1
36+
no-misspelled-properties: 1
37+
no-qualifying-elements: 1
38+
no-trailing-whitespace: 1
39+
no-trailing-zero: 1
40+
no-transition-all: 0
41+
no-universal-selectors: 0
42+
no-url-protocols: 1
43+
no-vendor-prefixes: 1
44+
no-warn: 1
45+
property-units: 0
46+
47+
# Nesting
48+
force-attribute-nesting: 1
49+
force-element-nesting: 1
50+
force-pseudo-nesting: 1
51+
52+
# Name Formats
53+
class-name-format: 1
54+
function-name-format: 1
55+
id-name-format: 0
56+
mixin-name-format: 1
57+
placeholder-name-format: 1
58+
variable-name-format: 1
59+
60+
# Style Guide
61+
attribute-quotes: 1
62+
bem-depth: 0
63+
border-zero: 1
64+
brace-style: 1
65+
clean-import-paths: 1
66+
empty-args: 1
67+
hex-length: 1
68+
hex-notation: 1
69+
indentation: 1
70+
leading-zero: 1
71+
nesting-depth:
72+
- 1
73+
- max-depth: 5
74+
property-sort-order:
75+
- 1
76+
- order: 'concentric'
77+
pseudo-element: 1
78+
quotes: 1
79+
shorthand-values: 1
80+
url-quotes: 1
81+
variable-for-property: 1
82+
zero-unit: 1
83+
84+
# Inner Spacing
85+
space-after-comma: 1
86+
space-before-colon: 1
87+
space-after-colon: 1
88+
space-before-brace: 1
89+
space-before-bang: 1
90+
space-after-bang: 1
91+
space-between-parens: 1
92+
space-around-operator: 1
93+
94+
# Final Items
95+
trailing-semicolon: 1
96+
final-newline: 1

conditional/templates/attendance_hm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ <h3 class="panel-title">Attendees</h3>
3434
{% for m in members %}
3535
<tr>
3636
<td>
37-
<img class="table_img mobile-hide" src="https://profiles.csh.rit.edu/image/{{m['value']}}"> {{m['display']}}
37+
<img class="table-img mobile-hide" src="https://profiles.csh.rit.edu/image/{{m['value']}}"> {{m['display']}}
3838
</td>
3939
<td>
4040
<input type="checkbox" name="{{ m['value'] }}" autocomplete="off">

conditional/templates/major_project_submission.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h3 class="page-title">All Major Projects</h3> {% if major_projects_len
3737
<div class="panel-body">
3838
<div class="col-xs-8 col-sm-10">
3939
<h4>{{p['proj_name']}}</h4>
40-
<img class="table_img" src="https://profiles.csh.rit.edu/image/{{p['username']}}">
40+
<img class="table-img" src="https://profiles.csh.rit.edu/image/{{p['username']}}">
4141
{{p['name']}} ({{p['username']}})
4242
</div>
4343
{% if is_eval_director %}

conditional/templates/member_management.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,37 @@ <h3 class="panel-title">Add Users</h3>
88
<div class="panel-body">
99
<div class="container-fluid">
1010
<div class="row">
11-
<div class="col-md-6 remove_padding">
11+
<div class="col-md-6 remove-padding">
1212
<form action="/manage/uploaduser" id="upload_user" class="dropzone" data-module="dropzone">
1313
<div class="dz-message">
1414
<img src="../images/user_upload.svg" width="72px">
15-
<div class="upload_title">Mass User Upload</div>
16-
<div class="upload_sub">Drag file here or click to upload.</div>
15+
<div class="upload-title">Mass User Upload</div>
16+
<div class="upload-sub">Drag file here or click to upload.</div>
1717
</div>
1818
</form>
1919
</div>
20-
<div class="col-md-6 member_form">
20+
<div class="col-md-6 member-form">
2121
<form>
2222
<div class="form-group">
2323
<label class="control-label" for="name">Member Name</label>
2424
<input class="form-control" id="name" name="name" type="text">
2525
<span class="material-input"></span>
2626
</div>
27-
<div class="col-xs-8 remove_padding">
27+
<div class="col-xs-8 remove-padding">
2828
<div class="form-group">
2929
<label class="control-label" for="room">Room Number</label>
3030
<input class="form-control" id="roome" name="room" type="text">
3131
<span class="material-input"></span>
3232
</div>
3333
</div>
34-
<div class="col-xs-4 onfloor_box">
34+
<div class="col-xs-4 onfloor-box">
3535
<div class="form-group">
3636
<label>
3737
<input id="onfloor" name="onfloor" type="checkbox">
3838
On-Floor</label>
3939
</div>
4040
</div>
41-
<button class= "btn btn-raised btn-primary user_submit" id="submit" type="submit">Create New User</button>
41+
<button class= "btn btn-raised btn-primary user-submit" id="submit" type="submit">Create New User</button>
4242
</form>
4343
</div>
4444
</div>
@@ -66,7 +66,7 @@ <h3 class="panel-title">Member Management</h3>
6666
{% for m in active %}
6767
<tr>
6868
<td>
69-
<img class="table_img mobile-hide" src="https://profiles.csh.rit.edu/image/{{m['uid']}}"> {{m['name']}}
69+
<img class="table-img mobile-hide" src="https://profiles.csh.rit.edu/image/{{m['uid']}}"> {{m['name']}}
7070
</td>
7171
<td>
7272
{% if m['active'] %} &#x2605; {% endif %}

frontend/stylesheets/app.scss

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
// Third Party
2-
@import "csh-material-bootstrap";
3-
@import "dataTables.bootstrap";
4-
@import "bootstrap-material-datetimepicker";
2+
@import 'csh-material-bootstrap';
3+
@import 'dataTables.bootstrap';
4+
@import 'bootstrap-material-datetimepicker';
55

66
// External
7-
@import "https://fonts.googleapis.com/icon?family=Material+Icons";
7+
@import 'https://fonts.googleapis.com/icon?family=Material+Icons';
88

99
// Global
10-
@import "partials/base";
10+
@import 'partials/base';
1111

1212
// Components
13-
@import "components/switches";
14-
@import "components/flat-buttons";
15-
@import "components/datatables";
16-
@import "components/date-picker";
17-
@import "components/select";
18-
@import "components/dropzone";
19-
@import "components/sweet-alert/sweet-alert";
13+
@import 'components/switches';
14+
@import 'components/flat-buttons';
15+
@import 'components/date-picker';
16+
@import 'components/select';
17+
@import 'components/dropzone';
18+
@import 'components/sweet-alert/sweet-alert';
2019

2120
// Pages
22-
@import "pages/dashboard";
23-
@import "pages/evals";
24-
@import "pages/housing";
25-
@import "pages/management";
26-
@import "pages/hm-attendance";
21+
@import 'pages/dashboard';
22+
@import 'pages/evals';
23+
@import 'pages/housing';
24+
@import 'pages/management';
25+
@import 'pages/hm-attendance';

0 commit comments

Comments
 (0)