Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

[WIP] - fix all eslint issues #426

Open
wants to merge 1 commit into
base: feature/migrate-to-hardhat
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
**/node_modules/*
**/truffle.js
**/cache/*
**/job-launcher-client/*
**/job-launcher-client/*
**/escrow-dashboard/*
**/job-launcher-server/*
2 changes: 1 addition & 1 deletion escrow-dashboard/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "escrow-scanner",
"name": "@humanprotocol/escrow-dashboard",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand Down
21 changes: 10 additions & 11 deletions escrow-dashboard/src/components/Escrow/EscrowContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ import { NetworkTab } from './NetworkTab';

interface IEscrowContainer {}

export const EscrowContainer: React.FC<
IEscrowContainer
> = (): React.ReactElement => {
return (
<Box>
<ViewTitle title="Network" iconUrl={networkSvg} />
<NetworkTab />
<EscrowView />
</Box>
);
};
export const EscrowContainer: React.FC<IEscrowContainer> =
(): React.ReactElement => {
return (
<Box>
<ViewTitle title="Network" iconUrl={networkSvg} />
<NetworkTab />
<EscrowView />
</Box>
);
};
19 changes: 9 additions & 10 deletions escrow-dashboard/src/components/Token/TokenContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import { TokenView } from './TokenView';

interface ITokenContainer {}

export const TokenContainer: React.FC<
ITokenContainer
> = (): React.ReactElement => {
return (
<Box mt={{ xs: 4, md: 8 }}>
<ViewTitle title="Token" iconUrl={tokenSvg} />
export const TokenContainer: React.FC<ITokenContainer> =
(): React.ReactElement => {
return (
<Box mt={{ xs: 4, md: 8 }}>
<TokenView />
<ViewTitle title="Token" iconUrl={tokenSvg} />
<Box mt={{ xs: 4, md: 8 }}>
<TokenView />
</Box>
</Box>
</Box>
);
};
);
};
58 changes: 53 additions & 5 deletions job-launcher-client/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,58 @@
{
"extends": [
"@gemunion/eslint-config/presets/ts",
"@gemunion/eslint-config/rules/jest"
"extends": [
"airbnb",
"plugin:prettier/recommended",
"prettier"
],
"parserOptions": {
"project": "./job-launcher-server/tsconfig.test.json"
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx", ".d.ts"]
},
"typescript": {}
}
},
"parser": "babel-eslint",
"plugins": [
"react",
"react-hooks"
],
"parserOptions": { "sourceType": "module" },
"rules": {
"consistent-return": 0,
"import/prefer-default-export": 0,
"no-case-declarations": 0,
"no-alert":0,
"no-console":0,
"no-param-reassign": 0,
"no-underscore-dangle": 0,
"prettier/prettier": ["error", { "singleQuote": true }],
"react/jsx-filename-extension": 0,
"react/prop-types": 0,
"react/no-unescaped-entities": 0,
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {
"no-undef": "off"
}
}
],
"env": {
"browser": true,
"jest": true,
"node": true
},
"root": true
}
16 changes: 8 additions & 8 deletions job-launcher-client/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import type { Config } from "@jest/types";
import type { Config } from '@jest/types';

export default async (): Promise<Config.InitialOptions> => {
return {
verbose: true,
moduleDirectories: ["node_modules", "<rootDir>"],
moduleDirectories: ['node_modules', '<rootDir>'],
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/src/__mocks__/fileMock.js",
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/src/__mocks__/fileMock.js',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
},
transformIgnorePatterns: [
"/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)",
'/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)',
],
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
testEnvironment: "jsdom",
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
testEnvironment: 'jsdom',
};
};
2 changes: 1 addition & 1 deletion job-launcher-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "job-launcher-client",
"name": "@humanprotocol/job-launcher-client",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand Down
10 changes: 7 additions & 3 deletions job-launcher-server/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"extends": [
"@gemunion/eslint-config/presets/ts",
"@gemunion/eslint-config/rules/jest"
"airbnb-base",
"plugin:jest/recommended",
"plugin:node/recommended",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"project": "./job-launcher-server/tsconfig.test.json"
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off"
Expand Down
6 changes: 3 additions & 3 deletions job-launcher-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"license": "MIT",
"name": "@humanprotocol/job-launcher",
"name": "@humanprotocol/job-launcher-server",
"private": true,
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
Expand All @@ -12,15 +12,15 @@
"description": "Job Launcher",
"version": "0.0.1",
"engines": {
"node": ">=12.13 <=14.19.3"
"node": ">=12.13 <=14.20.1"
},
"main": "./dist/index.js",
"scripts": {
"build": "tsc",
"db:restart": "docker-compose down && docker-compose up -d",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"kill": "sudo pkill -9 node",
"lint": "eslint . --fix",
"lint": "eslint src/**/*.ts --fix",
"migration:create": "npm run typeorm migration:create -- -n",
"migration:generate": "npm run typeorm migration:generate -- -n",
"migration:revert": "npm run typeorm migration:revert",
Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"directories": {
"test": "test"
},
"private": true,
"scripts": {
"compile": "hardhat compile",
"deploy": "hardhat run scripts/deploy.ts",
"verify": "hardhat verify",
"lint": "eslint . --fix",
"lint": "yarn workspaces run lint",
"test": "hardhat test",
"test:e2e": "scripts/e2e",
"test:gas": "RUN_EVM=true REPORT_GAS=true scripts/test",
Expand Down Expand Up @@ -88,5 +89,10 @@
"typechain": "^8.1.0",
"typescript": "4.3.5",
"xdeployer": "^1.1.20"
}
},
"workspaces": [
"escrow-dashboard",
"job-launcher-client",
"job-launcher-server"
]
}
Loading