Skip to content

Commit

Permalink
Thesis - eslint config (#143)
Browse files Browse the repository at this point in the history
Refs: #99 

Updated "@thesis-co/eslint-config" version to
"github:thesis/eslint-config#7b9bc8.
Due to the above change, it was necessary to add a few eslint rules.

If we have time for it, we can also address changes to the related
components to limit the number of added rules. The rule
"@typescript-eslint/no-unsafe-member-access", applies to an external
library that does not fit into our default eslint configuration, hence
the need to leave it.
  • Loading branch information
nkuba authored Jan 11, 2024
2 parents 09b5ff5 + f903ed1 commit c57a289
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 4 deletions.
59 changes: 58 additions & 1 deletion dapp/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,65 @@
2,
{ "allowRequiredDefaults": true }
],
"react/require-default-props": [0]
"react/require-default-props": [0],
},
// FIXME:
// This is temporary solution after changes of the eslint-config version: @thesis-co/eslint-config: "github:thesis/eslint-config#7b9bc8c"
// Overrides rules should be fixed file by file.
"overrides": [
{
"files": [
"src/components/Header/ConnectWallet.tsx",
"src/components/Modals/Support/MissingAccount.tsx",
"src/components/Modals/Staking/SignMessage.tsx",
"src/hooks/useDepositBTCTransaction.ts",
"src/components/shared/Form/FormTokenBalanceInput.tsx"
],
"rules": {
"@typescript-eslint/no-misused-promises": "off"
}
},
{
"files": [
"src/hooks/useSignMessage.ts"
],
"rules": {
"@typescript-eslint/no-floating-promises": "off"
}
},
{
"files": [
"src/theme/*"
],
"rules": {
"@typescript-eslint/unbound-method": "off"
}
},
{
"files": [
"src/theme/Alert.ts"
],
"rules": {
"@typescript-eslint/no-unsafe-member-access": "off"
}
},
{
"files": [
"src/components/shared/Form/FormTokenBalanceInput.tsx"
],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "off"
}
},
{
"files": [
"src/components/shared/TokenAmountForm/index.tsx"
],
"rules": {
"@typescript-eslint/require-await": "off"
}
}
],
"settings": {
"import/resolver": {
"alias": {
Expand Down
2 changes: 1 addition & 1 deletion dapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"react-number-format": "^5.3.1"
},
"devDependencies": {
"@thesis-co/eslint-config": "^0.6.1",
"@thesis-co/eslint-config": "github:thesis/eslint-config#7b9bc8c",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.12.0",
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c57a289

Please sign in to comment.