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(deps): use @empathyco/eslint-config as code format config #514

Merged
merged 14 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc

This file was deleted.

22 changes: 11 additions & 11 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: Bug report
description: Create a report to help us improve
title: "[BUG]: "
title: '[BUG]: '
labels: [bug]
body:
- type: markdown
attributes:
value: "Thank you for taking the time to provide feedback!"
value: 'Thank you for taking the time to provide feedback!'
- type: markdown
attributes:
value: Before creating a new bug, please check for [existing issues](https://github.com/empathyco/x-archetype/issues).
value: Before creating a new bug, please check for [existing issues](https://github.com/empathyco/x-archetype/issues).
- type: textarea
id: bug-environment
attributes:
Expand Down
24 changes: 12 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
name: Feature request
description: Add a new suggestion for feature
title: "[FEATURE]: "
labels: [feature,enhancement]
title: '[FEATURE]: '
labels: [feature, enhancement]
body:
- type: markdown
attributes:
value: "Welcome!"
value: 'Welcome!'
- type: markdown
attributes:
value: When suggesting a new feature for the Interface X project, submit your idea as a user story and provide as much information as possible on how you would solve it, so the team can assess and analyze your idea.
When defining your new feature, you need to consider it from two points of view.

- the **Final User** who accesses the commerce website that uses the component.
value:
When suggesting a new feature for the Interface X project, submit your idea as a user story and provide as much information as possible on how you would solve it, so the team can assess and analyze your idea.
When defining your new feature, you need to consider it from two points of view.

- the **Developer User** who is going to use the component to build a website.

Depending on the feature, you may need to consider one or both.
- the **Final User** who accesses the commerce website that uses the component.

- the **Developer User** who is going to use the component to build a website.

Depending on the feature, you may need to consider one or both.
- type: textarea
id: suggestion
attributes:
label: How can the project be improved?
description: Describe the problem encountered, what you need to solve it, and what you expect. Include details of other requirements that the feature must cover such as dependencies and actions covered by other services.
placeholder:
e.g. Display a list of search queries already performed by the user. / Each search query of the list has a button to delete it from the list. / The list of search queries must be maintained in the same device over time, even when the tab is closed. / If there are no search queries, then nothing should be displayed.
placeholder: e.g. Display a list of search queries already performed by the user. / Each search query of the list has a button to delete it from the list. / The list of search queries must be maintained in the same device over time, even when the tab is closed. / If there are no search queries, then nothing should be displayed.
- type: textarea
id: solution
attributes:
Expand Down
11 changes: 9 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<!--Please provide a general summary of changes in the PR title -->

# Pull request template
<!--To help reviewers to understand the change you've made, you need to include **key information** in your PR.-->

<!--To help reviewers to understand the change you've made, you need to include **key information** in your PR.-->

Describe the purpose of the change, the specific changes done in detail, and the issue you have fixed.

## Motivation and context

<!--Include information on the purpose of the change and any background information that may help. Why is this change required? What problem does it solve? -->

<!-- List any dependencies that are required for this change. If the change fixes an **open** issue, please link to the issue here.-->
Expand All @@ -13,22 +16,26 @@ Describe the purpose of the change, the specific changes done in detail, and the
- [ ] Open issue. If applicable, link:

## Type of change

<!-- Indicate the type of change involved in the PR -->

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that causes existing functionality to not work as expected)
- [ ] Change requires a documentation update

## What is the destination branch of this PR?

<!-- Although this may seem obvious, please include the destination branch as an extra check to ensure your PR targets the right branch.-->

- [ ] `Main`
- [ ] Other. Specify:

## How has this been tested?

<!-- Please describe in detail how you tested your changes. Include details of your testing environment, the test cases used, and the tests you ran to see how your change affects other areas of the code, etc.-->

Tests performed according to [testing guidelines](https://github.com/empathyco/x/blob/main/.github/contributing/tests.md):
Tests performed according to [testing guidelines](https://github.com/empathyco/x/blob/main/.github/contributing/tests.md):

## Checklist:

Expand Down
10 changes: 5 additions & 5 deletions .github/actions/deploy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ inputs:
description: cache value for s3 sync command
required: true
cloudfront_distribution_id:
description: the CloudFront cache id to invalidate
required: true
description: the CloudFront cache id to invalidate
required: true
cloudfront_invalidation_paths:
description: the CloudFront path to invalidate
required: true
description: the CloudFront path to invalidate
required: true
runs:
using: 'composite'
steps:
Expand All @@ -33,4 +33,4 @@ runs:
shell: bash
- name: Invalidate CloudFront cache
run: AWS_MAX_ATTEMPTS=10 aws cloudfront create-invalidation --distribution-id ${{ inputs.cloudfront_distribution_id }} --paths ${{ inputs.cloudfront_invalidation_paths }}
shell: bash
shell: bash
3 changes: 3 additions & 0 deletions .github/actions/install/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ runs:
- name: Installing dependencies
run: npm ci
shell: bash
- name: Run linter
run: npm run lint
shell: bash
- name: Build project
run: npm run build
shell: bash
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install deps, build and test project
- name: Install deps, lint, build and test project
uses: ./.github/actions/install
# Every push to main deploys to staging
- name: Deploy to staging
if: ${{ github.ref_name == 'main' }}
if: ${{ github.ref_name == 'main' }}
uses: ./.github/actions/deploy
with:
aws_role: ${{ secrets.AWS_ROLE_STAGING_ACCOUNT }}
Expand All @@ -28,14 +28,14 @@ jobs:
aws_s3_cache: no-store
cloudfront_distribution_id: ${{ secrets.CLOUDFRONT_ID_STAGING }}
cloudfront_invalidation_paths: '/*'
# Only tags named as release-* will deploy to production
# Only tags named as release-* will deploy to production
- name: Deploy to prod
if: startsWith(github.ref, 'refs/tags/release-')
if: startsWith(github.ref, 'refs/tags/release-')
uses: ./.github/actions/deploy
with:
aws_role: ${{ secrets.AWS_ROLE_PRODUCTION_ACCOUNT }}
aws_deploy_path: ${{ secrets.AWS_PRODUCTION_BUCKET }}
aws_s3_sync_args: --include '*' --exclude '*/*'
aws_s3_cache: max-age=3600
cloudfront_distribution_id: ${{ secrets.CLOUDFRONT_ID_PRODUCTION }}
cloudfront_invalidation_paths: '/*'
cloudfront_invalidation_paths: '/*'
20 changes: 9 additions & 11 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@


# Learn more about CodeQL at https://codeql.github.com/docs/
# Learn more about code scanning at https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ['main']
schedule:
# Runs periodically at 00:00 UTC on Monday
- cron: '00 00 * * 1'
Expand All @@ -26,11 +24,11 @@ jobs:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
6 changes: 3 additions & 3 deletions .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to the `main` branch.
on:
push:
on:
push:
branches: ['main']

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
Expand All @@ -18,7 +18,7 @@ jobs:
permissions:
contents: read
packages: write
#
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install deps, build and test project
- name: Install deps, lint, build and test project
uses: ./.github/actions/install
- name: Deploy PR Preview
uses: ./.github/actions/deploy
Expand Down
6 changes: 3 additions & 3 deletions .postcssrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = {
require('postcss-import'),
require('postcss-logical'),
require('postcss-dir-pseudo-class'),
require('cssnano')({ preset: ['default', { mergeLonghand: false }] })
]
};
require('cssnano')({ preset: ['default', { mergeLonghand: false }] }),
],
}
Loading