Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.eslintrc.cjs를 써야하는 이유 #5

Closed
ainochi-kor opened this issue Sep 27, 2023 · 0 comments
Closed

.eslintrc.cjs를 써야하는 이유 #5

ainochi-kor opened this issue Sep 27, 2023 · 0 comments

Comments

@ainochi-kor
Copy link
Owner

https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats

image
  • JavaScript - .eslintrc.js를 사용하고 구성을 포함하는 객체를 내보냅니다.
  • JavaScript (ESM) - ESLint를 "type":"module"이라고 명시된 package.json의 JavaScript 패키지에서 실행할 때 .eslintrc.cjs를 사용합니다. 현재 ESLint는 ESM 구성을 지원하지 않습니다.
  • YAML - 구성 구조를 정의하기 위해 .eslintrc.yaml 또는 .eslintrc.yml을 사용합니다.
  • JSON - 구성 구조를 정의하기 위해 .eslintrc.json을 사용합니다. ESLint의 JSON 파일은 JavaScript 스타일의 주석도 허용합니다.
    package.json - package.json 파일에 eslintConfig 속성을 생성하고 해당 위치에서 구성을 정의합니다.

ESLint는 ESM 스타일의 JavaScript 패키지에서 실행될 때 .eslintrc.cjs 설정 파일을 사용해야 한다. ESlint는 아직 ESM을 지원하지 않기 때문에, ESM 관련 파일들은 CommonJs 모듈 시스템으로 작성된 파일을 사용해야 한다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant