Skip to content

Commit

Permalink
Add & configure prettier; fix syntax errors pre-format
Browse files Browse the repository at this point in the history
- Initial prettier setup; do not format yet
- Fix syntax errors in files that would prevent prettier from formatting them

Issue #2096
  • Loading branch information
robyngit committed May 13, 2024
1 parent 59466ab commit 87dead8
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ community_bridge: # Replace with a single Community Bridge project-name e.g., cl
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://giving.ucsb.edu/Funds/Give?id=353]
custom: ['https://giving.ucsb.edu/Funds/Give?id=353']
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Prettier doesn't format underscore.js templates correctly
src/**/*.html
# Don't modify third-party code
src/components
# docs/docs is auto-generated
docs/docs
# Ignore any minimized files
**/*.min.*
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": [
"@shopify/prettier-plugin-liquid"
],
"overrides": [
{
"files": "docs/_includes/*.html",
"options": {
"parser": "liquid-html"
}
},
{
"files": "docs/_layouts/*.html",
"options": {
"parser": "liquid-html"
}
}
]
}
174 changes: 160 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
"devDependencies": {
"@jsdoc/salty": "^0.2.3",
"@jsdoc/util": "^0.2.4",
"@shopify/prettier-plugin-liquid": "^1.5.0",
"code-prettify": "^0.1.0",
"common-path-prefix": "^3.0.0",
"jsdoc": "^4.0.0",
"open-sans-fonts": "^1.6.2"
"open-sans-fonts": "^1.6.2",
"prettier": "^3.2.5"
},
"scripts": {
"dev": "node server.js",
Expand All @@ -25,7 +27,9 @@
"doc": "cd docs; bundle exec jekyll serve",
"test": "node test/server.js",
"integration-test": "node test/server.js integration",
"view-tests": "node test/server.js keep-running"
"view-tests": "node test/server.js keep-running",
"format": "prettier --write .",
"format-check": "prettier --check ."
},
"repository": {
"type": "git",
Expand Down
4 changes: 0 additions & 4 deletions src/css/metacatui-common.css
Original file line number Diff line number Diff line change
Expand Up @@ -8040,10 +8040,6 @@ ul.side-nav-items {
margin-left: -5px;
margin-right: 5px;
}
border: none;
background-color: inherit;
width: auto;
}

/* Editor package table button dropdown */
.Editor #data-package-table td:last-of-type ul {
Expand Down
2 changes: 1 addition & 1 deletion src/js/themes/default/css/metacatui.css
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ padding-left: 0px;
content: "Datasets ";
}
#statcounts{
float: left;s
float: left;
}
.sort-by{
float: right;
Expand Down

0 comments on commit 87dead8

Please sign in to comment.