-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from rob-at-airwalk/main
feat: cleanup and re baseline
- Loading branch information
Showing
551 changed files
with
35,136 additions
and
342,104 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:18.18-alpine | ||
FROM node:lts-alpine | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
|
@@ -18,26 +18,26 @@ RUN apk add doas git github-cli; \ | |
RUN git config --global url."[email protected]:".insteadOf "https://github.com/" | ||
RUN git config --global url."[email protected]:".insteadOf "https://ssh.dev.azure.com/" | ||
|
||
## fix npm file issues | ||
RUN mkdir /tmp/npm \ | ||
&& mkdir /tmp/npm-cache \ | ||
&& npm config set prefix /tmp/npm \ | ||
&& npm config set cache /tmp/npm-cache \ | ||
&& chown -R $USERNAME /tmp/npm \ | ||
&& mkdir /workspaces && chown -R $USERNAME /workspaces | ||
# ## fix npm file issues | ||
# RUN mkdir /tmp/npm \ | ||
# && mkdir /tmp/npm-cache \ | ||
# && npm config set prefix /tmp/npm \ | ||
# && npm config set cache /tmp/npm-cache \ | ||
# && chown -R $USERNAME /tmp/npm \ | ||
# && mkdir /workspaces && chown -R $USERNAME /workspaces | ||
## fix M1 pupetteer issues | ||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium | ||
|
||
# [Optional] Set the default user. Omit if you want to keep the default as root. | ||
USER $USERNAME | ||
|
||
COPY . /tmp/npm | ||
# COPY . /tmp/npm | ||
|
||
RUN doas chown -R $USERNAME /tmp/npm | ||
RUN npm config set prefix /tmp/npm | ||
RUN yarn config set prefix /tmp/npm | ||
RUN cd /tmp/npm && npm i | ||
# RUN doas chown -R $USERNAME /tmp/npm | ||
# RUN npm config set prefix /tmp/npm | ||
# RUN yarn config set prefix /tmp/npm | ||
# RUN npm i | ||
# RUN git clone https://github.com/AirWalk-Digital/airview-mdx.git /tmp/airview-mdx && cd /tmp/airview-mdx && npm i && npm link | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// See https://aka.ms/vscode-remote/devcontainer.json for format details or | ||
// https://aka.ms/vscode-dev-containers/definitions for sample configurations. | ||
{ | ||
"name": "Airview Next", | ||
"dockerFile": "Dockerfile.vscode", | ||
"remoteUser": "vscode", | ||
//"mounts": [ | ||
// "source=/Users/robe/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached" | ||
//], | ||
"forwardPorts": [3000, 6006], | ||
"portsAttributes": { | ||
"3000": { | ||
"label": "Next JS", | ||
"onAutoForward": "silent" | ||
}, | ||
"6006": { | ||
"label": "Storybook", | ||
"onAutoForward": "silent" | ||
} | ||
}, | ||
// "postCreateCommand": "", | ||
"postCreateCommand": { | ||
// "fix npm" : "rm -Rf /workspaces/airview-next/node_modules && ln -s /tmp/npm/node_modules /workspaces/airview-next/node_modules" | ||
"install modules": "cd ${containerWorkspaceFolder} && npm i" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"mikestead.dotenv", | ||
"csstools.postcss", | ||
"bradlc.vscode-tailwindcss", | ||
"Orta.vscode-jest", | ||
"humao.rest-client", | ||
"yoavbls.pretty-ts-errors", | ||
"ms-playwright.playwright", | ||
"github.vscode-github-actions", | ||
"lokalise.i18n-ally", | ||
"GitHub.copilot", | ||
"esbenp.prettier-vscode" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
# Etherpad | ||
ETHERPAD_API_KEY= | ||
ETHERPAD_BASE_URL= | ||
ETHERPAD_URL= | ||
|
||
# FontAwesome | ||
FONTAWESOME_NPM_AUTH_TOKEN= | ||
|
||
# Github | ||
GITHUB_REPO_NAME= | ||
GITHUB_ORG_NAME= | ||
GITHUB_INSTALLATION_ID= | ||
GITHUB_APP_ID= | ||
GITHUB_PRIVATE_KEY_FILE= | ||
|
||
# Redis | ||
REDIS_HOST=172.17.0.1 | ||
REDIS_PASSWORD= | ||
REDIS_PORT= | ||
INDEX_NAME= | ||
|
||
# SharePoint | ||
SHAREPOINT_CLIENT_ID= | ||
SHAREPOINT_TENANT= | ||
SHAREPOINT_PRIVATE_KEY_FILE= | ||
SHAREPOINT_PRIVATE_KEY_THUMBPRINT= | ||
SHAREPOINT_BASE= | ||
|
||
# Timesheet Portal | ||
TSP_CLIENT_ID= | ||
TSP_CLIENT_SECRET= | ||
|
||
# Microsoft Graph | ||
AZURE_APP_CLIENT_ID= | ||
AZURE_APP_CLIENT_SECRET= | ||
AZURE_TENANT_ID= | ||
|
||
# OpenAI | ||
OPENAI_API_KEY= | ||
MODEL_TEMPERATURE=0.8 | ||
|
||
# Sentry.io | ||
# SENTRY_AUTH_TOKEN= | ||
|
||
# Langchain | ||
SIMILARITY_THRESHOLD=0.8 | ||
# LANGCHAIN_API_KEY= | ||
# LANGCHAIN_PROJECT= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules | ||
out | ||
docs | ||
.storybook | ||
.archive | ||
.next | ||
storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
{ | ||
// Configuration for JavaScript files | ||
"extends": [ | ||
"airbnb-base", | ||
"next/core-web-vitals", // Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration' | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} | ||
], // Avoid conflict rule between Prettier and Airbnb Eslint | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"js": "never", | ||
"jsx": "never", | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
] | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [".js", ".jsx", ".ts", ".tsx"] | ||
} | ||
} | ||
}, | ||
"overrides": [ | ||
// Configuration for TypeScript files | ||
{ | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"unused-imports", | ||
"tailwindcss", | ||
"simple-import-sort" | ||
], | ||
"extends": [ | ||
"plugin:tailwindcss/recommended", | ||
"airbnb", | ||
"airbnb-typescript", | ||
"next/core-web-vitals", | ||
"plugin:prettier/recommended" | ||
], | ||
"parserOptions": { | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"endOfLine": "auto" | ||
} | ||
], // Avoid conflict rule between Prettier and Airbnb Eslint | ||
"import/extensions": "off", // Avoid missing file extension errors, TypeScript already provides a similar feature | ||
"react/function-component-definition": "off", // Disable Airbnb's specific function type | ||
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable | ||
"react/require-default-props": "off", // Allow non-defined react props as undefined | ||
"react/jsx-props-no-spreading": "off", // _app.tsx uses spread operator and also, react-hook-form | ||
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier | ||
"@typescript-eslint/consistent-type-imports": "error", // Ensure `import type` is used when it's necessary | ||
"no-restricted-syntax": [ | ||
"error", | ||
"ForInStatement", | ||
"LabeledStatement", | ||
"WithStatement" | ||
], // Overrides Airbnb configuration and enable no-restricted-syntax | ||
"import/prefer-default-export": "off", // Named export is easier to refactor automatically | ||
"simple-import-sort/imports": "error", // Import configuration for `eslint-plugin-simple-import-sort` | ||
"simple-import-sort/exports": "error", // Export configuration for `eslint-plugin-simple-import-sort` | ||
"import/order": "off", // Avoid conflict rule between `eslint-plugin-import` and `eslint-plugin-simple-import-sort` | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"unused-imports/no-unused-imports": "error", | ||
"unused-imports/no-unused-vars": [ | ||
"error", | ||
{ | ||
"argsIgnorePattern": "^_" | ||
} | ||
] | ||
} | ||
}, | ||
// Configuration for testing | ||
{ | ||
"files": ["**/*.test.ts", "**/*.test.tsx"], | ||
"plugins": ["jest", "jest-formatting", "testing-library", "jest-dom"], | ||
"extends": [ | ||
"plugin:jest/recommended", | ||
"plugin:jest-formatting/recommended", | ||
"plugin:testing-library/react", | ||
"plugin:jest-dom/recommended" | ||
] | ||
}, | ||
// Configuration for e2e testing (Playwright) | ||
{ | ||
"files": ["**/*.spec.ts"], | ||
"extends": ["plugin:playwright/recommended"] | ||
}, | ||
// Configuration for Storybook | ||
{ | ||
"files": ["*.stories.*"], | ||
"extends": ["plugin:storybook/recommended"], | ||
"rules": { | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": true | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.