Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Eslint/prettier/Conventional Changelog configuration (#963)
Browse files Browse the repository at this point in the history
* chore(ci): install prettier/eslint code scanning tools

* chore: fix prettier issues

* chore: configure conventional changelog

* chore: generate attributions and check licenses on commit

Co-authored-by: Miguel Abreu <miabreu@amazon.com>
  • Loading branch information
2 people authored and denisquesada committed Jul 17, 2023
1 parent a6de92b commit 819e9f8
Show file tree
Hide file tree
Showing 578 changed files with 158,607 additions and 149,947 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.vscode/
.DS_Store
node_modules

deployment/regional-s3-assets
deployment/global-s3-assets
deployment/open-source

oss-attribution
oss-attribution
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
9 changes: 9 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

./add-license.sh
./generate-attributions.sh
./check-license.sh

pushd backend && npm run lint-src && popd
pushd frontend && npm run lint-src && popd
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build
cdk.out
coverage
node_modules
16 changes: 16 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
singleQuote: false,
semi: true,
trailingComma: "all",
arrowParens: "always",
overrides: [
{
files: "*.{js,jsx,tsx,ts,scss,json,html}",
options: {
tabWidth: 4,
},
},
],
};
10 changes: 5 additions & 5 deletions .viperlightignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ examples/README.md:49

frontend/public/env.*:*

frontend/src/containers/__tests__/PublishingGuidanceSettings.test.tsx:30
frontend/src/containers/__tests__/PublishingGuidanceSettings.test.tsx:28

frontend/src/locales/en/translation.json:536

frontend/src/services/__tests__/BackendService.test.ts:389
frontend/src/services/__tests__/BackendService.test.ts:396
frontend/src/services/__tests__/BackendService.test.ts:403
frontend/src/services/__tests__/BackendService.test.ts:409
frontend/src/services/__tests__/BackendService.test.ts:364
frontend/src/services/__tests__/BackendService.test.ts:371
frontend/src/services/__tests__/BackendService.test.ts:378
frontend/src/services/__tests__/BackendService.test.ts:384

node_modules/*

Expand Down
1 change: 1 addition & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Code of Conduct

This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
15 changes: 14 additions & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ This software includes third party software subject to the following copyrights:
@types/cors@2.8.12 under the MIT
@types/d3-scale@3.3.2 under the MIT
@types/d3-shape@2.1.3 under the MIT
@types/escape-html@1.0.2 under the MIT
@types/express@4.17.13 under the MIT
@types/fs-extra@9.0.13 under the MIT
@types/jest@24.9.1 under the MIT
Expand All @@ -76,6 +77,7 @@ This software includes third party software subject to the following copyrights:
@types/react@16.14.31 under the MIT
@types/recharts@1.8.23 under the MIT
@types/uuid@8.3.4 under the MIT
@typescript-eslint/eslint-plugin@5.45.1 under the MIT
aws-amplify@4.3.35 under the Apache-2.0
aws-cdk@1.176.0 under the Apache-2.0
aws-sdk@2.1210.0 under the Apache-2.0
Expand All @@ -86,12 +88,23 @@ d3-interpolate@3.0.1 under the ISC
d3-scale@4.0.2 under the ISC
dayjs@1.11.5 under the MIT
envalid@7.3.1 under the MIT
eslint-config-airbnb-base@15.0.0 under the MIT
eslint-config-prettier@8.5.0 under the MIT
eslint-config-standard-with-typescript@23.0.0 under the MIT
eslint-plugin-import@2.26.0 under the MIT
eslint-plugin-n@15.6.0 under the MIT
eslint-plugin-prettier@4.2.1 under the MIT
eslint-plugin-promise@6.1.1 under the ISC
eslint-plugin-react@7.31.11 under the MIT
eslint@8.29.0 under the MIT
express@4.18.1 under the MIT
fs-extra@10.1.0 under the MIT
husky@8.0.2 under the MIT
i18next@19.9.2 under the MIT
jest@27.5.1 under the MIT
jsonschema@1.4.1 under the MIT
license-report@6.3.0 under MIT
lint-staged@13.1.0 under the MIT
mutationobserver-shim@0.3.7 under the MIT
papaparse@5.3.2 under the MIT
performance-dashboard-backend@1.8.0 under the Apache-2.0
Expand Down Expand Up @@ -124,9 +137,9 @@ ts-jest@27.1.5 under the MIT
ts-loader@9.3.1 under the MIT
ts-node@10.9.1 under the MIT
ts-node@8.10.2 under the MIT
typescript@3.7.7 under the Apache-2.0
typescript@3.9.10 under the Apache-2.0
typescript@4.8.4 under the Apache-2.0
typescript@4.9.3 under the Apache-2.0
uswds@2.13.3 under the SEE LICENSE IN LICENSE.md
uuid@8.3.2 under the MIT
yargs@17.5.1 under the MIT
Expand Down
24 changes: 24 additions & 0 deletions backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["standard-with-typescript", "prettier"],
plugins: ["prettier"],
overrides: [],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: ["./tsconfig.json"],
},
rules: {
"prettier/prettier": ["error"],
// "@typescript-eslint/explicit-function-return-type": ["off"],
// "@typescript-eslint/strict-boolean-expressions": "off",
// "@typescript-eslint/consistent-type-assertions": "off",
// "@typescript-eslint/no-floating-promises": "off",
// "@typescript-eslint/restrict-template-expressions": "off",
// "@typescript-eslint/no-misused-promises": "off",
},
};
3 changes: 3 additions & 0 deletions backend/.estlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
coverage
node_modules
Loading

0 comments on commit 819e9f8

Please sign in to comment.