Skip to content

Commit ab7e37c

Browse files
Remove All the Javascript (#350)
* replace prettier formatter with yamlfmt * remove all the js * remove javascript based github actions and replace yaml formatting with python based yamlfmt * run yaml formatting thru pre-commit instead * remove manual run of pre-commit in github actions, because it's configured to do that anyway through Github itself in the repo --------- Co-authored-by: Carey Gumaer <[email protected]>
1 parent 56c84a2 commit ab7e37c

File tree

7 files changed

+29
-63
lines changed

7 files changed

+29
-63
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ repos:
99
- id: check-merge-conflict
1010
- id: check-yaml
1111
- id: check-added-large-files
12-
13-
- repo: https://github.com/pre-commit/mirrors-prettier.git
14-
rev: v4.0.0-alpha.8
12+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
13+
rev: 0.2.3
1514
hooks:
16-
- id: prettier
17-
types_or:
18-
- yaml
19-
15+
- id: yamlfmt
16+
args:
17+
- --mapping
18+
- '2'
19+
- --sequence
20+
- '4'
21+
- --offset
22+
- '2'
23+
- --width
24+
- '80'
25+
- --preserve-quotes
2026
- repo: https://github.com/adrienverge/yamllint.git
2127
rev: v1.37.1
2228
hooks:

.yamllint

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ extends: default
44
rules:
55
braces:
66
max-spaces-inside: 1
7-
truthy:
8-
{check-keys: false}
7+
truthy: {check-keys: false}

ocw-course-v2/ocw-studio.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ collections:
150150
name: file_size
151151
widget: hidden
152152
required: false
153-
default: null
153+
default:
154154
help: The size of the file resource in bytes
155155
- label: File
156156
name: file
@@ -227,7 +227,7 @@ collections:
227227
- label: Image Metadata
228228
name: image_metadata
229229
widget: object
230-
condition: { field: resourcetype, equals: Image }
230+
condition: {field: resourcetype, equals: Image}
231231
fields:
232232
- label: ALT text
233233
name: image-alt
@@ -242,7 +242,7 @@ collections:
242242
- label: Video Metadata
243243
name: video_metadata
244244
widget: object
245-
condition: { field: resourcetype, equals: Video }
245+
condition: {field: resourcetype, equals: Video}
246246
help: These fields will be published to YouTube
247247
fields:
248248
- label: Youtube ID
@@ -271,7 +271,7 @@ collections:
271271
- label: Video Files
272272
name: video_files
273273
widget: object
274-
condition: { field: resourcetype, equals: Video }
274+
condition: {field: resourcetype, equals: Video}
275275
help: >
276276
Internal related resource URLs, don't edit
277277
unless you know what you're doing
@@ -508,9 +508,9 @@ collections:
508508
name: topics
509509
widget: hierarchical-select
510510
levels:
511-
- { label: "Topic", name: "topic" }
512-
- { label: "Subtopic", name: "subtopic" }
513-
- { label: "Speciality", name: "speciality" }
511+
- {label: "Topic", name: "topic"}
512+
- {label: "Subtopic", name: "subtopic"}
513+
- {label: "Speciality", name: "speciality"}
514514
options_map:
515515
Business:
516516
Accounting: []
@@ -851,8 +851,8 @@ collections:
851851
name: mit_learn_topics
852852
widget: hierarchical-select
853853
levels:
854-
- { label: "Topic", name: "topic" }
855-
- { label: "Subtopic", name: "subtopic" }
854+
- {label: "Topic", name: "topic"}
855+
- {label: "Subtopic", name: "subtopic"}
856856
max: 2
857857
help: Only MIT Learn content curators should edit this.
858858
options_map:
@@ -982,4 +982,4 @@ collections:
982982
name: navmenu
983983
label: Navigation Menu
984984
fields:
985-
- { "label": "Menu", "name": "leftnav", "widget": "menu" }
985+
- {"label": "Menu", "name": "leftnav", "widget": "menu"}

ocw-www/ocw-studio.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ collections:
337337
name: file_size
338338
widget: hidden
339339
required: false
340-
default: null
340+
default:
341341
help: The size of the file resource in bytes
342342
- label: File
343343
name: file
@@ -414,7 +414,7 @@ collections:
414414
- label: Image Metadata
415415
name: image_metadata
416416
widget: object
417-
condition: { field: resourcetype, equals: Image }
417+
condition: {field: resourcetype, equals: Image}
418418
fields:
419419
- label: ALT text
420420
name: image_alt
@@ -429,7 +429,7 @@ collections:
429429
- label: Video Metadata
430430
name: video_metadata
431431
widget: object
432-
condition: { field: resourcetype, equals: Video }
432+
condition: {field: resourcetype, equals: Video}
433433
help: These fields will be published to YouTube
434434
fields:
435435
- label: Youtube ID
@@ -458,7 +458,7 @@ collections:
458458
- label: Video Files
459459
name: video_files
460460
widget: object
461-
condition: { field: resourcetype, equals: Video }
461+
condition: {field: resourcetype, equals: Video}
462462
help: >
463463
Internal related resource URLs, don't edit
464464
unless you know what you're doing
@@ -582,7 +582,7 @@ collections:
582582
name: navmenu
583583
label: Navigation Menu
584584
fields:
585-
- { "label": "Menu", "name": "mainmenu", "widget": "menu" }
585+
- {"label": "Menu", "name": "mainmenu", "widget": "menu"}
586586

587587
- category: Settings
588588
label: Homepage

package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

yarn.lock

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)