Skip to content

Commit

Permalink
chore: 🤖 update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
fpbrault committed Aug 28, 2022
1 parent 136488d commit e451139
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 112 deletions.
23 changes: 6 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,16 @@ module.exports = {
}
}
},
plugins: ["simple-import-sort", "@typescript-eslint", "react", "prettier"],
plugins: ["simple-import-sort", "prettier"],
env: {
browser: true,
node: true,
es2020: true
},
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended" // Make this the last element so prettier config overrides other formatting rules
],
extends: ["plugin:@typescript-eslint/recommended",
"next",
"next/core-web-vitals",
"prettier"],
rules: {
// suppress errors for missing 'import React' in files
"react/react-in-jsx-scope": "off",
Expand All @@ -45,16 +40,10 @@ module.exports = {
"react/prop-types": "off",
"jsx-a11y/anchor-is-valid": "off",
"react/jsx-props-no-spreading": ["error", { custom: "ignore" }],
"prettier/prettier": "error",
"react/no-unescaped-entities": "off",
"import/no-cycle": [0, { ignoreExternal: true }],
"prefer-const": "off",
// needed because of https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md#how-to-use & https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{ functions: false, classes: false, variables: true }
]
"@typescript-eslint/explicit-module-boundary-types": "off"
}
};
103 changes: 42 additions & 61 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,142 +4,123 @@ All notable changes to this project will be documented in this file. See [standa

### [0.4.1](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.4.0...v0.4.1) (2022-01-14)


### Features

* 🎸 Add vote unlock chart on vote percentage button ([06db025](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/06db0251349a14138f676ce7bcc0426f8821d28d))
* 🎸 updated favicon ([2cd4025](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/2cd4025643dab23b34cdaee007153098ec54fcea))

- 🎸 Add vote unlock chart on vote percentage button ([06db025](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/06db0251349a14138f676ce7bcc0426f8821d28d))
- 🎸 updated favicon ([2cd4025](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/2cd4025643dab23b34cdaee007153098ec54fcea))

### Bug Fixes

* 🐛 fixes incorrect price for some pools ([590c310](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/590c31069b43d25e3185a99b72628e37b7bb9a00))
* 🐛 fixes type errors ([1edf59e](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1edf59ef38d0db42b5c9245e6d9d59c401e5cca0))
* 🐛 removes stellar-sdk dep to fix libsodium bug ([3d479a6](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3d479a6fb5a25ef99189e9898d5011b037e91cb8))
- 🐛 fixes incorrect price for some pools ([590c310](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/590c31069b43d25e3185a99b72628e37b7bb9a00))
- 🐛 fixes type errors ([1edf59e](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1edf59ef38d0db42b5c9245e6d9d59c401e5cca0))
- 🐛 removes stellar-sdk dep to fix libsodium bug ([3d479a6](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3d479a6fb5a25ef99189e9898d5011b037e91cb8))

## [0.4.0](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.3.0...v0.4.0) (2022-01-09)


### Features

* 🎸 adds toggle to hide pairs without amount ([290e13b](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/290e13b3ea5d3a4427759f6418ca54854c3932af))
* 🎸 adds toggle to hide some columns ([fb23f58](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/fb23f58de63cc75182d8e2b15138cdd3e5caf06c))
* 🎸 adds vote percentage column ([43a8927](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/43a89270c3e8c9e1402e825c4f31df857f6f2b47))
* 🎸 fallback to asset2 value when asset1 value is not found ([19f841d](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/19f841d6c7874628a59196c7b4463d985e837450))

- 🎸 adds toggle to hide pairs without amount ([290e13b](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/290e13b3ea5d3a4427759f6418ca54854c3932af))
- 🎸 adds toggle to hide some columns ([fb23f58](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/fb23f58de63cc75182d8e2b15138cdd3e5caf06c))
- 🎸 adds vote percentage column ([43a8927](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/43a89270c3e8c9e1402e825c4f31df857f6f2b47))
- 🎸 fallback to asset2 value when asset1 value is not found ([19f841d](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/19f841d6c7874628a59196c7b4463d985e837450))

### Bug Fixes

* 🐛 fixed types ([b943826](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/b94382616e989f8baeb1bbb9c3c64c0738ca4084))
* 🐛 fixes table not loading when data is missing on a pool ([416cafb](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/416cafb10cd02f319a825eab39958017d00c5e8f))
- 🐛 fixed types ([b943826](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/b94382616e989f8baeb1bbb9c3c64c0738ca4084))
- 🐛 fixes table not loading when data is missing on a pool ([416cafb](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/416cafb10cd02f319a825eab39958017d00c5e8f))

## [0.3.0](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.4...v0.3.0) (2021-12-27)


### Features

* 🎸 adds options menu and improve UI ([1ff4a65](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1ff4a65ee63589386a44e250664e393dfe5ebb0e))
* 🎸 improves UI ([d6ab8f8](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d6ab8f85f5bee73c79e9ed8f9246b86ab02d10f3))
* 🎸 Improves UI for mobile ([e31db49](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/e31db49d115e7cb7047f66f2aca35ccd82893707))

- 🎸 adds options menu and improve UI ([1ff4a65](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1ff4a65ee63589386a44e250664e393dfe5ebb0e))
- 🎸 improves UI ([d6ab8f8](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d6ab8f85f5bee73c79e9ed8f9246b86ab02d10f3))
- 🎸 Improves UI for mobile ([e31db49](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/e31db49d115e7cb7047f66f2aca35ccd82893707))

### Bug Fixes

* 🐛 fixes type for daily_amm_reward ([d84137f](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d84137f30891b016f77519254cdb1d674e33f9b2))
- 🐛 fixes type for daily_amm_reward ([d84137f](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d84137f30891b016f77519254cdb1d674e33f9b2))

### [0.2.5](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.4...v0.2.5) (2021-12-27)


### Features

* 🎸 adds options menu and improve UI ([1ff4a65](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1ff4a65ee63589386a44e250664e393dfe5ebb0e))
* 🎸 improves UI ([d6ab8f8](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d6ab8f85f5bee73c79e9ed8f9246b86ab02d10f3))
* 🎸 Improves UI for mobile ([e31db49](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/e31db49d115e7cb7047f66f2aca35ccd82893707))

- 🎸 adds options menu and improve UI ([1ff4a65](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/1ff4a65ee63589386a44e250664e393dfe5ebb0e))
- 🎸 improves UI ([d6ab8f8](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d6ab8f85f5bee73c79e9ed8f9246b86ab02d10f3))
- 🎸 Improves UI for mobile ([e31db49](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/e31db49d115e7cb7047f66f2aca35ccd82893707))

### Bug Fixes

* 🐛 fixes type for daily_amm_reward ([d84137f](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d84137f30891b016f77519254cdb1d674e33f9b2))
- 🐛 fixes type for daily_amm_reward ([d84137f](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d84137f30891b016f77519254cdb1d674e33f9b2))

### [0.2.4](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.3...v0.2.4) (2021-12-22)


### Features

* 🎸 adds input to set amount on all pairs ([0b738cd](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0b738cd830930c07d1961577bab1c67d1f3ef230)), closes [#2](https://github.com/fpbrault/stellar-aqua-amm-viewer/issues/2)
* 🎸 Improve option section appearance ([77efcdb](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/77efcdb3294e2020a2ea1f3f1a29c099833c384a))
* 🎸 improves table appearance ([0b64400](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0b644007e866301f7e4c74d1469d14682edcbdc3))

- 🎸 adds input to set amount on all pairs ([0b738cd](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0b738cd830930c07d1961577bab1c67d1f3ef230)), closes [#2](https://github.com/fpbrault/stellar-aqua-amm-viewer/issues/2)
- 🎸 Improve option section appearance ([77efcdb](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/77efcdb3294e2020a2ea1f3f1a29c099833c384a))
- 🎸 improves table appearance ([0b64400](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0b644007e866301f7e4c74d1469d14682edcbdc3))

### Bug Fixes

* 🐛 fixes account data something missing ([28ea425](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/28ea4259cb28955988b2f66819bd0c20b861db3d))
* 🐛 fixes data not being up to date quickly enough ([42368cc](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/42368cce8dd2e6e8c28ef0c199b59754df23e109))
* 🐛 fixes table scroll on mobile ([5d4bf07](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/5d4bf071b25c067b99f6e758a21b5b00018ef668))
- 🐛 fixes account data something missing ([28ea425](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/28ea4259cb28955988b2f66819bd0c20b861db3d))
- 🐛 fixes data not being up to date quickly enough ([42368cc](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/42368cce8dd2e6e8c28ef0c199b59754df23e109))
- 🐛 fixes table scroll on mobile ([5d4bf07](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/5d4bf071b25c067b99f6e758a21b5b00018ef668))

### [0.2.3](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.2...v0.2.3) (2021-12-21)


### Bug Fixes

* 🐛 fixes rewards values not updating on toggle ([be0ca05](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/be0ca05b2c8100d25b38d7aa6593c88e122e2964))
- 🐛 fixes rewards values not updating on toggle ([be0ca05](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/be0ca05b2c8100d25b38d7aa6593c88e122e2964))

### [0.2.2](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.1...v0.2.2) (2021-12-21)


### Bug Fixes

* 🐛 fixes future rewards not accounting for 1% threshold ([3ab751d](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3ab751da7ff76fcff5740c6eb5a31069bdf636fd))
- 🐛 fixes future rewards not accounting for 1% threshold ([3ab751d](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3ab751da7ff76fcff5740c6eb5a31069bdf636fd))

### [0.2.1](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.2.0...v0.2.1) (2021-12-21)


### Bug Fixes

* 🐛 adds types to rewards api to fix build ([eebfb80](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/eebfb807ced4be98e64912c1398a597c7994b9c5))
- 🐛 adds types to rewards api to fix build ([eebfb80](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/eebfb807ced4be98e64912c1398a597c7994b9c5))

## [0.2.0](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.1.2...v0.2.0) (2021-12-21)


### Features

* 🎸 adds future rewards ([aca8b2c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/aca8b2c2dad437970c9fd31054258bda384424a5))
* 🎸 save public key to local storage ([4ebc176](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/4ebc176b82bce73ba7ad24eb0eca985c8deface4))
* 🎸 Use only one request to get reward data ([d34190a](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d34190aa2fcead44dfc099081d95a011b939acdf))

- 🎸 adds future rewards ([aca8b2c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/aca8b2c2dad437970c9fd31054258bda384424a5))
- 🎸 save public key to local storage ([4ebc176](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/4ebc176b82bce73ba7ad24eb0eca985c8deface4))
- 🎸 Use only one request to get reward data ([d34190a](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/d34190aa2fcead44dfc099081d95a011b939acdf))

### Bug Fixes

* 🐛 fixes account data not updating when pressing refresh ([624e2b2](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/624e2b26fa9dbb818292f51ecba629463ef57c77))
- 🐛 fixes account data not updating when pressing refresh ([624e2b2](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/624e2b26fa9dbb818292f51ecba629463ef57c77))

### [0.1.2](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.1.1...v0.1.2) (2021-12-20)


### Bug Fixes

* 🐛 fixes aquaPrice build failure ([3a08ff6](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3a08ff648db38f04c5b8154ea7db05f94770570c))
- 🐛 fixes aquaPrice build failure ([3a08ff6](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/3a08ff648db38f04c5b8154ea7db05f94770570c))

### [0.1.1](https://github.com/fpbrault/stellar-aqua-amm-viewer/compare/v0.1.0...v0.1.1) (2021-12-20)


### Features

* 🎸 adds balance retrieval from pubkey and albedo ([87a9f48](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/87a9f48eb1e6b56f686c7b0e4c8a8e8affe2a8e6))
* 🎸 adds changelog modal for new releases ([0afd536](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0afd53623efe0e5abddb2d1d76ab2e170a66594f))
- 🎸 adds balance retrieval from pubkey and albedo ([87a9f48](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/87a9f48eb1e6b56f686c7b0e4c8a8e8affe2a8e6))
- 🎸 adds changelog modal for new releases ([0afd536](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/0afd53623efe0e5abddb2d1d76ab2e170a66594f))

## 0.1.0 (2021-12-19)


### Features

* 🎸 added padding below table ([309378c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/309378c4d3f6e1f0774adff87583f230619b6d3b))
* 🎸 adds placeholder animation ([7afede9](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/7afede946cf65da8d6d8c1f92feecf193c3765ad))
* 🎸 batch api calls ([6271c57](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/6271c577204b7c8ad77a8806495a64dc6e69d41d))
* 🎸 disables auto data revalidation on focus ([23a235e](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/23a235e7e700baa5b867446d77019899b9792e93)), closes [#6](https://github.com/fpbrault/stellar-aqua-amm-viewer/issues/6)
* 🎸 use GET call for pools to enable caching ([62d30b4](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/62d30b4174e869745af2544c3583fdf9904ede09))

- 🎸 added padding below table ([309378c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/309378c4d3f6e1f0774adff87583f230619b6d3b))
- 🎸 adds placeholder animation ([7afede9](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/7afede946cf65da8d6d8c1f92feecf193c3765ad))
- 🎸 batch api calls ([6271c57](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/6271c577204b7c8ad77a8806495a64dc6e69d41d))
- 🎸 disables auto data revalidation on focus ([23a235e](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/23a235e7e700baa5b867446d77019899b9792e93)), closes [#6](https://github.com/fpbrault/stellar-aqua-amm-viewer/issues/6)
- 🎸 use GET call for pools to enable caching ([62d30b4](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/62d30b4174e869745af2544c3583fdf9904ede09))

### Bug Fixes

* 🐛 removed unused rewrite rule ([2c6295c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/2c6295c8167a450134a225ecf0421f090a9ef53d))
* 🐛 updated repo url ([ab39999](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/ab39999fb58a73c908d8d6e98c2de3010807973c))
- 🐛 removed unused rewrite rule ([2c6295c](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/2c6295c8167a450134a225ecf0421f090a9ef53d))
- 🐛 updated repo url ([ab39999](https://github.com/fpbrault/stellar-aqua-amm-viewer/commit/ab39999fb58a73c908d8d6e98c2de3010807973c))
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# stellar-aqua-amm-viewer

Simple tool to see rewards for AMM pairs.

## Getting Started

First, run the development server:
Expand Down
15 changes: 10 additions & 5 deletions components/PoolModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ function PoolModal(props: {
type="button"
className="font-bold btn-xs btn btn-ghost modal-button"
style={tableStyle}
onClick={() => setShow(true)}>
onClick={() => setShow(true)}
>
{parseFloat(value) < 1 ? ">1%" : parseFloat(value).toFixed(1) + "%"}
</button>
<div className="modal">
Expand All @@ -58,22 +59,26 @@ function PoolModal(props: {
show={show}
onHide={() => setShow(false)}
renderBackdrop={renderBackdrop}
aria-labelledby="modal-label">
aria-labelledby="modal-label"
>
<div className="fixed top-0 bottom-0 left-0 right-0 z-50 flex flex-col items-center justify-center p-16 bg-base-300">
<div className="absolute top-0 right-0 m-2 text-2xl font-bold">
<button
className="btn btn-ghost btn-outline btn-square btn-sm"
onClick={() => setShow(false)}>
onClick={() => setShow(false)}
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
className="inline-block w-6 h-6 stroke-current">
className="inline-block w-6 h-6 stroke-current"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M6 18L18 6M6 6l12 12"></path>
d="M6 18L18 6M6 6l12 12"
></path>
</svg>
</button>
</div>
Expand Down
Loading

0 comments on commit e451139

Please sign in to comment.