青いやつの進捗日記。

メモとしてべんきょうのしんちょくをかいていきます。あとで自分が検索しやすいもん

ESLint

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration . の対処法

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration . というwarningが出ていたのでその解決方法 blog.freks.jp zenn.dev settings: { react: { version: 'detec…

0がtruthyなので0が描画されちゃう問題をlintでふせぐ

tech.motoki-watanabe.net tech.motoki-watanabe.net 過去に苦しんでた。0が描画されちゃうやつ。きづければいいんだけど、人間の認知の限界はある。 そんなときに使えるeslintのpluginが…! zenn.dev GithubのStarが少ないのがちょっときになるけど、とはい…

ESLintの標準だとTypeScriptで型定義にもno-unused-varsのエラーが出てしまうのを直す

.eslintrc.jsonに書いてある設定の "extends": ["eslint:recommended"], で、 onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void に対して 'event' is defined but never used とエラーが出ていました。 TypeScriptで型定義でno-unuse-varsのエラーが出ないよう</htmlbuttonelement>…

ESLintとPrettierを同時に良い感じに動かす。今回はESLintからPrettierを呼び出す

プロジェクトにeslintを入れてルールを書いてるプロジェクト、 VSCodeのPrettierの設定と、ESLintの衝突を回避したい。とりあえず文末のセミコロン - 青いやつの進捗日記。 このブログでも書いたが、VSCodeの拡張機能のPrettierが.vscode/settings.jsonに書…

VSCodeのPrettierの設定と、ESLintの衝突を回避したい。とりあえず文末のセミコロン

www.atnr.net VSCodeのPrettierの拡張機能の設定の Prettier: Semi Whether to add a semicolon at the end of every line と ESLintのプロジェクトに置いた設定の.eslintrc.jsonの "semi": ["error", "never"], が衝突していた。 とりあえずこれを回避した…