Skip to content

Commit

Permalink
style(prettier): format all js, scss, json, and yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispymm committed Jan 27, 2025
1 parent 50a799f commit 860be41
Show file tree
Hide file tree
Showing 105 changed files with 4,901 additions and 4,832 deletions.
332 changes: 174 additions & 158 deletions .eleventy.js

Large diffs are not rendered by default.

16 changes: 5 additions & 11 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ module.exports = {
},
extends: ['standard', 'prettier'],
globals: {
"MOJFrontend": "readonly",
"$": "readonly"
MOJFrontend: 'readonly',
$: 'readonly'
},
ignorePatterns: [
'package/**/*',
'node_modules',
'node_modules/.*'
],
ignorePatterns: ['package/**/*', 'node_modules', 'node_modules/.*'],
overrides: [
{
extends: [
Expand All @@ -24,9 +20,7 @@ module.exports = {
'plugin:promise/recommended',
'prettier'
],
files: [
'**/*.{cjs,js,mjs}',
],
files: ['**/*.{cjs,js,mjs}'],
parserOptions: {
ecmaVersion: 'latest'
},
Expand Down Expand Up @@ -127,7 +121,7 @@ module.exports = {
jest: true
}
}
],
],
parserOptions: {
// project: './tsconfig.json'
},
Expand Down
93 changes: 46 additions & 47 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Deploy guidance site to production
on:
workflow_dispatch:
pull_request:
branches: [ main ]
branches: [main]
push:
branches: [ main ]
branches: [main]

env:
HUSKY: 0
Expand All @@ -18,22 +18,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run build:package
- uses: actions/upload-artifact@v4
with:
name: mojds-package
path: package
- run: npm run build:dist
- run: ENV="production" npm run build:docs
- uses: actions/upload-artifact@v4
with:
name: mojds-dist
path: dist
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run build:package
- uses: actions/upload-artifact@v4
with:
name: mojds-package
path: package
- run: npm run build:dist
- run: ENV="production" npm run build:docs
- uses: actions/upload-artifact@v4
with:
name: mojds-dist
path: dist

test:
runs-on: ubuntu-latest
Expand All @@ -44,39 +44,39 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x, 21.x, 22.x]

steps:
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Run JS tests
run: npm run test:js
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- name: Test that sass can be compiled
run: npm run test:sass
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Run JS tests
run: npm run test:js
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- name: Test that sass can be compiled
run: npm run test:sass

result:
runs-on: ubuntu-latest
needs: [test]
if: always()
steps:
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ needs.test.result }}
context: Tests
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ needs.test.result }}
context: Tests

deploy:
runs-on: ubuntu-latest
Expand All @@ -102,7 +102,7 @@ jobs:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ vars.ECR_REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
BRANCH: "production"
BRANCH: 'production'
- run: |
echo "${KUBE_CERT}" > ca.crt
kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER}
Expand All @@ -114,4 +114,3 @@ jobs:
KUBE_CERT: ${{ secrets.KUBE_CERT }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }}
135 changes: 67 additions & 68 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ name: Publish package

on:
pull_request:
branches: [ main ]
branches: [main]
push:
branches:
- "main"
- "*.*.x"
- 'main'
- '*.*.x'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run build:package
- uses: actions/upload-artifact@v4
with:
name: mojds-package
path: package
- run: npm run build:dist
- run: ENV="production" npm run build:docs
- uses: actions/upload-artifact@v4
with:
name: mojds-dist
path: dist
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm ci
- run: npm run build:package
- uses: actions/upload-artifact@v4
with:
name: mojds-package
path: package
- run: npm run build:dist
- run: ENV="production" npm run build:docs
- uses: actions/upload-artifact@v4
with:
name: mojds-dist
path: dist

test:
runs-on: ubuntu-latest
Expand All @@ -39,65 +39,64 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x, 21.x, 22.x]

steps:
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Run JS tests
run: npm run test:js
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- name: Test that sass can be compiled
run: npm run test:sass
- name: Set commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: pending
context: Tests
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Run JS tests
run: npm run test:js
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- name: Test that sass can be compiled
run: npm run test:sass

result:
runs-on: ubuntu-latest
needs: [test]
if: always()
steps:
- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ needs.test.result }}
context: Tests

- name: Set final commit status
uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ needs.test.result }}
context: Tests

publish:
runs-on: ubuntu-latest
needs: [result]
if: github.event_name == 'push'

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- uses: actions/download-artifact@v4
with:
name: mojds-dist
path: dist
- run: npm ci
- name: Publish to NPM
run: npm run ci:release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/download-artifact@v4
with:
name: mojds-package
path: package
- uses: actions/download-artifact@v4
with:
name: mojds-dist
path: dist
- run: npm ci
- name: Publish to NPM
run: npm run ci:release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/tag-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
REPOSITORY: ${{ vars.ECR_REPOSITORY }}
IMAGE_TAG: ${{ github.sha }}
BRANCH: "staging"
BRANCH: 'staging'
- run: |
echo "${KUBE_CERT}" > ca.crt
kubectl config set-cluster ${KUBE_CLUSTER} --certificate-authority=./ca.crt --server=https://${KUBE_CLUSTER}
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dist/
public/

# 3rd party vendor code
vendor/
**vendor**

# Files to ignore
package-lock.json
Loading

0 comments on commit 860be41

Please sign in to comment.