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

ESLintの設定を @antfu/eslint-config を使った形に変更 #353

Conversation

keitakn
Copy link
Member

@keitakn keitakn commented Oct 9, 2024

issueURL

#347

関連 URL

なし

このPRで対応すること / このPRで対応しないこと

ESLintの設定を @antfu/eslint-config を使った形に変更します。

Storybook の URL もしくはスクリーンショット

UI変更はないのでなし。

変更点概要

@antfu/eslint-config を使ってESLintの設定を構築するように変更。

prettier については利用しなくなったので依存packageから削除している。

詳しい解説は nekochans/ai-cat-frontend#132 のインラインコメントを参照。

レビュアーに重点的にチェックして欲しい点

特になし

補足情報

インラインコメントを参照。

@keitakn keitakn self-assigned this Oct 9, 2024
Copy link

vercel bot commented Oct 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lgtm-cat-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 3:42pm

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 43.03406% with 184 lines in your changes missing coverage. Please review.

Project coverage is 35.27%. Comparing base (2415530) to head (2128289).
Report is 9 commits behind head on release/epic36/design-renewal-2024.

Files with missing lines Patch % Lines
src/features/metaTag.ts 0.00% 78 Missing ⚠️
eslint.config.mjs 0.00% 29 Missing and 1 partial ⚠️
src/utils/gtm.ts 0.00% 18 Missing ⚠️
src/features/url.ts 72.09% 12 Missing ⚠️
src/app/_components/IconButton.tsx 62.50% 6 Missing ⚠️
src/app/_components/LinkButton.tsx 0.00% 4 Missing and 1 partial ⚠️
src/features/locale.ts 0.00% 4 Missing and 1 partial ⚠️
src/constants/upstash.ts 0.00% 3 Missing and 1 partial ⚠️
src/app/global-error.tsx 0.00% 3 Missing ⚠️
src/edge/country.ts 0.00% 2 Missing and 1 partial ⚠️
... and 12 more
Additional details and impacted files
@@                          Coverage Diff                           @@
##           release/epic36/design-renewal-2024     #353      +/-   ##
======================================================================
+ Coverage                               33.78%   35.27%   +1.48%     
======================================================================
  Files                                      75       75              
  Lines                                    1977     1874     -103     
  Branches                                  147      147              
======================================================================
- Hits                                      668      661       -7     
+ Misses                                   1260     1164      -96     
  Partials                                   49       49              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/utils/gtm.ts
  36:13  error  Use a `type` instead of an `interface`                                             ts/consistent-type-definitions
  42:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  51:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  60:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  69:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  78:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  87:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
  96:3   error  Definition for rule '@typescript-eslint/strict-boolean-expressions' was not found  @typescript-eslint/strict-boolean-expressions
src/utils/assertNever.ts
  1:1   error  Definition for rule '@typescript-eslint/no-unused-vars' was not found    @typescript-eslint/no-unused-vars
  2:29  error  'value' is defined but never used. Allowed unused args must match /^_/u  unused-imports/no-unused-vars
/lgtm-cat-frontend/src/app/_components/Header.test.tsx
  31:51  warning  Use shorthand boolean attribute 'isLoggedIn'  react/prefer-shorthand-boolean
  42:51  warning  Use shorthand boolean attribute 'isLoggedIn'  react/prefer-shorthand-boolean

/lgtm-cat-frontend/src/app/_components/HeaderLogo.tsx
  21:41  warning  Use shorthand boolean attribute 'aria-hidden'  react/prefer-shorthand-boolean

/lgtm-cat-frontend/src/app/_components/LoginButton.tsx
  14:7  warning  Use shorthand boolean attribute 'showGithubIcon'  react/prefer-shorthand-boolean
@@ -27,7 +27,8 @@ test('show isLoggedIn false language is en', () => {
expect(screen.getByRole('link', { name: 'Login' })).toBeTruthy();
});

test('show isLoggedIn true language is ja', () => {
it('show isLoggedIn true language is ja', () => {
// eslint-disable-next-line react/prefer-shorthand-boolean
Copy link
Member Author

Choose a reason for hiding this comment

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

省略形で isLoggedIn と書くようにESLintが要求してきていますが、この書き方にするとIDE上で警告が出るのでここはインラインコメントで対象ルールを無効にしています

@keitakn keitakn marked this pull request as ready for review October 10, 2024 15:44
@keitakn keitakn merged commit 3ce8e6f into release/epic36/design-renewal-2024 Oct 10, 2024
9 checks passed
@keitakn keitakn deleted the feature/issue347/change-eslint-packages branch October 10, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant