Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply linting & formatting globally #2412

Merged
merged 7 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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"]
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for MetacatUI
title: ''
title: ""
labels: enhancement
assignees: ''

assignees: ""
---

**Describe the feature you'd like**
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/format-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Format, Lint, & Test"
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches-ignore:
- ignore-*
jobs:
run_checks:
name: Run All Checks
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm install
- name: Check for linting errors on changed code
uses: reviewdog/action-eslint@v1
if: always()
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
reporter: github-pr-review
eslint_flags: src
filter_mode: diff_context
fail_on_error: true
- name: Check for formatting errors on changed code
uses: EPMatt/reviewdog-action-prettier@v1
if: always()
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
reporter: github-pr-review
filter_mode: diff_context
fail_on_error: true
- name: Ensure unit tests pass
id: test
if: always()
run: npm test
- name: Ensure docs build without errors
id: jsdoc-dry-run
if: always()
run: npm run jsdoc-dry-run
36 changes: 0 additions & 36 deletions .github/workflows/test.js.yml

This file was deleted.

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.*
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": ["@shopify/prettier-plugin-liquid"],
"overrides": [
{
"files": "docs/_includes/*.html",
"options": {
"parser": "liquid-html"
}
},
{
"files": "docs/_layouts/*.html",
"options": {
"parser": "liquid-html"
}
}
]
}
Loading
Loading