Skip to content

Commit

Permalink
eslint upgrade and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raianand committed Sep 10, 2024
1 parent f66466c commit adba4bb
Show file tree
Hide file tree
Showing 18 changed files with 283 additions and 241 deletions.
24 changes: 11 additions & 13 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,26 @@ about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

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

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

**To Reproduce**
How to reproduce the behavior:
1. Sample workflow definition
2. Workflow run logs
3. Error Message
4. Bolt Summary Report

**Expected behavior**
A clear and concise description of what you expected to happen.
**Expected behavior** A clear and concise description of what you expected to
happen.

**Screenshots**
If applicable, add screenshots/logs to help explain your problem.
**Screenshots** If applicable, add screenshots/logs to help explain your
problem.

**OS/Arch (please complete the following information):**
- OS: [e.g. Ubuntu-20.04, Windows-2019, macOS-10.15]
- Arch [e.g. x86_64, arm64]

**Additional context**
Add any other context about the problem here.
- OS: [e.g. Ubuntu-20.04, Windows-2019, macOS-10.15]
- Arch [e.g. x86_64, arm64]

**Additional context** Add any other context about the problem here.
17 changes: 8 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Is your feature request related to a problem? Please describe.** A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe the solution you'd like** A clear and concise description of what you
want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
**Additional context** Add any other context or screenshots about the feature
request here.
2 changes: 1 addition & 1 deletion .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ rules:
'prettier/prettier': 'error',
'semi': 'off',
'space-before-function-paren': 0,
"filenames/match-regex": 'off'
'filenames/match-regex': 'off'
}
81 changes: 41 additions & 40 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
branches: ['main']
schedule:
- cron: '0 5 * * 1'

Expand All @@ -19,7 +19,8 @@ jobs:
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on:
${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
Expand All @@ -36,10 +37,10 @@ jobs:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand All @@ -49,39 +50,39 @@ jobs:
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # actions/checkout@v4 | v4.1.7
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # actions/checkout@v4 | v4.1.7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # github/codeql-action/init@v3
with:
config-file: ./.github/codeql/codeql-config.yml
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# - if: matrix.build-mode == 'manual'
# run: |
# echo 'If you are using a "manual" build mode for one or more of the' \
# 'languages you are analyzing, replace this with the commands to build' \
# 'your code, for example:'
# echo ' make bootstrap'
# echo ' make release'
# exit 1
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# - if: matrix.build-mode == 'manual'
# run: |
# echo 'If you are using a "manual" build mode for one or more of the' \
# 'languages you are analyzing, replace this with the commands to build' \
# 'your code, for example:'
# echo ' make bootstrap'
# echo ' make release'
# exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # github/codeql-action/init@v3
with:
category: "/language:${{matrix.language}}"
- name: Perform CodeQL Analysis
uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # github/codeql-action/init@v3
with:
category: '/language:${{matrix.language}}'
1 change: 0 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@ jobs:
VALIDATE_ALL_CODEBASE: true
VALIDATE_MARKDOWN: false
VALIDATE_JSCPD: false

8 changes: 4 additions & 4 deletions .github/workflows/ossf-scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
schedule:
- cron: '18 17 * * 6'
push:
branches: [ "main" ]
branches: ['main']

# Declare default permissions as read only.
permissions: read-all
Expand All @@ -27,12 +27,12 @@ jobs:
# actions: read

steps:
- name: "Checkout code"
- name: 'Checkout code'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

- name: "Run analysis"
- name: 'Run analysis'
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
Expand All @@ -54,7 +54,7 @@ jobs:

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
- name: 'Upload artifact'
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # actions/upload-artifact@v4 | main,v4.4.0
with:
name: SARIF file
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
- name: Get release version
id: releaseVersion
shell: bash
run: echo "releaseVersion=\"$(awk -F\' '/const releaseVersion/ { print $2 }' src/version.js)\"" >> "$GITHUB_ENV"
run:
echo "releaseVersion=\"$(awk -F\' '/const releaseVersion/ { print $2
}' src/version.js)\"" >> "$GITHUB_ENV"
- name: Check if releaseVersion is same as tag
run: |
if [ "${{ env.tag }}" != "${{ env.releaseVersion }}" ]; then
Expand Down Expand Up @@ -91,7 +93,7 @@ jobs:
path: bolt-${{ env.tag }}-${{ env.os }}-${{ env.arch }}.tar.gz.sig
if-no-files-found: error
retention-days: 5

- name: Upload certificate
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # actions/upload-artifact@v4 | main,v4.4.0
with:
Expand All @@ -110,18 +112,20 @@ jobs:

provenance:
needs: [build]
if: ${{ !endsWith(github.ref_name, 'rc') && !contains(github.ref_name, 'rc.') }}
if:
${{ !endsWith(github.ref_name, 'rc') && !contains(github.ref_name, 'rc.')
}}
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
base64-subjects: '${{ needs.build.outputs.hashes }}'
upload-assets: true

release:
needs: [build]
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -148,7 +152,7 @@ jobs:
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # actions/download-artifact@v4 | main,209,v4.1.8
with:
name: bolt-${{ env.tag }}-${{ env.os }}-${{ env.arch }}.tar.gz.bundle

- name: Install Cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # sigstore/cosign-installer@v3.6.0
with:
Expand All @@ -167,7 +171,7 @@ jobs:
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: ${{ endsWith(env.tag, 'rc') || contains(env.tag, 'rc.') }}

- name: Verify Release
run: |
cosign verify-blob \
Expand Down
Loading

0 comments on commit adba4bb

Please sign in to comment.