ESLint 9 Migration
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- eslint, nodejs, typescript
調査の方向性
ESLint の移行ガイドを読み、その後 .eslintrc.json と .eslintignore を、要求されているファイル eslint.config.js と eslint.ignores.js と比較します。移行後に linting チェックとテストを実行し、一覧にある指摘を解決するか意図的に設定して、gts v7 へのアップグレードを妨げないようにし、CI を通過させます。
索引モデルが issue の本文から書いたものです。
説明
The Pull Request chore(deps): update dependency gts to v7 #3856 is currently blocked due to CI failures.
The core of the issue is that gts v7 upgrades the linter to ESLint v9, which introduces a breaking change by switching to a new "Flat Config" system. The existing configuration infrastructure is incompatible with this new version.
Resolving this requires a two-step approach.
Step 1: Infrastructure Migration (ESLint 9 Flat Config)
ESLint 9 drops support for .eslintrc.json and .eslintignore. The project must migrate to eslint.config.js and eslint.ignores.js.
Findings & Reference
In Flat Config, ignore patterns are strictly relative to the configuration file, and global variables (like process or module in Node.js) must be explicitly declared in the config for JavaScript files.
- Reference: ESLint Migration Guide - Ignoring Files
Required Technical Changes
- Create
eslint.ignores.js: Export the array of ignore patterns (migrated from.eslintignore). - Create
eslint.config.js:- Extend
gts. - Import ignore patterns.
- Declare
globals.nodefor**/*.jsfiles to preventno-undeferrors.
- Extend
- Clean up: Delete
.eslintrc.jsonand.eslintignore.
Step 2: Code Compliance (New Linting Findings)
After migrating to ESLint v9, the new linter identifies several violations in the existing codebase that were previously ignored or not checked with the same intensity. We need to determine the best path forward for these findings, whether is to mute the findings, fix the findings, or come up with a hybrid approach.
Findings
The following rules are failing across multiple files (many of which are autogenerated):
@typescript-eslint/no-unused-vars@typescript-eslint/no-explicit-any@typescript-eslint/no-unused-expressions
Open Questions:
- Mute the findings (Short-term): Should we disable these rules in
eslint.config.jsto unblock thegtsv7 upgrade? This would maintain the current state of the codebase while adopting the new tooling. - Fix the findings (Long-term): Since many of these files are autogenerated, should we block the upgrade until the generator logic is updated to produce compliant code?
- Hybrid Approach: Mute them now but create a follow-up task to address the generator's output?
NOTE: muting these rules in the new
eslint.config.jsallowed all linting checks and tests to pass successfully when testing this changes locally.
- 主要言語
- TypeScript
- スター
- 12.3k
- フォーク
- 2k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 21
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleapis/google-api-nodejs-client のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 32/100
googleapis/google-api-nodejs-client#3932 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Discovery Engine] streamAnswer is typed as one AnswerQueryResponse, but REST returns frame arraysオープン
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
googleapis/google-api-nodejs-client#3930 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
googleapis/google-api-nodejs-client#3927 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
size: l type: feature request
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
googleapis/google-api-nodejs-client#3926 ·
メンテナーはふだん 1 日以内に返信
-
type: feature request
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
googleapis/google-api-nodejs-client#3903 ·
メンテナーはふだん 1 日以内に返信
googleapis/google-api-nodejs-client の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
inu-appcenter/memorIN-frontend#106 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 7 日以内に返信
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CSCfi/sd-search-ui#145 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cbeebies pl SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信