@equinor/amplify-component-lib v9.11.0
Amplify Component Library (ACL) contains components, utils, providers and hooks developed and used by the Amplify team.
This package is first and foremost for our own Amplify applications. You can use them outside of Amplify if you want, but we will not be supporting any needs that don't align with our own Amplify applications. If you have an issue or find any bugs, create an issue in Github as we don't accept PRs from contributors outside of the Amplify team.
Quick links
Building amplify-component-lib
Build and publish is done automatically when code is merged into main branch, if the package.json version number is higher.
Using config files from amplify-component-lib
Navigate to your projects root folder,
~/Projects/recapfor instanceCopy and run the following command
wget -q -O - https://raw.githubusercontent.com/equinor/amplify-component-lib/main/config/install.sh | bashThis should have downloaded the different config files to your project root folder.
If you want to ignore certain configuration files you can create a .acl-ignore file in the client folder in your project.
For example: acquire/client/.acl-ignore
eslint.config.mjs
CODEOWNERS
pull_request.yamlUsing github action workflows related to deploying from github from amplify-component-lib
Navigate to your projects root folder,
~/Projects/recapfor instanceCopy and run the following command
wget -q -O - https://raw.githubusercontent.com/equinor/amplify-component-lib/main/config/install-deployment-files.sh | bashThis should have downloaded the build_deploy_radix.yaml, promote.yaml, notify.yaml, push.yaml
NOTE: These files should eventually be served from the same install script we use for getting other config files. We serve it from a different script so that applications which are not ready for the change in deployment process don't have to rush.
Notes
This script assumes the following structure in the project
project
│ README.md
│
└───client
│ | ...
│
└───server
│ ...Using pre-commit
Download and install pre-commit
Using python's pip to download pre-commit
pip install pre-commitUsing brew to download pre-commit
brew install pre-commitfinally install pre-commit
pre-commitAdd config file, .pre-commit-config.yaml
Your .pre-commit-config.yaml file should look something like below
repos:
- repo: local
hooks:
- id: hadolint
name: Lint Dockerfiles
description: Runs hadolint to lint Dockerfiles
language: system
types: ['dockerfile']
entry: hadolint
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data with TruffleHog.
entry: trufflehog git file://. --since-commit HEAD --only-verified --fail
language: golang
pass_filenames: false
- id: prettier
name: Prettier
description: Runs prettier on supported files
language: system
entry: 'npx prettier --check'
files: .*\.jsx?$|.*\.tsx?$|.*\.ts?$
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.9.0
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
additional_dependencies:
- eslint@8.57.0
- eslint-config-prettier@9.1.0
- eslint-plugin-prettier@5.1.3
- eslint-plugin-react@7.34.0
- eslint-plugin-react-hooks@4.6.0
- eslint-plugin-simple-import-sort@12.0.0Install hooks
When you have your config file in place you need to install the hooks
pre-commit installDockerfile linting
We use hadolint to check that our docker file is using best practice.
Install
In order to commit changes related to a dockerfile you need to have hadolint installed
CLI
On OSX you can use brew to install:
brew install hadolintOn Windows you can use scoop to install:
scoop install hadolintIn any of these do not work then you can refer to the installation section in hadolint's repository
VS Code
If you want to shorten the feedback loop when changing your dockerfile you can optionally add the hadolint extension (Extension id: exiasr.hadolint)
WebStorm
Looks like it is not available for WebStorm at the moment
Latest version
7 months ago
7 months ago
7 months ago
8 months ago
11 months ago
7 months ago
7 months ago
10 months ago
7 months ago
6 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
12 months ago
12 months ago
11 months ago
6 months ago
11 months ago
5 months ago
9 months ago
9 months ago
8 months ago
12 months ago
11 months ago
11 months ago
6 months ago
6 months ago
6 months ago
11 months ago
11 months ago
11 months ago
11 months ago
9 months ago
9 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
11 months ago
7 months ago
11 months ago
7 months ago
11 months ago
7 months ago
10 months ago
7 months ago
10 months ago
10 months ago
9 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago