0

나는 나의 커피 파일에 4 공간 들여 쓰기를 가지고 있고 그 컴파일하고 때 나는 점점 오류 :Coffeelint 들여 2013

CoffeeLint : YourFile.coffee 컴파일 실패 : CoffeeLint : 라인이 일치하지 않는 들여 쓰기를 포함 context : Expected 2 got 4

실제로 http://www.coffeelint.org/은 들여 쓰기를 구성하는 옵션을 제공하며, Web Essentials 메뉴에는 Global CofeeLint 설정을 편집 할 수있는 옵션이 있습니다.

"indentation": { 
    "name": "indentation", 
    "value": 4, 
    "level": "error" 
} 

(변경 값 2에서 4) 그러나 나는 심지어 error없이 여전히 ignore에 성공에서 level을 변경하려 차이가 없습니다 : 그래서 나는 것으로 해당 옵션을 변경했습니다. 나는 심지어 VS와 Windows를 재시작하려고했는데, 내가 뭘 잘못하고 있니?

업데이트 1. 여기에 의견 요청으로

이 코드 내가 가진 : 그것의

if 1 
    0 

또한 스크린 샷을보기 공백 ON으로 :

enter image description here

+0

코드를 알려주십시오. – SLaks

+0

@SLaks 질문을 업데이트했습니다. 또한 내 PC에 하나의 coffeelint.json 만 있습니다 (재정의되지는 않습니다). 그리고 PC를 다시 시작하려고했습니다 =) – Vladimirs

답변

0

coffeelint를 사용 중이고 들여 쓰기 값을 2 칸으로 변경하려면 다음을 수행해야합니다. 당신이 편집

module.exports = Indentation = (function() { 
    Indentation.prototype.rule = { 
    name: 'indentation', 
    value: 2, 
    level: 'error', 
    message: 'Line contains inconsistent indentation', 
    description: "This rule imposes a standard number of spaces to be used for\nindentation. Since whitespace is significant in CoffeeScript, it's\ncritical that a project chooses a standard indentation format and\nstays consistent. Other roads lead to darkness. <pre> <code>#\nEnabling this option will prevent this ugly\n# but otherwise valid CoffeeScript.\ntwoSpaces =() ->\n fourSpaces =() ->\n  eightSpaces =() ->\n   'this is valid CoffeeScript'\n\n</code>\n</pre>\nTwo space indentation is enabled by default." 
    }; 

파일은 아마 어떤 결과입니다 생성 된 파일입니다 다음과 같이 2에 "값"의 값을 coffeelint/lib 디렉토리/coffeelint.js 파일을 변경합니다.