• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

no-console 설정이 prettier 설정을 한 이후로 적용되지 않습니다.

21.05.27 16:00 작성 조회수 230

1

.eslintrc.js 파일에서 rules를 아래와 같이 작성했습니다.

prettier/prettier 을 붙이기 전에는 value never used 오류가 안나도록 정상동작이 되는데, prettier 설정을 붙이면 오류가 나네요. 어느 부분을 확인해야 할까요? 

rules: {
    "no-console": "off",
    // "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
    // "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
    "prettier/prettier": ['error', {
      singleQuote: true,
      semi: true,
      useTabs: false,
      tabWidth: 2,
      trailingComma: 'all',
      printWidth: 80,
      bracketSpacing: true,
      arrowParens: 'avoid',
    }],
  },

답변 1

답변을 작성해보세요.

0

안녕하세요 싱글톤님, 답변이 늦어져서 죄송합니다 :) 아래 소스 참고해서 .eslintrc.js 을 수정해 보시겠어요? :)

https://github.com/joshua1988/vue-til/blob/complete/.eslintrc.js