Skip to content

Commit 72c2e05

Browse files
Drift from template
1 parent 4f36f0f commit 72c2e05

File tree

27 files changed

+6363
-26118
lines changed

27 files changed

+6363
-26118
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Build Docs"
2+
description: "build jekyll docs"
3+
inputs:
4+
version:
5+
description: "Version number"
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 18
15+
- name: Npm cli install
16+
working-directory: ./docs
17+
run: npm ci
18+
shell: bash
19+
- name: Setup Ruby
20+
uses: ruby/[email protected]
21+
with:
22+
ruby-version: "3.2" # Not needed with a .ruby-version file
23+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
24+
cache-version: 0 # Increment this number if you need to re-download cached gems
25+
working-directory: "./docs"
26+
- name: Setup Pages
27+
id: pages
28+
uses: actions/configure-pages@v5
29+
- name: Build with Jekyll
30+
working-directory: ./docs
31+
# Outputs to the './_site' directory by default
32+
shell: bash
33+
run: make build BASE_URL="${{ steps.pages.outputs.base_path }}" VERSION="${{ inputs.version }}"
34+
#run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
35+
env:
36+
JEKYLL_ENV: production
37+
- name: Upload artifact
38+
# Automatically uploads an artifact from the './_site' directory by default
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: "docs/_site/"
42+
name: jekyll-docs-${{ inputs.version }}

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ terraform 1.9.2
77
terraform-docs 0.19.0
88
trivy 0.61.0
99
vale 3.6.0
10+
python 3.13.2
1011

1112
# ==============================================================================
1213
# The section below is reserved for Docker image versions.

