Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP 102: convert to ts, apply lint and prettier #16

Merged
merged 12 commits into from
Mar 10, 2022
Merged
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
14 changes: 7 additions & 7 deletions .env
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
REACT_APP_CONTRACTS_RELAY_HUB=0x86c406E582A360A1BfE363e28988Ae96780bEEe3
REACT_APP_CONTRACTS_DEPLOY_VERIFIER=0x379E17449269350D1AD846833Dc0438415fe43Ca
REACT_APP_CONTRACTS_RELAY_VERIFIER=0x22D26470BC3Ff3F0F2af176dF8c39ec5faF48274
REACT_APP_CONTRACTS_SMART_WALLET_FACTORY=0x0c05f0C33D50A4758E50BC9ECA995eA097Fd4889
REACT_APP_CONTRACTS_SMART_WALLET=0xFAF0d39D89D41A6A1E6D939cD55126a46a1E75B1
REACT_APP_CONTRACTS_RIF_TOKEN=0xe639cbf39e10EEF13114006c378B1Aae8b9bD23c
REACT_APP_CONTRACTS_RELAY_WORKER=0x860f96609aa2bab2fa3bec1d2279ea790e0b51d1
REACT_APP_CONTRACTS_RELAY_HUB=0xE0825f57Dd05Ef62FF731c27222A86E104CC4Cad
REACT_APP_CONTRACTS_DEPLOY_VERIFIER=0x1eD614cd3443EFd9c70F04b6d777aed947A4b0c4
REACT_APP_CONTRACTS_RELAY_VERIFIER=0x5159345aaB821172e795d56274D0f5FDFdC6aBD9
REACT_APP_CONTRACTS_SMART_WALLET_FACTORY=0x03F23ae1917722d5A27a2Ea0Bcc98725a2a2a49a
REACT_APP_CONTRACTS_SMART_WALLET=0x73ec81da0C72DD112e06c09A6ec03B5544d26F05
REACT_APP_CONTRACTS_RIF_TOKEN=0x726ECC75d5D51356AA4d0a5B648790cC345985ED
REACT_APP_CONTRACTS_RELAY_WORKER=0x69862e277eab81e6a7ea6a7b387c39b2a996e533
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes aren't required and can be reverted

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason to prefer one set of values over the other?

Copy link
Collaborator Author

@antomor antomor Mar 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not, these are the ones that are generated from my local env, but it doesn't really matter for me

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave as-is then 👍


REACT_APP_RIF_RELAY_CHAIN_ID=33
REACT_APP_RIF_RELAY_GAS_PRICE_FACTOR_PERCENT=0
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.github
39 changes: 39 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// a11y rules are disabled because of out-of-scope for this sample app
const a11yOff = Object.keys(require('eslint-plugin-jsx-a11y').rules).reduce(
(acc, rule) => {
acc[`jsx-a11y/${rule}`] = 'off';
return acc;
},
{}
);

module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'plugin:react/recommended',
'airbnb',
'airbnb-typescript',
'prettier'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module',
project: './tsconfig.json'
},
plugins: ['react', '@typescript-eslint'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
...a11yOff,
'no-alert': 'off',
// TODO: we need to replace the console.log calls with a log library
'no-console': 'off'
}
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

yarn.lock
yarn.lock
.eslintcache
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
mortelli marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.gitignore
.prettierignore
package.json
package-lock.json
prettierrc.json5
Readme.md
tsconfig.json
.eslintignore
.eslintrc
node_modules
webpack.config.js
build
dist
.github
9 changes: 9 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"trailingComma": "none",
"tabWidth": 4,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": true,
"bracketSpacing": true,
"arrowParens": "always"
}
Loading