chatch / stellarexplorer

Ledger Explorer for the Stellar Network 🚀
https://steexp.com
Apache License 2.0
457 stars 1.06k forks source link

Use remix run eslint config #551

Closed jp-ryuji closed 10 months ago

jp-ryuji commented 10 months ago

Feel free to reject the PR if you think it's not necessary. Then we should remove @remix-run/eslint-config from package.json instead.


I realized @remix-run/eslint-config is installed but not used. So I set it up by referring to the page above and run npm run lint:fix. ※I'll install "@testing-library/react" in another PR, by the way.

I'm not 100% certain using this config is a good practice (considering it's a part of remix package, it seems to be though).

I've never used the import type { PaymentProps } from './Payment' style, which the config enforces, but I've seen the syntax here and there in the repo. In that sense, keeping consistent formatting is good.


The following is results of npm run lint before and after the change.

before the change:

✖ 51 problems (0 errors, 51 warnings)
  0 errors and 1 warning potentially fixable with the `--fix` option.

after adding @remix-run/eslint-config to .eslintrc:

✖ 105 problems (4 errors, 101 warnings)
  0 errors and 50 warnings potentially fixable with the `--fix` option.

after npm run lint:fix was run:

✖ 52 problems (0 errors, 52 warnings)
  0 errors and 1 warning potentially fixable with the `--fix` option.
jp-ryuji commented 10 months ago

It seems build failed on CI. I'll take a look at it later.

Fixed.