-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move eslint & typescript configs into separate packages
- Loading branch information
1 parent
6d3b711
commit df8dcb4
Showing
21 changed files
with
668 additions
and
470 deletions.
There are no files selected for viewing
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,9 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["@umami/eslint-config/index.js"], | ||
parserOptions: { | ||
project: ["./apps/*/tsconfig.json", "./packages/*/tsconfig.json"], | ||
parser: "@typescript-eslint/parser", | ||
tsconfigRootDir: __dirname, | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -27,29 +27,24 @@ jobs: | |
node-version: 20.x | ||
cache: "yarn" | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- run: yarn install --immutable | ||
|
||
- name: Install Playwright Browsers & build the app | ||
run: yarn exec concurrently "yarn playwright install chromium --with-deps" "yarn build" | ||
- name: Install Playwright browser | ||
run: yarn workspace @umami/desktop playwright install chromium --with-deps | ||
|
||
- name: Start server | ||
run: yarn exec http-server build -p 3000 & | ||
|
||
- name: Run cucumber tests | ||
run: yarn test:e2e | ||
- run: yarn test:e2e | ||
|
||
- name: Cucumber Report to Annotations | ||
uses: deblockt/[email protected] | ||
if: always() | ||
with: | ||
access-token: ${{ secrets.GITHUB_TOKEN }} | ||
path: "test-results/cucumber-report.json" | ||
path: "apps/dekstop/test-results/cucumber-report.json" | ||
show-global-summary-report: true | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: cucumber-report | ||
path: test-results/cucumber-report.html | ||
path: apps/dekstop/test-results/cucumber-report.html | ||
retention-days: 10 |
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ concurrency: | |
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-latest-m | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
steps: | ||
|
@@ -32,24 +32,8 @@ jobs: | |
node-version: 20.x | ||
cache: "yarn" | ||
|
||
- name: Install packages | ||
run: yarn install --immutable | ||
- run: yarn install --immutable | ||
|
||
- name: Run checks | ||
run: turbo check-types lint:ci format:ci test | ||
- run: yarn ci | ||
|
||
- name: Circular dependencies check | ||
run: npx madge --circular src/index.tsx | ||
|
||
- name: Run tests | ||
uses: ArtiomTr/[email protected] | ||
with: | ||
skip-step: install | ||
test-script: yarn test | ||
annotations: coverage | ||
base-coverage-file: report.json | ||
prnumber: ${{ steps.findPr.outputs.number }} | ||
|
||
- name: Audit dependencies | ||
# Exclude @toruslabs/customauth from audit until it's upgraded | ||
run: yarn npm audit --exclude @toruslabs/customauth | ||
- run: yarn test |
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 |
---|---|---|
|
@@ -33,7 +33,7 @@ yarn-error.log* | |
.vscode | ||
|
||
settings.json | ||
/test-results/ | ||
test-results/ | ||
|
||
*.tsbuildinfo | ||
docs/ | ||
|
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,9 +1,9 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["@umami/eslint-config/index.js"], | ||
parserOptions: { | ||
// tsconfig.e2e.json includes both src and src/e2e | ||
project: "./tsconfig.e2e.json", | ||
parser: "@typescript-eslint/parser", | ||
tsconfigRootDir: __dirname, | ||
}, | ||
}; |
File renamed without changes.
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
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
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,5 +1,5 @@ | ||
{ | ||
"name": "umami-desktop", | ||
"name": "@umami/desktop", | ||
"productName": "umami", | ||
"version": "2.2.0", | ||
"author": "Trilitech <[email protected]>", | ||
|
@@ -13,22 +13,24 @@ | |
"type": "commonjs", | ||
"main": "build/electron.js", | ||
"scripts": { | ||
"audit": "yarn npm audit --exclude @toruslabs/customauth", | ||
"build": "vite build", | ||
"dev": "vite dev --host 127.0.0.1", | ||
"preview": "vite preview", | ||
"preview": "vite preview --host 127.0.0.1 --port 3000", | ||
"electron:package:linux": "electron-builder -l", | ||
"electron:package:mac": "electron-builder -m", | ||
"electron:package:mac:debug": "DEBUG=true yarn build --mode dev && sed -i='' 's@devTools: false@devTools: true@g' build/electron.js && yarn electron:package:mac -c electron-builder.dev.yml && rm -rf build", | ||
"electron:package:win": "electron-builder -w", | ||
"electron:start": "electronmon .", | ||
"check-circular-deps": "npx madge --circular src/index.tsx", | ||
"docs": "typedoc --tsconfig tsconfig.e2e.json", | ||
"format:ci": "prettier --check .", | ||
"format:ci": "prettier --ignore-path ../../.gitignore --check .", | ||
"format": "prettier --write .", | ||
"lint:ci": "eslint src --ext .js,.jsx,.ts,.tsx --max-warnings=0", | ||
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix --config ../../.eslintrc", | ||
"test": "cross-env TZ=CET jest", | ||
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix", | ||
"test": "cross-env TS_NODE_PROJECT=./tsconfig.json TZ=CET jest", | ||
"test:watch": "cross-env DEV=true yarn test --watch", | ||
"test:e2e": "cross-env TS_NODE_PROJECT=tsconfig.e2e.json cucumber-js", | ||
"test:e2e": "cross-env TS_NODE_PROJECT=tsconfig.e2e.json start-server-and-test \"yarn preview\" http://127.0.0.1:3000 cucumber-js", | ||
"test:e2e:focus": "yarn test:e2e --tags='@focus'", | ||
"theme:watch": "chakra-cli tokens src/style/theme.ts --watch", | ||
"theme": "chakra-cli tokens src/style/theme.ts", | ||
|
@@ -82,36 +84,21 @@ | |
"@types/react": "18.3.3", | ||
"@types/react-dom": "18.3.0", | ||
"@types/react-test-renderer": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.13.0", | ||
"@typescript-eslint/parser": "^7.13.0", | ||
"@tzkt/sdk-api": "^2.2.1", | ||
"@umami/eslint-config": "workspace:*", | ||
"@umami/typescript-config": "workspace:*", | ||
"@vitejs/plugin-react": "^4.3.1", | ||
"axios": "^1.7.2", | ||
"babel-jest": "^29.7.0", | ||
"bignumber.js": "^9.1.2", | ||
"bip39": "^3.1.0", | ||
"concurrently": "^8.2.2", | ||
"cross-env": "^7.0.3", | ||
"date-fns": "^3.6.0", | ||
"electron": "^31.0.1", | ||
"electron-builder": "^24.13.3", | ||
"electronmon": "^2.0.3", | ||
"eslint": "^8.57.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-chakra-ui": "^0.11.0", | ||
"eslint-plugin-deprecation": "^3.0.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jest": "^28.6.0", | ||
"eslint-plugin-jest-dom": "^5.4.0", | ||
"eslint-plugin-playwright": "^1.6.2", | ||
"eslint-plugin-react": "^7.34.2", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-redux": "^4.1.0", | ||
"eslint-plugin-testing-library": "^6.2.2", | ||
"eslint-plugin-tsdoc": "^0.3.0", | ||
"eslint-plugin-unused-imports": "^3.2.0", | ||
"framer-motion": "^11.2.10", | ||
"http-server": "^14.1.1", | ||
"identity-obj-proxy": "^3.0.0", | ||
"immer": "^10.1.1", | ||
"jest": "29.7.0", | ||
|
@@ -145,6 +132,7 @@ | |
"react-test-renderer": "^18.3.1", | ||
"redux": "^5.0.1", | ||
"redux-persist": "^6.0.0", | ||
"start-server-and-test": "^2.0.4", | ||
"ts-node": "^10.9.2", | ||
"typedoc": "^0.25.13", | ||
"typedoc-plugin-missing-exports": "^2.3.0", | ||
|
@@ -155,7 +143,7 @@ | |
"zipurl": "^0.2.18", | ||
"zod": "^3.23.8" | ||
}, | ||
"packageManager": "yarn@4.2.2", | ||
"packageManager": "yarn@4.3.0", | ||
"dependencies": { | ||
"electron-updater": "^6.2.1" | ||
}, | ||
|
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
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 +1 @@ | ||
export const IS_DEV = import.meta.env.DEV; | ||
export const IS_DEV = !!import.meta.env.DEV; |
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
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,23 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
"incremental": true, | ||
"types": ["vite/client"] | ||
}, | ||
"compilerOptions": { "types": ["vite/client"] }, | ||
"extends": "@umami/typescript-config/tsconfig.json", | ||
"include": ["src", "vite.config.ts", "jest.config.ts"], | ||
"exclude": ["src/e2e"] | ||
} |
File renamed without changes.
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
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
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,32 @@ | ||
{ | ||
"name": "@umami/eslint-config", | ||
"main": "index.js", | ||
"type": "commonjs", | ||
"packageManager": "[email protected]", | ||
"license": "MIT", | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": { | ||
"@stylistic/eslint-plugin": "^2.1.0", | ||
"@tanstack/eslint-plugin-query": "^5.43.1", | ||
"@typescript-eslint/eslint-plugin": "^7.13.0", | ||
"@typescript-eslint/parser": "^7.13.0", | ||
"@umami/typescript-config": "workspace:*", | ||
"eslint": "^8.57.0", | ||
"eslint-import-resolver-typescript": "^3.6.1", | ||
"eslint-plugin-chakra-ui": "^0.11.0", | ||
"eslint-plugin-deprecation": "^3.0.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-jest": "^28.6.0", | ||
"eslint-plugin-jest-dom": "^5.4.0", | ||
"eslint-plugin-playwright": "^1.6.2", | ||
"eslint-plugin-react": "^7.34.2", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-redux": "^4.1.0", | ||
"eslint-plugin-testing-library": "^6.2.2", | ||
"eslint-plugin-tsdoc": "^0.3.0", | ||
"eslint-plugin-unused-imports": "^3.2.0", | ||
"typescript": "^5.4.5" | ||
} | ||
} |
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 @@ | ||
{ | ||
"name": "@umami/typescript-config", | ||
"license": "MIT", | ||
"files": [ | ||
"tsconfig.json" | ||
] | ||
} |
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,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react-jsx", | ||
"incremental": true | ||
} | ||
} |
Oops, something went wrong.