vuej의 tslint 오류를 자동 수정하려면 어떻게 해야 합니까?
나는 달리고 있다vue-cli-service lint --fix내 vuejs/타자기본 프로젝트에서.예상대로 대부분의 보풀 오류/경고는 자동으로 해결됩니다.
단, 특정 tslint 규칙이 있습니다."semicolon": [true, "always", "ignore-interfaces"]) 이 명령어로 자동 수정하고 싶습니다.타이프 스크립트인터페이스는 다음과 같습니다(예상된 보풀 결과).
interface component {
type: "input" | "dropdown" | "checkbox",
hidden?: boolean
}
보풀이 실행되면 이렇게 포맷됩니다.메시지는[eslint] Replace,with;(prettier/prettier)
interface component {
type: "input" | "dropdown" | "checkbox";
hidden?: boolean;
}
이 규칙을 추가했습니다."semicolon": [true, "always", "ignore-interfaces"]tslint 파일로 변환되지만 결과는 변경되지 않습니다.
콘솔 메시지([eslint] Replace , with ; (prettier/prettier))는, 다음의 항목을 선택했을 가능성이 있습니다.ESLint + PrettierVue CLI를 사용하여 프로젝트를 생성하는 경우 옵션이지만 ESLint는 지원하지 않습니다.tslint.json(플러그인이 필요하지만 YMMV).
다른 방법으로는 TSLint로 전환하여 생성된 파일을 편집하는 방법이 있습니다.tslint.json당신이 원하는 것을 포함하다semicolon규칙.
언급URL : https://stackoverflow.com/questions/52663009/how-can-i-auto-fix-tslint-errors-in-vuejs
'programing' 카테고리의 다른 글
| Python이 목록 사전을 만듭니다. (0) | 2022.11.10 |
|---|---|
| 권장되지 않는 Java Http Client - 얼마나 어렵습니까? (0) | 2022.11.10 |
| 엔티티 프레임워크 6에 MySQL 연결을 사용할 수 없습니다. (0) | 2022.11.10 |
| 두 날짜의 차이를 어떻게 구합니까? (0) | 2022.11.05 |
| Java에서의 Log4J 출력 디세이블화 (0) | 2022.11.05 |