Open M1n01 opened 3 weeks ago
javascriptのフォーマッター、ESLintの設定ファイル(.prettierrc.json
, eslint.config.cjs
)を作成しました。
以下のコマンドを実行し、ESLintとPrettier、Blackの拡張機能を入れてください。
$ npm install
コマンドでgit commit -m "<commit message>"
とすると、ESLintが動作します。(しなかったら教えてください)。
VS Codeのコミット機能からの方法は分からなかったので、あれば教えてください!
もし分からないことや足りないことがあれば聞いてください!!
対応ありがとうございます
ESLintとPrettier、Blackの拡張機能を入れてください。
これはVS Codeの拡張機能として入れればいいですか?
git commit -m "
"とすると、ESLintが動作します
ESLintが動作した結果どうなるのが正常ですか?
いろいろと触ってみたところ、動いているかどうかはちょっと怪しいです・・・ その理由はちょっと長くなりますが書き出します
`sano@webserv:~/work/42/ft_transcendence/ft_transcendence$ git commit -m "te" ✔ Preparing lint-staged... ⚠ Running tasks for staged files... ❯ package.json — 1 file ❯ src/*/.{js,jsx} — 1 file ✔ prettier --write --loglevel=error ✖ eslint --fix --quiet [FAILED] ↓ {public,src}/*/.{html,gql,graphql,json} — no files ↓ Skipped because of errors from tasks. ✔ Reverting to original state because of errors... ✔ Cleaning up temporary files...
✖ eslint --fix --quiet:
Oops! Something went wrong! :(
ESLint: 9.5.0
A config object is using the "extends" key, which is not supported in flat config system.
Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array.
If you're using "extends" in your config file, please see the following: https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs
If you're not using "extends" directly (it may be coming from a plugin), please see the following: https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config`
module.exports = { rules: { indent: ['error', 2], quotes: ['error', 'single'], }, };
おそらく、eslint.config.cjsの何かが原因でエラーになり、実行されていません
各環境構築
Frontend
tools
Backend
tools
Database
Blockchain
その他