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

chore: add prettier configuration and format files #549

Merged
merged 7 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
groups:
Expand All @@ -10,8 +10,8 @@ updates:
- "@commitlint/*"
- "eslint"
minor:
patterns: ['*']
update-types: ['minor', 'patch']
patterns: ["*"]
update-types: ["minor", "patch"]
commit-message:
prefix: "chore"
include: "scope"
Expand Down
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# Pull requests that update GitHub Actions code. If you navigate to the folder, you will have a README of what it does
GitHub Actions:
- changed-files:
- any-glob-to-any-file: '.github/**/*'
- changed-files:
- any-glob-to-any-file: ".github/**/*"
2 changes: 1 addition & 1 deletion .github/workflows/auto-assign-pr.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/auto-author-assign.yml
name: 'Auto Author Assign'
name: "Auto Author Assign"

on:
pull_request_target:
Expand Down
77 changes: 38 additions & 39 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,47 @@ on:
branches-ignore: [dependabot/**]
pull_request:
schedule:
- cron: '0 9 * * 4'
- cron: "0 9 * * 4"

jobs:
CodeQL-Build:

runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
46 changes: 23 additions & 23 deletions .github/workflows/github-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ name: Add bugs to the relevant GitHub Projects
on:
pull_request_target:
types:
- assigned
- unassigned
- labeled
- unlabeled
- opened
- edited
- closed
- reopened
- synchronize
- converted_to_draft
- ready_for_review
- locked
- unlocked
- review_requested
- review_request_removed
- auto_merge_enabled
- auto_merge_disabled
- assigned
- unassigned
- labeled
- unlabeled
- opened
- edited
- closed
- reopened
- synchronize
- converted_to_draft
- ready_for_review
- locked
- unlocked
- review_requested
- review_request_removed
- auto_merge_enabled
- auto_merge_disabled
issues:
types:
- opened
Expand Down Expand Up @@ -85,13 +85,13 @@ jobs:
project-url: https://github.com/orgs/openfoodfacts/projects/5 # Add issue to the folksonomy project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏷️ Folksonomy Project
label-operator: OR
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/44 # Add issue to the data quality project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🧽 Data quality
label-operator: OR
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/82 # Add issue to the search project
Expand All @@ -103,19 +103,19 @@ jobs:
project-url: https://github.com/orgs/openfoodfacts/projects/41 # Add issue to the producer platform project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🏭 Producers Platform
label-operator: OR
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/19 # Add issue to the infrastructure project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: infrastructure
label-operator: OR
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/92 # Add issue to the Nutri-Score project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 🚥 Nutri-Score game
label-operator: OR
label-operator: OR
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/openfoodfacts/projects/132 # Add issue to the Top upvoted issues board
Expand All @@ -133,4 +133,4 @@ jobs:
project-url: https://github.com/orgs/openfoodfacts/projects/105 # Add issue to the Prices project
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: 💸 Prices
label-operator: OR
label-operator: OR
10 changes: 5 additions & 5 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

name: 🏷️ Pull Request Labeler
on:
- pull_request_target
- pull_request_target

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -22,7 +22,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@v5
#if: github.event.pull_request.head.repo.full_name == github.repository
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/labeler@v5
#if: github.event.pull_request.head.repo.full_name == github.repository
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/merge-conflict-autolabel.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '💥 Auto-Label Merge Conflicts on PRs'
name: "💥 Auto-Label Merge Conflicts on PRs"
on:
push:
branches:
Expand All @@ -7,7 +7,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
triage:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/[email protected]
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm publish
env:
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Run release-please
on:
push:
branches:
- develop
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
name: Run release-please
on:
push:
branches:
- develop
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
28 changes: 14 additions & 14 deletions .github/workflows/top-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
name: Display and label top issues.
runs-on: ubuntu-latest
steps:
- name: Run top issues action
uses: rickstaa/top-issues-action@v1
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
label: true
dashboard: true
dashboard_title: 👍 Top Issues Dashboard
dashboard_show_total_reactions: true
top_issues: true
top_bugs: true
top_features: true
top_pull_requests: true
top_list_size: 20
- name: Run top issues action
uses: rickstaa/top-issues-action@v1
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
label: true
dashboard: true
dashboard_title: 👍 Top Issues Dashboard
dashboard_show_total_reactions: true
top_issues: true
top_bugs: true
top_features: true
top_pull_requests: true
top_list_size: 20
14 changes: 11 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Schemas
src/schemas/

# Mock data
test/mockdata/

dist
docs
coverage
node_modules

# Ignore dependency locks
.yarn/
pnpm-lock.yaml
package-lock.json
yarn.lock

CHANGELOG.md

.all-contributorsrc
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 80,
"semi": true,
"singleQuote": false
}
Loading
Loading