-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2412 from NCEAS/feature-2096-linting-formatting
Apply linting & formatting globally
- Loading branch information
Showing
441 changed files
with
120,702 additions
and
105,426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.