Skip to content

Commit

Permalink
Merge pull request #472 from IATI/linting
Browse files Browse the repository at this point in the history
Linting
  • Loading branch information
tillywoodfield authored Oct 16, 2024
2 parents fa8d824 + 9e9cb0a commit 65db4c9
Show file tree
Hide file tree
Showing 65 changed files with 8,285 additions and 10,430 deletions.
16 changes: 0 additions & 16 deletions .eslintrc.json

This file was deleted.

12 changes: 6 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: 'npm'
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: '/'
directory: "/"
schedule:
interval: 'daily'
interval: "daily"

# Enable version updates for GitHub Actions
- package-ecosystem: 'github-actions'
- package-ecosystem: "github-actions"
# or GitHub Actions, set the directory to / to check for workflow files in .github/workflows.
directory: '/'
directory: "/"
schedule:
interval: 'daily'
interval: "daily"
21 changes: 16 additions & 5 deletions .github/workflows/develop-func-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,27 @@ name: CI_AutoMerge_Dependabot
on:
pull_request:
paths-ignore: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- '**/README.md'
- '**/dependabot.yml'
- '.github/workflows/prod-func-ci.yml'
- '.github/workflows/prod-func-deploy.yml'
- 'docs/*'
- "**/README.md"
- "**/dependabot.yml"
- ".github/workflows/prod-func-ci.yml"
- ".github/workflows/prod-func-deploy.yml"
- "docs/*"
branches:
- develop
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Install dependencies
run: npm ci
- name: Lint project
run: npm run lint
build:
uses: IATI/.github/.github/workflows/build_node_save.yaml@main
with:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/develop-func-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
workflow_dispatch: # Allow Manual Run from GitHub
push:
paths-ignore: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- '**/README.md' # don't run on README.md file updates anywhere in repo
- '**/dependabot.yml'
- '.github/workflows/prod-func-ci.yml'
- '.github/workflows/prod-func-deploy.yml'
- 'docs/*'
- "**/README.md" # don't run on README.md file updates anywhere in repo
- "**/dependabot.yml"
- ".github/workflows/prod-func-ci.yml"
- ".github/workflows/prod-func-deploy.yml"
- "docs/*"
branches:
- develop
schedule:
- cron: '19 04 * * *' # 0419am daily
- cron: "19 04 * * *" # 0419am daily

env:
NAME: validator-services
Expand Down Expand Up @@ -61,15 +61,15 @@ jobs:
unzip build-artifact-dev.zip
rm build-artifact-dev.zip
- name: 'Login via Azure CLI'
- name: "Login via Azure CLI"
uses: azure/[email protected]
with:
creds: ${{ env.AZURE_CREDENTIALS }} # Service Principal credentials saved in GitHub Secrets

- name: Set Env variables on app service
uses: Azure/[email protected]
with:
app-name: 'func-${{env.NAME}}-${{env.STAGE}}'
app-name: "func-${{env.NAME}}-${{env.STAGE}}"
app-settings-json: |
[
{
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
}
]
- name: 'Run Azure Functions Action'
- name: "Run Azure Functions Action"
uses: Azure/[email protected]
with:
app-name: func-${{ env.NAME }}-${{ env.STAGE }}
Expand All @@ -148,17 +148,17 @@ jobs:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: 'Wait for 3 minutes'
- name: "Wait for 3 minutes"
run: sleep 180

- name: 'Checkout GitHub Action'
- name: "Checkout GitHub Action"
uses: actions/checkout@v4

- name: 'Install newman'
- name: "Install newman"
run: |
sudo npm i -g newman
- name: 'Run integration tests'
- name: "Run integration tests"
run: |
newman run integration-tests/validator-services-tests.postman_collection.json \
-e integration-tests/envs/validator-services-direct-dev.postman_environment.json \
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/prod-func-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
unzip build-artifact-prod.zip
rm build-artifact-prod.zip
- name: 'Login via Azure CLI'
- name: "Login via Azure CLI"
uses: azure/[email protected]
with:
creds: ${{ env.AZURE_CREDENTIALS }} # Service Principal credentials saved in GitHub Secrets

- name: Set Env variables on app service
uses: Azure/[email protected]
with:
app-name: 'func-${{env.NAME}}-${{env.STAGE}}'
app-name: "func-${{env.NAME}}-${{env.STAGE}}"
app-settings-json: |
[
{
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
}
]
- name: 'Run Azure Functions Action'
- name: "Run Azure Functions Action"
uses: Azure/[email protected]
with:
app-name: func-${{ env.NAME }}-${{ env.STAGE }}
Expand All @@ -134,17 +134,17 @@ jobs:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: 'Wait for 3 minutes'
- name: "Wait for 3 minutes"
run: sleep 180

- name: 'Checkout GitHub Action'
- name: "Checkout GitHub Action"
uses: actions/checkout@v4

- name: 'Install newman'
- name: "Install newman"
run: |
sudo npm i -g newman
- name: 'Run integration tests'
- name: "Run integration tests"
run: |
newman run integration-tests/validator-services-tests.postman_collection.json \
-e integration-tests/envs/validator-services-direct-PROD.postman_environment.json \
Expand Down
9 changes: 0 additions & 9 deletions .prettierignore

This file was deleted.

13 changes: 0 additions & 13 deletions .prettierrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"recommendations": [
"ms-azuretools.vscode-azurefunctions"
]
"recommendations": ["ms-azuretools.vscode-azurefunctions"]
}
28 changes: 14 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Node Functions",
"type": "node",
"request": "attach",
"port": 9229,
"preLaunchTask": "func: host start"
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Node Functions",
"type": "node",
"request": "attach",
"port": 9229,
"preLaunchTask": "func: host start"
}
]
}
21 changes: 11 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"editor.formatOnSave": true,
"files.associations": {
"*.xslt": "xml"
},
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.associations": {
"*.xslt": "xml"
},
"azureFunctions.deploySubpath": ".",
"azureFunctions.postDeployTask": "npm install",
"azureFunctions.projectLanguage": "JavaScript",
"azureFunctions.projectRuntime": "~4",
"debug.internalConsoleOptions": "neverOpen",
"azureFunctions.preDeployTask": "npm prune"
}
60 changes: 30 additions & 30 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "func",
"command": "host start --cors http://localhost:4200 --javascript --language-worker -- --inspect=5858",
"label": "func: host start",
"problemMatcher": "$func-watch",
"isBackground": true
},
{
"type": "func",
"command": "host start --cors http://localhost:4200",
"problemMatcher": "$func-watch",
"isBackground": true,
"dependsOn": "npm install"
},
{
"type": "shell",
"label": "npm install",
"command": "npm install"
},
{
"type": "shell",
"label": "npm prune",
"command": "npm prune --production",
"problemMatcher": []
}
]
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "func",
"command": "host start --cors http://localhost:4200 --javascript --language-worker -- --inspect=5858",
"label": "func: host start",
"problemMatcher": "$func-watch",
"isBackground": true
},
{
"type": "func",
"command": "host start --cors http://localhost:4200",
"problemMatcher": "$func-watch",
"isBackground": true,
"dependsOn": "npm install"
},
{
"type": "shell",
"label": "npm install",
"command": "npm install"
},
{
"type": "shell",
"label": "npm prune",
"command": "npm prune --production",
"problemMatcher": []
}
]
}
Loading

0 comments on commit 65db4c9

Please sign in to comment.