JSLint는 자바스크립트 문법 규범을 검사합니다.

저자:작은 꿈, 2017-01-10 10:19:32, 업데이트: 2017-01-10 10:24:05

JSLint는 자바스크립트 문법 규범을 검사합니다.

앞면 자바스크립트 코딩에 JSLint라는 좋은 도구가 있습니다.

  • Missing semicolon. : 은 점수를 놓치고 있습니다.

  • Use the function form of \use strict \.: 은 표준화된 정의 function을 사용합니다.,

  • Unexpected space after -. : -' 뒤에 빈 공간이 없어야 한다.

  • JSON 값이 예상됩니다. JSON: JSON 값을 입력하십시오.

  • Mixed spaces and tabs.: 스페이스와 탭 반복.

  • Unsafe character.: 안전하지 않은 캐릭터.

  • Line too long. : 줄의 문자는 설정된 최대 길이를 초과합니다.

  • 트레일링 화이트스페이스. 트레일링: 이 라인의 끝에는 너무 많은 빈 공간이 있습니다.

  • 스크립트 URL.: 스크립트 URL.,

  • Unexpected {a} in {b} . : {b} 에 {a}.이 나타나지 않아야 한다.

  • Unexpected {a} : 이 여기서는 안 돼{a} .

  • Strings must use doublequote. : 문자열은 두 개의 괄호를 사용해야 합니다.

  • Unnecessary escapement. : 을 돌릴 필요가 없습니다.

  • Control character in string: {a}.: 는 문자열에 Control의 문자열이 나타납니다.

  • Avoid \.: 은 \을 피합니다.

  • Avoid \v.: 가 \v을 피하고,

  • Avoid \x-.: 은 \x-을 피합니다.

  • Bad escapement: : 의 잘못된 번역 문자 ,

  • Bad number {a}.: 잘못된 숫자 {a},

  • Missing space after {a} . : {a} 뒤에 빈자리가 없어서

  • Dont use extra leading zeros {a}. : 더 이상 {a} 앞의 0을 사용하지 마십시오.

  • Avoid 0x-. {a}.: 은 0x-. {a}.을 사용하지 않도록 한다.

  • A trailing decimal point can be confused with a dot. A trailing decimal point can be confused with a dot. A trailing decimal point can be confused with a dot.

  • Unexpected comment. : 은 여기 댓글이 없어야 합니다.

  • Unescaped {a} .: 은 변함이 없다.{a} ,

  • 정규 표현식에서 예상치 못한 제어 문자가 나타납니다.

  • Unexpected escaped character {a} in regular expression. : 는 정규 표현식에서 변환되지 않은 문자가 나타났습니다.

  • Expected {a} and instead saw {b}: {a}를 대신해서 {b}을 사용해야 합니다.

  • Spaces are hard to count. Use {{a}}.

  • Insecure {a} : 불안한 {a}

  • Empty class.: 빈 클래스 ,

  • () a number and instead saw ({a}) () a number and instead saw ({a})

  • {a} should not be greater than {b}. : {a}{b}보다 크지 않아야 합니다.

  • hasOwnProperty은 정말 나쁜 이름입니다.

  • {a} was used before it was defined.:{a}가 정의되기 전에 사용되었다.

  • {a}은 이미 정의되어 있습니다.

  • A dot following a number can be confused with a decimal point. A dot following a number can be confused with a decimal point. A dot following a number can be confused with a decimal point.

  • () Confusing minusses () (): () 의 부정적 표현 - (),

  • Confusing plusses.: 은 +, +, +, +, +,

  • Unmatched {a} : 가 맞지 않는 {a}

  • Expected {a} to match {b} from line {c} and instead saw {d}. : 은 줄 {c}에 있는 {a}{b}을 매치하여,

  • 예기치 않은 초기 프로그램 종료. 예기치 않은 초기 프로그램 종료. 예기치 않은 초기 프로그램 종료.

  • A leading decimal point can be confused with a dot: .

  • Use the array literal notation [].: 배열의 기호 []를 사용한다.

  • Expected an operator and instead saw {a} . : {a}를 대신하는 기호를 사용해야 합니다.

  • Unexpected space after {a}. : {a} 뒤에 빈자리가 표시될 수 없습니다.

  • Unexpected space before {a} . : {a} 전에 빈 공간이 나타나지 않아야 합니다.

  • Bad line breaking before {a}.: {a} 전에 잘못된 라인 전환 {a},

  • Expected {a} to have an indentation at {b} instead at {c}.: {a}은 {c}가 아닌 {b}에서 에 쪼그라들 필요가 있습니다.

  • Line breaking error {a}.: 라인 브레이킹 오류 {a},

  • Unexpected use of {a}.: 은 여기서 {a}을 사용할 수 없습니다.

  • Bad operand.: 잘못된 연산수

  • NaN와 비교하기 위해 isNaN 함수를 사용하십시오.

  • Confusing use of {a}.: {a}의 사용은 {a}의 사용에 대해 쉽게 혼란을 일으킨다.

  • Read only.: 은 읽기 전용 속성입니다.

  • {a} is a function. : {a}는 함수입니다.

  • Bad assignment. : , 잘못 부여한 과제,

  • Do not assign to the exception parameter. : 추가 매개 변수에 값을 부여하지 마십시오.

  • Expected an identifier in an assignment and instead saw a function invocation. : 은 할당 문장에 하나의 식별자를 필요로 하며, 하나의 메소드의 호출 이 아닙니다.

  • Expected an identifier and instead saw {a} (a reserved word). : 은 아이디피셔너가 필요하고, {a} (보호 문자) 는 필요하지 않습니다.

  • Missing name in function declaration. : : 방법 선언에서 이름의 이 빠졌습니다.

  • Expected an identifier and instead saw {a} : {a} 대신 식별자를 필요로 합니다.

  • inner functions should be listed at the top of the outer function. inner function의 선언은 이 함수의 꼭대기에 있어야 한다. inner functions should be listed at the top of the outer function. inner functions should be listed at the top of the outer function. inner functions should be listed at the top of the outer function. inner functions should be listed at the top of the outer function.

  • Unreachable {a} after {b}.: {b} 이후에는 {a}을 얻을 수 없습니다.

  • 유니콘: 유니콘: 유니콘: 유니콘: 유니콘: 유니콘

  • Label {a} on {b} statement. : {a}을 {b}의 선언에 넣고,

  • Label {a} looks like a javascript url.

  • : assignment or function call and instead saw an expression. : assignment 또는 function call을 기대하고 대신 expression를 보았습니다.

  • Do not use new for side effects. : new 문장을 사용하지 마십시오.

  • Unnecessary \use strict \.: 불필요한 \use strict \.,

  • Missing \use strict \ statement. : 가 빠진 \use strict \ 선언

  • Empty block.: 빈 모듈 ,

  • Unexpected /*member {a} .: 은 출현하지 않아야 한다.

  • {a} is a statement label.

  • {a} used out of scope.:{a}은 범위를 벗어난 용도로 사용된다.

  • {a} is not allowed.:{a}을 사용하는 것은 허용되지 않습니다.

  • {a} is not defined.

  • Use {a} to compare with {b}. : {a}과 비교하여,

  • Variables should not be deleted. : 변수가 삭제되어야 합니다.

  • Use the object literal notation {}.

  • Do not use {a} as a constructor.

  • 함수 구성 요소는 eval.:함수 구성 요소는 eval.,

  • A constructor name should start with an uppercase letter. : : 건설 객체의 이름은 대문자로 시작되어야 합니다.

  • Bad constructor.: 잘못된 구성 객체 ,

  • Weird construction. Delete new. : 의 구성 개체는 잘못 되어 있습니다. new을 삭제하세요.

  • Missing () invoking a constructor.: 괄호가 없어서

  • Avoid arguments.{a}.: 변수를 피합니다.{a}.,

  • document.write는 eval의 형태가 될 수 있습니다.

  • eval is evil.: eval을 사용하지 않도록 노력합니다.

  • Math is not a function. : Math는 함수 가 아닙니다.

  • Missing new prefix when invoking a constructor. : : new이 여기 없어서, newnew이 필요하다는 뜻입니다.

  • Missing radix parameter. : 는 변수가 없는데,

  • implied eval is evil. a function instead of a string. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied eval is evil. implied: implied eval is evil. implied: implied: implied: implied: implied: implied: implied: implied: implied: implied

  • Bad invocation.: , 잘못 호출한 ,

  • [{a}] is better written in dot notation. [{a}]는 점으로 쓰면 좋습니다.

  • Extra comma.: 이 필요없는 우표로 ,

  • Dont make functions within a loop. : 은 ループ 방식으로 함수 을 만들지 마십시오.

  • Unexpected parameter {a} in get {b} function. : 는 {b} 방법의 변수 {a}를 사용하지 않아야 합니다.

  • Duplicate member {a} .: 이 반복되는 {a} ,

  • Expected to see a statement and instead saw a block. : 여기 문장 선언이 있어야 합니다.

  • Too many var statements. : 너무 많은 var의 진술은 , 너무 많은 var의 진술은 , 너무 많은 var의 진술은 , 너무 많은 var의 진술은 .

  • Redefinition of {a}.: {a}을 반복적으로 정의하고,

  • It is not necessary to initialize {a} to undefined. : {a}undefined로 초기화 할 필요가 없습니다.

  • Expected a conditional expression and instead saw an assignment. : 은 조건표현을 기대하고 대신 임무를 보았다.

  • Expected a break statement before case. : case 전에 break이 있어야 합니다.

  • Expected a break statement before default. : default 전에 break을 필요로 합니다.

  • This switch should be an if .: 여기 있는 switch if 이어야 합니다.,

  • All debugger?? statements should be removed. : debugger?? 의 문장 문장을 삭제하여

  • {a} is not a statement label. : {a}은 선언 레이블이 아닙니다.

  • Expected an assignment or function call and instead saw an expression. : 은 명령어 또는 함수 호출이 필요하고, 표현식 호출이 필요하지 않습니다.

  • Function declarations should not be placed in blocks. a function expression를 사용하거나 문장을 외부 함수의 꼭대기로 이동하십시오.

  • 이 프로젝트에서 발견한 몇 가지 팁에 대해 몇 가지 예를 들어보겠습니다:

  • 1 [W099]: 혼합 공간 및 탭

    이 오류는 가장 흔한 오류입니다. 즉, 같은 줄에서, 스페이스와 탭 축소 혼합이 사용되고, 변경은 간단합니다. 일반적으로, 탭 축소를 삭제하고, 모두 스페이스로 변경합니다. 편의성을 위해, 우리는 편집기의 탭 축소를 2개 또는 4개의 스페이스로 설정하여 원래 축소를 대체할 수 있습니다.

  • 2 [W030]:배정 또는 함수 호출을 예상하고 대신 표현식을 보았습니다.

    이 오류 지표는 매우 이상합니다. 이 오류 지표는 다음과 같은 코드에서 지표했습니다. index-1 <0? index = 0:index = index - 1; 이것은 코마 표현식입니다. 하지만 JSLInt는 여기서 표현식이 아니라 함수가 있어야 한다고 생각합니다.

  • 3 [W041]: 비교하기 위해 ===을 사용하십시오...

    이 오류는 우리가 전체 행렬을 사용한다면, 즉, 표현식의 양쪽의 데이터 타입이 일치한다면, 전체 행렬을 사용해서

  • 4 [W033]:미난한 반점점

    표기점을 놓친 것; 이것은 보통 스스로 잊어 버린 것인데, 하지만 주목해야 할 점은 단 하나의 문장 구조를 위해서도 표기점을 써야 한다는 것입니다. 예를 들어: if(index<0) {index=tcount-1} 이 코드, 올바른 표기법은 if(index<0) {index=tcount-1;}입니다.

  • 다른 몇 가지 잘못된 팁도 있습니다. 좋은 코딩 스타일과 글쓰기 습관을 키우십시오.

번역주http://www.zystudios.cn/blog/post/70.Shtml작은 의 블로그


더 많은