Skip to content

Commit c732266

Browse files
committed
Fix some issues with travis stylelint
1 parent 525a524 commit c732266

4 files changed

Lines changed: 113 additions & 78 deletions

File tree

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ php:
2727
# This section sets up the environment variables for the build.
2828
env:
2929
global:
30-
- MOODLE_BRANCH=MOODLE_310_STABLE
30+
- MOODLE_BRANCH=MOODLE_311_STABLE
31+
- IGNORE_PATHS=node_modules/
3132
matrix:
3233
- DB=pgsql
3334
- DB=mysqli

Gruntfile.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,25 @@ module.exports = function (grunt) {
6565
}
6666
},
6767
stylelint: {
68-
all: ['scss/*.scss']
68+
scss: {
69+
options: {
70+
configFile: '',
71+
formatter: 'string',
72+
ignoreDisables: false,
73+
failOnError: true,
74+
outputFile: '',
75+
reportNeedlessDisables: false,
76+
fix: false,
77+
syntax: 'scss'
78+
},
79+
src: ['scss/*.scss']
80+
},
81+
less: {
82+
src: ['less/*.less']
83+
},
84+
css: {
85+
src: ['css/*.css']
86+
}
6987
},
7088
exec: {
7189
decache: {
@@ -92,4 +110,4 @@ module.exports = function (grunt) {
92110
grunt.registerTask("default", ["watch"]);
93111
grunt.registerTask("decache", ["exec:decache"]);
94112
grunt.registerTask("compile", ["sass", "decache"]);
95-
};
113+
};

package.json

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
11
{
2-
"name": "theme-bootstrap-tasks",
3-
"version": "0.1.0",
4-
"description": "Grunt tasks for Moodle Bootstrap theme.",
2+
"name": "block_course_modulenavigation",
3+
"version": "",
4+
"description": "",
55
"main": "Gruntfile.js",
6-
"author": {
7-
"name": "Joby Harding",
8-
"url": "http://www.iamjoby.com"
6+
"directories": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
98
},
10-
"contributors": [
11-
{
12-
"name": "David Scotson"
13-
},
14-
{
15-
"name": "Bas Brands",
16-
"url": "http://www.basbrands.nl"
17-
},
18-
{
19-
"name": "Gareth J Barnard",
20-
"url": "http://about.me/gjbarnard"
21-
}
22-
],
23-
"repository": {
24-
"type": "git",
25-
"url": "https://github.com/bmbrands/theme_bootstrap.git"
9+
"scripts": {
10+
"test": "echo \"Error: no test specified\" && exit 1"
2611
},
27-
"bugs": {
28-
"url": "https://github.com/bmbrands/theme_bootstrap/issues"
12+
"author": "",
13+
"license": "GNU",
14+
"devDependencies": {
15+
"@babel/core": "7.9.0",
16+
"@babel/plugin-proposal-class-properties": "7.8.3",
17+
"@babel/plugin-proposal-json-strings": "7.8.3",
18+
"@babel/plugin-syntax-dynamic-import": "7.8.3",
19+
"@babel/plugin-syntax-import-meta": "7.8.3",
20+
"@babel/preset-env": "7.9.5",
21+
"ajv": "6.12.2",
22+
"async": "3.2.0",
23+
"babel-eslint": "10.1.0",
24+
"babel-plugin-system-import-transformer": "^4.0.0",
25+
"babel-plugin-transform-es2015-modules-amd-lazy": "2.0.1",
26+
"babel-preset-minify": "0.5.1",
27+
"eslint": "6.8.0",
28+
"eslint-plugin-babel": "5.3.0",
29+
"eslint-plugin-promise": "4.2.1",
30+
"fb-watchman": "2.0.1",
31+
"gherkin-lint": "^4.2.1",
32+
"glob": "7.1.6",
33+
"grunt": "^1.4.0",
34+
"grunt-babel": "8.0.0",
35+
"grunt-contrib-uglify": "4.0.1",
36+
"grunt-contrib-uglify-es": "^3.3.0",
37+
"grunt-contrib-watch": "1.1.0",
38+
"grunt-eslint": "22.0.0",
39+
"grunt-exec": "^3.0.0",
40+
"grunt-sass": "3.1.0",
41+
"grunt-stylelint": "0.15.0",
42+
"grunt-text-replace": "^0.4.0",
43+
"jshint": "^2.11.0",
44+
"node-sass": "^4.14.0",
45+
"semver": "7.3.2",
46+
"shifter": "https://github.com/andrewnicols/shifter/archive/v1.2.0_moodle-0.tar.gz",
47+
"stylelint": "13.3.3",
48+
"stylelint-checkstyle-formatter": "0.1.2",
49+
"stylelint-csstree-validator": "1.8.0",
50+
"xmldom": "^0.6.0",
51+
"xpath": "0.0.27"
2952
},
30-
"dependencies": {
31-
"grunt": "^1.0.3",
32-
"grunt-contrib-watch": "^0.5.3",
33-
"grunt-exec": "^0.4.7",
34-
"grunt-sass": "^3.0.1",
35-
"grunt-stylelint": "^0.10.1",
36-
"grunt-text-replace": "^0.3.12",
37-
"node-sass": "^4.9.3",
38-
"stylelint": "^9.5.0"
53+
"engines": {
54+
"node": ">=14.15.0 <15"
3955
},
40-
"license": "GPL-3.0+",
41-
"devDependencies": {
42-
"node-sass": "^4.9.2"
56+
"repository": {
57+
"type": "git",
58+
"url": "git://github.com/DigiDago/moodle-block_course_modulenavigation"
4359
}
4460
}

scss/course_modulenavigation.scss

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ $section-default-color: #ddd;
1212

1313
.block.block_course_modulenavigation {
1414
.content {
15-
white-space: normal;
16-
padding: 5px;
1715
background-color: $section-bg;
16+
padding: 5px;
17+
white-space: normal;
1818
}
1919

2020
.pagination,
2121
.allpagination {
22+
display: table;
2223
margin: 0;
2324
padding: $section-body-padding;
2425
width: 100%;
25-
display: table;
2626
}
2727

2828
.pagination .prev,
@@ -43,15 +43,15 @@ $section-default-color: #ddd;
4343
.allpagination .sectionname,
4444
.pagination .allsectionames,
4545
.allpagination .allsectionames {
46-
width: 90%;
47-
border-radius: $section-border-radius;
4846
border: 0;
47+
border-radius: $section-border-radius;
48+
width: 90%;
4949
}
5050

5151
.pagination .expand-arrow,
5252
.allpagination .expand-arrow {
53-
width: 18px;
5453
float: right;
54+
width: 18px;
5555
}
5656

5757
.pagination > li,
@@ -61,34 +61,34 @@ $section-default-color: #ddd;
6161

6262
.pagination > li a,
6363
.allpagination > li a {
64-
padding: $section-body-padding;
65-
float: none;
66-
display: block;
6764
background-color: transparent;
68-
border-radius: $section-border-radius;
6965
border: 0;
66+
border-radius: $section-border-radius;
67+
display: block;
68+
float: none;
69+
padding: $section-body-padding;
7070
}
7171

7272
ul.activities {
73+
list-style: none;
7374
margin: 0;
7475
padding: $section-body-padding;
75-
list-style: none;
7676

7777
li > a {
78-
padding: 5px 10px;
7978
border-bottom: 1px solid #eee;
8079
display: block;
80+
padding: 5px 10px;
8181

8282
&:hover,
8383
&.active {
84-
text-decoration: none;
8584
background-color: #eee;
85+
text-decoration: none;
8686
}
8787
}
8888

8989
.completionbox {
90-
position: relative;
9190
display: table-cell;
91+
position: relative;
9292
width: 18px;
9393
}
9494

@@ -97,61 +97,61 @@ $section-default-color: #ddd;
9797
}
9898

9999
.completioncheck {
100+
border-radius: 5px;
101+
content: '';
102+
display: inline-block;
103+
height: 10px;
104+
margin-top: -5px;
100105
position: absolute;
101106
top: 50%;
102-
margin-top: -5px;
103-
content: '';
104107
width: 10px;
105-
height: 10px;
106-
border-radius: 5px;
107-
display: inline-block;
108108

109109
&.incomplete {
110110
border: 1px solid #ccc;
111111
}
112112

113113
&.completed {
114-
border: 1px solid #5cb85c;
115114
background-color: #5cb85c;
115+
border: 1px solid #5cb85c;
116116
}
117117
}
118118

119119
.modulenavigationlabel {
120-
pointer-events: none;
121-
cursor: default;
122120
color: black;
121+
cursor: default;
123122
font-weight: 700;
123+
pointer-events: none;
124124
}
125125
}
126126

127127
.section {
128-
margin-bottom: 20px;
129128
background-color: $section-bg;
130129
border: 1px solid transparent;
131130
border-radius: $section-border-radius;
131+
margin-bottom: 20px;
132132
}
133133

134134
.section-body {
135135
padding: $section-body-padding;
136136
}
137137

138138
.module-navigation-section-heading {
139-
padding: $section-padding;
140139
border-bottom: 1px solid transparent;
141-
border-top-right-radius: 0;
142140
border-top-left-radius: 0;
141+
border-top-right-radius: 0;
142+
padding: $section-padding;
143143

144144
> .dropdown .dropdown-toggle {
145145
color: inherit;
146146
}
147147
}
148148

149149
.tocourse {
150-
display: block;
151-
padding: $section-padding;
152150
background-color: $section-content-bg;
153151
border: 1px solid $section-default-color;
152+
display: block;
154153
margin-bottom: 3px;
154+
padding: $section-padding;
155155

156156
&:hover {
157157
text-decoration: none;
@@ -163,9 +163,9 @@ $section-default-color: #ddd;
163163
}
164164

165165
.section-title {
166-
margin-top: 0;
167-
margin-bottom: 0;
168166
color: inherit;
167+
margin-bottom: 0;
168+
margin-top: 0;
169169

170170
> {
171171
a,
@@ -177,11 +177,11 @@ $section-default-color: #ddd;
177177
}
178178

179179
.section-footer {
180-
padding: $section-padding;
181180
background-color: $section-content-bg;
182-
border-top: 1px solid $section-default-color;
183-
border-bottom-right-radius: 0;
184181
border-bottom-left-radius: 0;
182+
border-bottom-right-radius: 0;
183+
border-top: 1px solid $section-default-color;
184+
padding: $section-padding;
185185
}
186186

187187
.section > {
@@ -192,27 +192,27 @@ $section-default-color: #ddd;
192192

193193
.list-group .list-group-item,
194194
.section-collapse > .list-group .list-group-item {
195-
border-width: 1px 0;
196195
border-radius: $section-border-radius;
196+
border-width: 1px 0;
197197
}
198198

199199
.list-group:first-child .list-group-item:first-child,
200200
.section-collapse > .list-group:first-child .list-group-item:first-child {
201201
border-top: 0;
202-
border-top-right-radius: 0;
203202
border-top-left-radius: 0;
203+
border-top-right-radius: 0;
204204
}
205205

206206
.list-group:last-child .list-group-item:last-child,
207207
.section-collapse > .list-group:last-child .list-group-item:last-child {
208208
border-bottom: 0;
209-
border-bottom-right-radius: 0;
210209
border-bottom-left-radius: 0;
210+
border-bottom-right-radius: 0;
211211
}
212212

213213
.module-navigation-section-heading + .section-collapse > .list-group .list-group-item:first-child {
214-
border-top-right-radius: 0;
215214
border-top-left-radius: 0;
215+
border-top-right-radius: 0;
216216
}
217217
}
218218

@@ -225,8 +225,8 @@ $section-default-color: #ddd;
225225
margin-bottom: 20px;
226226

227227
.section {
228-
margin-bottom: 0;
229228
border-radius: $section-border-radius;
229+
margin-bottom: 0;
230230

231231
+ .section {
232232
margin-top: 5px;
@@ -258,17 +258,17 @@ $section-default-color: #ddd;
258258

259259
> {
260260
.module-navigation-section-heading {
261-
color: #333;
262261
background-color: $section-content-bg;
263262
border-color: $section-default-color;
263+
color: #333;
264264

265265
+ .section-collapse > .section-body {
266266
border-top-color: $section-default-color;
267267
}
268268

269269
.badge {
270-
color: $section-content-bg;
271270
background-color: #333;
271+
color: $section-content-bg;
272272
}
273273
}
274274

0 commit comments

Comments
 (0)