Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # JSHint JSLint 대신에, ''JSHint''를 사용합니다. http://jshint.com/ # JSLint ## Read only 상단부에 주석문을 추가한다. /*global greeting:true */ 이는 전역변수가 쓰기 가능하다는 것을 알려주는 역할을 한다. ## Missing 'use strict' statement 없다고 하니, ''"use strict";'' 를 추가한다. ## Unexpected character '(space)'. 불필요한 공백을 제거한다. ## Use spaces, not tabs. 탭을 지우고, 공백으로 채운다. # 여기까지 진행하다보니, 왜 탭을 지워야 하는 생각에 JSHint 로 변경함 # JSHint 본문에 코드를 입력하면, 수정사항이 오른쪽에 표출됩니다. ## 'visibleLayerList' is already defined. 변수가 두번 선언 되었네요. 하나를 지웁니다. ## Missing semicolon. 세미콜론이 없네요. 세미콜론을 추가합니다. ## Comma warnings can be turned off with 'laxcomma'. 배열 원소를 입력할때에, 콤마 위치를 뒷쪽으로 일치 시킵니다. 또는 ''/*jshint laxcomma:true */'' 상단에 힌트를 추가합니다. 옵션의 힌트는 ''http://jshint.com/docs/options/'' 여기서 확인 가능합니다. ## Use '===' to compare with 'true'. 비교 할 때는 ''==='' 를 사용합니다. ## The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype. 원치 않는 프로퍼티가 있을 수 있으므로, if 문을 추가해서 필터를 해야 합니다. <code> for (prop in me) { if (me.hasOwnProperty(prop)) { doSomething(prop); } }</code> ## 'moveExtent' is already defined. 함수명과 변수명도 중복되서는 안됩니다. 변수명을 변경합니다. ## Unnecessary semicolon. 필요없는 세미콜론을 지웁니다. ## undefined variables 선언이 안되어 있는 변수들입니다. ''var'' 로 선언해 줍니다. open/jshint.txt Last modified: 2024/10/05 06:15by 127.0.0.1