eslint.config.mjs

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
import jest from 'eslint-plugin-jest';
2+
import jsxA11y from 'eslint-plugin-jsx-a11y';
3+
import prettierRecommended from 'eslint-plugin-prettier/recommended';
4+
import { importX } from 'eslint-plugin-import-x';
5+
import * as eslintImportResolverTypescript from 'eslint-import-resolver-typescript';
6+
import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
7+
import react from 'eslint-plugin-react';
8+
import security from 'eslint-plugin-security';
9+
import sonarjs from 'eslint-plugin-sonarjs';
10+
import json from 'eslint-plugin-json';
11+
import unicorn from 'eslint-plugin-unicorn';
12+
import { defineConfig, globalIgnores } from 'eslint/config';
13+
import js from '@eslint/js';
14+
import html from 'eslint-plugin-html';
15+
import tseslint from 'typescript-eslint';
16+
import sortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
17+
import {
18+
configs as airbnbConfigs,
19+
plugins as airbnbPlugins,
20+
} from 'eslint-config-airbnb-extended';
21+
import { rules as prettierConfigRules } from 'eslint-config-prettier';
22+
23+
import { dirname } from 'node:path';
24+
import { fileURLToPath } from 'node:url';
25+
import { FlatCompat } from '@eslint/eslintrc';
26+
27+
const __filename = fileURLToPath(import.meta.url);
28+
const __dirname = dirname(__filename);
29+
30+
const compat = new FlatCompat({
31+
baseDirectory: __dirname,
32+
});
33+
34+
export default defineConfig([
35+
globalIgnores([
36+
'**/*/coverage/*',
37+
'**/.build',
38+
'**/node_modules',
39+
'**/dist',
40+
'**/test-results',
41+
'**/playwright-report*',
42+
'eslint.config.mjs',
43+
]),
44+
45+
//imports
46+
importX.flatConfigs.recommended,
47+
{ rules: { ...airbnbPlugins.importX.rules } },
48+
49+
// js
50+
js.configs.recommended,
51+
airbnbPlugins.stylistic,
52+
airbnbConfigs.base.recommended,
53+
54+
// ts
55+
tseslint.configs.strictTypeChecked,
56+
tseslint.configs.stylisticTypeChecked,
57+
airbnbConfigs.base.typescript,
58+
airbnbPlugins.typescriptEslint,
59+
60+
{
61+
ignores: ['**/*.json'],
62+
languageOptions: {
63+
parserOptions: {
64+
projectService: true,
65+
tsconfigRootDir: import.meta.dirname,
66+
},
67+
},
68+
},
69+
70+
{
71+
files: ['**/*.json'],
72+
extends: [tseslint.configs.disableTypeChecked],
73+
},
74+
75+
{
76+
settings: {
77+
'import-x/resolver-next': [
78+
eslintImportResolverTypescript.createTypeScriptImportResolver({
79+
project: [
80+
'frontend/tsconfig.json',
81+
'lambdas/*/tsconfig.json',
82+
'tests/test-team/tsconfig.json',
83+
'utils/*/tsconfig.json',
84+
],
85+
}),
86+
],
87+
},
88+
},
89+
90+
{
91+
rules: {
92+
'@typescript-eslint/no-unused-vars': [
93+
2,
94+
{
95+
argsIgnorePattern: '^_',
96+
varsIgnorePattern: '^_',
97+
},
98+
],
99+
'@typescript-eslint/consistent-type-definitions': 0,
100+
},
101+
},
102+
103+
// unicorn
104+
unicorn.configs['recommended'],
105+
{
106+
rules: {
107+
'unicorn/prevent-abbreviations': 0,
108+
'unicorn/filename-case': [
109+
2,
110+
{
111+
case: 'kebabCase',
112+
ignore: ['.tsx'],
113+
},
114+
],
115+
'unicorn/no-null': 0,
116+
'unicorn/prefer-module': 0,
117+
'unicorn/import-style': [
118+
2,
119+
{
120+
styles: {
121+
path: {
122+
named: true,
123+
},
124+
},
125+
},
126+
],
127+
},
128+
},
129+
130+
// react
131+
react.configs.flat.recommended,
132+
airbnbConfigs.react.recommended,
133+
airbnbConfigs.react.typescript,
134+
airbnbPlugins.react,
135+
airbnbPlugins.reactHooks,
136+
airbnbPlugins.reactA11y,
137+
138+
// jest
139+
jest.configs['flat/recommended'],
140+
141+
// prettier
142+
prettierRecommended,
143+
{ rules: { ...prettierConfigRules, 'prettier/prettier': 2 } },
144+
145+
// jsxA11y
146+
{
147+
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
148+
plugins: {
149+
'jsx-a11y': jsxA11y,
150+
},
151+
languageOptions: {
152+
parserOptions: {
153+
ecmaFeatures: {
154+
jsx: true,
155+
},
156+
},
157+
},
158+
},
159+
160+
// security
161+
security.configs.recommended,
162+
163+
// sonar
164+
sonarjs.configs.recommended,
165+
166+
// html
167+
{
168+
files: ['**/*.html'],
169+
plugins: { html },
170+
},
171+
172+
// Next.js
173+
...compat.config({
174+
extends: ['next', 'next/core-web-vitals', 'next/typescript'],
175+
settings: {
176+
next: {
177+
rootDir: 'frontend',
178+
},
179+
},
180+
rules: {
181+
// needed because next lint rules look for a pages directory
182+
'@next/next/no-html-link-for-pages': 0,
183+
},
184+
}),
185+
186+
// json
187+
{
188+
files: ['**/*.json'],
189+
...json.configs['recommended'],
190+
},
191+
192+
// destructure sorting
193+
{
194+
name: 'eslint-plugin-sort-destructure-keys',
195+
plugins: {
196+
'sort-destructure-keys': sortDestructureKeys,
197+
},
198+
rules: {
199+
'sort-destructure-keys/sort-destructure-keys': 2,
200+
},
201+
},
202+
203+
// imports
204+
{
205+
rules: {
206+
'sort-imports': [
207+
2,
208+
{
209+
ignoreDeclarationSort: true,
210+
},
211+
],
212+
'import-x/extensions': 0,
213+
},
214+
},
215+
{
216+
files: ['**/*.ts', '**/*.tsx'],
217+
rules: {
218+
'import-x/no-unresolved': 0, // trust the typescript compiler to catch unresolved imports
219+
},
220+
},
221+
{
222+
files: ['tests/test-team/**'],
223+
rules: {
224+
'import-x/no-extraneous-dependencies': [
225+
2,
226+
{
227+
devDependencies: true,
228+
},
229+
],
230+
},
231+
},
232+
{
233+
files: ['**/utils/**', 'tests/test-team/**'],
234+
rules: {
235+
'import-x/prefer-default-export': 0,
236+
},
237+
},
238+
{
239+
plugins: {
240+
'no-relative-import-paths': noRelativeImportPaths,
241+
},
242+
rules: {
243+
'no-relative-import-paths/no-relative-import-paths': 2,
244+
},
245+
},
246+
{
247+
files: ['scripts/**'],
248+
rules: {
249+
'import-x/no-extraneous-dependencies': [
250+
'error',
251+
{ devDependencies: true },
252+
],
253+
},
254+
},
255+
256+
// misc rule overrides
257+
{
258+
rules: {
259+
'no-restricted-syntax': 0,
260+
'no-underscore-dangle': 0,
261+
'no-await-in-loop': 0,
262+
'no-plusplus': [2, { allowForLoopAfterthoughts: true }],
263+
'unicorn/prefer-top-level-await': 0, // top level await is not available in commonjs
264+
},
265+
},
266+
]);

infrastructure/terraform/bin/terraform.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ readonly component_name=$(basename ${component_path});
403403
# verify terraform version matches .tool-versions
404404
echo ${PWD}
405405
tool_version=$(grep "terraform " .tool-versions | cut -d ' ' -f 2)
406-
asdf plugin add terraform && asdf install terraform "${tool_version}"
406+
asdf plugin-add terraform && asdf install terraform "${tool_version}"
407407
current_version=$(terraform --version | head -n 1 | cut -d 'v' -f 2)
408408

409409
if [ -z "${current_version}" ] || [ "${current_version}" != "${tool_version}" ]; then
@@ -793,8 +793,8 @@ case "${action}" in
793793
;;
794794
*)
795795
echo -e "Generic action case invoked. Only the additional arguments will be passed to terraform, you break it you fix it:";
796-
echo -e "\tterraform ${action} ${extra_args}";
797-
terraform "${action}" ${extra_args} \
796+
echo -e "\tterraform ${action} ${extra_args} | tee terraform_output";
797+
terraform "${action}" ${extra_args} | tee terraform_output \
798798
|| error_and_die "Terraform ${action} failed.";
799799
;;
800800
esac;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

lambdas/example-lambda/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage
2+
node_modules
3+
dist
4+
.reports

0 commit comments

Comments
 (0)