- typescript
- eslint
- @typescript-eslint/parser
- @typescript-eslint/eslint-plugin
- method-signature-style Type Covariance
typescript-eslint/method-signature-style.md at main · typescript-eslint/typescript-eslint
Enforces using a particular method signature syntax. There are two ways to define an object/interface function property. A good practice is to use the TypeScript's strict option (which implies strictFunctionTypes) which enables correct typechecking for function properties only (method signatures get old behavior). TypeScript FAQ: A method and a function property of the same type behave differently.
https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/method-signature-style.md
method-signature-style | TypeScript ESLint
Enforces using a particular method signature syntax. There are two ways to define an object/interface function property. A good practice is to use the TypeScript's strict option (which implies strictFunctionTypes) which enables correct typechecking for function properties only (method signatures get old behavior). TypeScript FAQ: A method and a function property of the same type behave differently.
https://typescript-eslint.io/rules/method-signature-style/
import error
Moment not found in 'moment' (import/named)
CRA with typescript로 만든 프로젝트에서 eslint랑 prettier 설정을 한 상황.그런데 라이브러리에서 인터페이스를 임포트 하려는데, 그런 건 찾을 수가 없다며 eslint의 import/named 에러가 발생한다. 분명 그 위치에 인터페이스가 존재하는 것도 맞고, vscode도 그걸 인지하고 있는데 왜 eslint가 못찾겠다고 하는지 계속 헤맸다. .eslintignore에 node_modules를 추가 안해서 그런가 했는데 어차피 기본적으로 무시하게 되어 있다고 한다.
https://developer-alle.tistory.com/410

TypeScript ESLint + Prettier 함께 사용하기(w/ VSCode)
https://pravusid.kr/typescript/2020/07/19/typescript-eslint-prettier.html
variable type error
ESLint - Configuring "no-unused-vars" for TypeScript
I use ESLint in all of my TypeScript projects with the following settings: "extends": ["airbnb", "prettier", 'plugin:vue/recommended'], "plugins": ["prettier"], "parserOptions": { "parser": "@typescript-eslint/parser", "ecmaVersion": 2018, "sourceType": "module" }, a bunch of custom rules. I've also installed the following dependencies for TypeScript support: "@typescript-eslint/eslint-plugin": "^1.7.0", "@typescript-eslint/parser": "^1.7.0", However, one of ESLint's most useful rules, https://eslint.org/docs/rules/no-unused-vars, seems to be very poorly configured for TypeScript projects.
https://stackoverflow.com/questions/57802057/eslint-configuring-no-unused-vars-for-typescript

Seonglae Cho