実現したいこと
コンパイルエラーが鬱陶しいので、でないようにしたいです。
前提
react+typescript+railsでCRUDの画面を作成しています。
発生している問題・エラーメッセージ
src/components/hoge/Detail.tsx Line 3:22: Missing file extension “tsx” for “../../hoge/hoge” import/extensions Line 12:14: Don’t use `Function` as a type. The `Function` type accepts any function-like value. It provides no type safety when calling the function, which can be a common source of bugs. It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`. If you are expecting the function to accept certain arguments, you should explicitly define the function shape @typescript-eslint/ban-types Line 16:25: Function component is not a function declaration react/function-component-definition Line 55:7: JSX not allowed in files with extension ‘.tsx’ react/jsx-filename-extension Line 58:9: Missing an explicit type attribute for button react/button-has-type
※一部省略してます。
### 試したこと エラーの発生条件はよくわかりませんが、その日初めて画面をブラウザchromで開く→エラーなし。 その後、detail.tsxを編集、更新するとエラーが出ます。 ちなみに、更新内容はcssのためのdivなどのタグのclassName名などの編集などにとどまります。 エラー文でぐぐりましたが、有効な手立てが見つかりませんでした。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。