본문 바로가기

React19

[eslint error] spaced-comment eslint를 실행했더니 맨아래 저런 문구가 터미널에 떴다. ✖ 22 problems (22 errors, 0 warnings) 19 errors and 0 warnings potentially fixable with the `--fix` option. 총 22개의 문제 중 --fix를 붙이면 고칠 수 있는 문제가 19개라고 한다. 대부분의 내 문제는 spaced-comment 였다. --fix 해보자. $ yarn run eslint "**/*{ts,tsx}" --fix 정말로 19개 문제가 해결되어 3개만 남았다. 굿. 2022. 1. 29.
[eslint error] 에러 없이 실행 자체가 안된다.... 드디어 설치 셋팅 끝나고 eslint 본격 시작해볼까! 하는데 에러 없이 실행이 안됐다. $ npx eslint "**/*{ts,tsx}" 위 명령어를 사용하여 해결하였다. (모든 폴더와 파일 안에 들어가서 그안에 있는 ts 또는 tsx 확장자에 대한 검사를 하겠다는 뜻이다.) 2022. 1. 29.
[eslint error] Warning: React version not specified in eslint-plugin-react settings. eslint 실행 중 에러가 났다. 에러 문구는 다음과 같다. Warning: React version not specified in eslint-plugin-react settings. See https://github.com/yannickcr/eslint-plugin-react#configuration . 구글링 결과 해결 방법 두가지가 있는데 .eslintrc.js파일에서 settings: { react: { version: 'detect', }, }, 또는 settings: { react: { version: '999.999.999', }, }, 를 추가하여 해결했다. Reference https://blog.kwonmory.com/tip/react-version-not-specified-in-e.. 2022. 1. 29.
[React Error] Parsing error: Cannot find module 'next/babel' 문제 같은 워크스페이스 내에 다른 프로젝트에서 타입스크립트와 codegen을 깔고 나서 또 다른 프로젝트에서 갑자기 Parsing error: Cannot find module 'next/babel' 이런 에러가 나면서 import가 안받아지면서 코드가 작동이 되지 않았다. 같은 워크스페이스 내에서 또 다른 프로젝트를 새로 만들어도 다른 워크스페이스를 파서 새로 해봐도 같은 에러가 나면서 에러가 떴다. 해결 에러가 나는 프로젝트에 eslint 깔고 .eslintrc.json파일의 extends 에 next/babel을 추가하였다. { "extends": ["next/babel", "next/core-web-vitals"] } .eslintrc.json 파일 조언 받았던 추가 해결 방법들) 1. 프로젝트의.. 2022. 1. 24.