Skip to content

Commit

Permalink
fix: eslint, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
m00n620 committed Nov 11, 2022
1 parent 61517d0 commit 6c53888
Show file tree
Hide file tree
Showing 41 changed files with 1,049 additions and 556 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci-test-escrow-dashboard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Escrow dashboard check

on:
pull_request:
workflow_dispatch:

jobs:
core-test:
name: Escrow Dashboard Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: yarn --ignore-scripts
name: Install dependencies
- run: yarn escrow-dashboard:test
name: Run escrow-dashboard test
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 80,
"arrowParens": "always",
"overrides": [
{
"files": "*.sol",
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"core:lint": "yarn workspace @human-protocol/core lint",
"subgraph:test": "yarn workspace @human-protocol/subgraph test",
"subgraph:lint": "yarn workspace @human-protocol/subgraph lint",
"escrow-dashboard:test": "yarn workspace @human-protocol/escrow-dashboard test",
"escrow-dashboard:lint": "yarn workspace @human-protocol/escrow-dashboard lint",
"test": "concurrently npm:core:test npm:subgraph:test",
"lint": "concurrently npm:core:lint npm:subgraph:lint",
"lint": "concurrently npm:core:lint npm:subgraph:lint npm:escrow-dashboard:lint",
"prepare": "husky install"
},
"workspaces": [
Expand Down
10 changes: 9 additions & 1 deletion packages/apps/escrow-dashboard/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@
"tsx": "never"
}
],
"import/named": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-var-requires": 0
"@typescript-eslint/no-var-requires": 0,
"max-len": [
"warn",
{
"code": 80
}
],
"prettier/prettier": 0
},
"overrides": [
{
Expand Down
1 change: 1 addition & 0 deletions packages/apps/escrow-dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.test.tsx.snap
18 changes: 0 additions & 18 deletions packages/apps/escrow-dashboard/Dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions packages/apps/escrow-dashboard/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
'@babel/preset-react',
],
plugins: ['@babel/plugin-transform-runtime'],
};
4 changes: 3 additions & 1 deletion packages/apps/escrow-dashboard/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Config } from '@jest/types';
import { Config } from '@jest/types';

// eslint-disable-next-line import/no-anonymous-default-export
export default async (): Promise<Config.InitialOptions> => {
return {
verbose: true,
Expand All @@ -13,5 +14,6 @@ export default async (): Promise<Config.InitialOptions> => {
'/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)',
],
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testEnvironment: 'jsdom',
};
};
30 changes: 26 additions & 4 deletions packages/apps/escrow-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@types/node": "^17.0.38",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"babel-jest": "26.6.0",
"classnames": "^2.3.1",
"dayjs": "^1.11.5",
"ethers": "^5.7.2",
Expand All @@ -30,13 +31,18 @@
"react-test-renderer": "^17.0.2",
"recharts": "^2.1.14",
"serve": "^13.0.2",
"ts-jest": "^26.5.6",
"ts-jest": "26.5.6",
"ts-node": "^10.8.1",
"typescript": "^4.7.2",
"web-vitals": "^2.1.4"
},
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@types/numeral": "^2.0.2",
"@types/react-test-renderer": "^18.0.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-typescript": "^2.7.1",
Expand All @@ -51,9 +57,10 @@
"start": "react-scripts start",
"start-prod": "serve -s build",
"build": "react-scripts build",
"test": "jest --testPathPattern=src/__tests__",
"test:watch": "jest --watchAll --testPathPattern=src/__tests__",
"eject": "react-scripts eject"
"test": "jest --updateSnapshot",
"test:watch": "jest --watchAll",
"eject": "react-scripts eject",
"format": "prettier --write '**/*.{ts,tsx}'"
},
"eslintConfig": {
"extends": [
Expand All @@ -73,6 +80,15 @@
"last 1 safari version"
]
},
"babel": {
"presets": [
"@babel/preset-react",
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-react-jsx"
]
},
"jest": {
"preset": "ts-jest",
"transform": {
Expand All @@ -81,5 +97,11 @@
"setupFilesAfterEnv": [
"@testing-library/jest-dom/"
]
},
"lint-staged": {
"*.{ts,tsx}": [
"prettier --write",
"eslint --fix"
]
}
}
14 changes: 0 additions & 14 deletions packages/apps/escrow-dashboard/script.sh

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 6c53888

Please sign in to comment.