Closed3

eslintrc の parser ってなに?

koukibuu3koukibuu3

parser: '@typescript-eslint/parser' みたいに指定しないと .ts .tsx を見てくれないの?

koukibuu3koukibuu3

eslint-config-next の内部で @typescript-eslint/parser は指定されてるっぽいけど別途
extends に指定して parser に指定しないといけないのか?

もしかして parser だけでいい?

koukibuu3koukibuu3

@typescript-eslint-parser@typescript-eslint-plugin の関係も気になる。

eslint-config-next で依存している @typescript-eslint-parser のバージョンと違うとインストールできなかった。

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: portfolio@undefined
npm ERR! Found: @typescript-eslint/parser@4.33.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   @typescript-eslint/parser@"^4.20.0" from eslint-config-next@12.0.4
npm ERR!   node_modules/eslint-config-next
npm ERR!     dev eslint-config-next@"12.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! @typescript-eslint/eslint-plugin@"*" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @typescript-eslint/parser@5.4.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^5.0.0" from @typescript-eslint/eslint-plugin@5.4.0
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     @typescript-eslint/eslint-plugin@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
このスクラップは4ヶ月前にクローズされました