# TestFramework and Lint --- ## ç§ã«ã¤ã㦠--- ![](https://avatars0.githubusercontent.com/u/1124024?v=3&s=230) Vim scriptã®Lint developerã å°éã¯JavaScriptã ãã¾JavaScriptã®ãã¹ãæ¬ãå·çä¸ã§ãã --- ## Lintã¨ã¯ä½ã --- ### æ§æ解æã«åºã¥ãéçæ¤æ»ãã¼ã« --- #### ãã¼ã¯ã³åã®ä¾ ``` if ( condition ) { } ãã¼ã¯ã³å: AA B CCCCCCCCC D E F ``` #### æ§ææ¨ã®ä¾ ``` if ( condition ) { } ``` ``` { type: "if", condition: { type: "identifier", name: "condition" }, ... } ``` --- ### 3種ã®æ¤æ»é ç® ã§ã¯ãLintã¯ä½ãæ¤æ»ããã®ã§ããããï¼ æ¤æ»é ç®ã¯ãããããããã次ã®3ã¤ã«åé¡ã§ãã¾ãï¼ - 確å®ã«ééãã¦ãã - ãã¤ãééããã - ã¹ã¿ã¤ã«ãä¹±ãã¦ãã --- #### 確å®ã«ééãã¦ãã 確å®ã«ééãã¦ãããã®ã åç´ãªæ§æã¨ã©ã¼ããæªå®ç¾©ã®å¤æ°åç §ãªã©ã --- #### ãã¤ãééããã braceãªãifæãªã©ã ãã®æç¹ã§ã¯åé¡ã¯ããã¦ããªãããå°æ¥çãªå¤æ´ã«ãã£ã¦å±éºãªã³ã¼ãã«ãªãå¯è½æ§ããããã®ã ``` goto fail; goto fail; ``` ãæåã§ããã --- ### Lintã®æ¤æ»é ç®1: 代表çãªééããã¡ å®éã«ãã©ããªééããããã®ãã¿ã¦ã¿ã¾ãããã --- #### equals or == (Java) ãªãã¡ã¬ã³ã¹ã®æ¯è¼ã¨ã¯ã©ã¹å®ç¾©ã®æ¯è¼ã¯ç°ãªãã¾ãã æååã®æ¯è¼ã`==`ã§ãã£ã¦çãç®ã«ãã£ã人ã¯æ°ç¥ããªãã§ãããã --- #### 'use strict' (JavaScript) JavaScriptã¯å¦çç³»ã®æ¤æ»ãå³ããããããã®æ§æããã£ã¦ãã¾ãã ãã¡ã¤ã«å é ã«`'use strict'`ã¨æ¸ãã¨ããã®ãã¡ã¤ã«å ¨ä½ã®æ¤æ»ãå³ããã§ãã¾ãã ãã ããä»è¨èªã¨ã¯ç°ãªãJSã«ã¯ã½ã¼ã¹ãçµåããæåããããã¨ãåé¡ãå¼ãèµ·ããã¾ããã ãã¾ãã¾`'use strict'`ãé©ç¨ããã¦ãããã¡ã¤ã«ãçµåé ã®å é ã«ããã¨ã`'use strict'`ã«èããããªãã¹ã¯ãªãããä¾å¤ã§æ»ã¬ã®ã§ãã --- #### do-end or {} (Ruby) ãããã¯ä»ãã¡ã½ããå¼ã³åºãæ§æã¯`do ... end`ã¨`{}`ãããã¾ãã ãã®2ã¤ã¯ãæ¼ç®åã®çµåã®å¼·ãã«éããããã¾ãã ãããç解ããã«åã«ç½®æãã¦ãã¾ãã¨ã解éã«éããã§ã¦ãã¾ãã¾ãã ``` foobar a, b do .. end foobar a, b { .. } ``` --- #### 2å¼æ° open (Perl) ãã¡ã¤ã«ã®opené¢æ°ã¯1~3å¼æ°ã§å¼ã³åºãã¾ãã ãã®ãã¡ã2å¼æ°ã®ãã®ãå±éºã ãã¡ã¤ã«åã«ããã第äºå¼æ°é¨åã§ã·ã§ã«ã³ãã³ããå®è¡ã§ããã®ã§ãã Webãµã¼ãã¼çã§ãããããã¨OSCiãçºçãã¾ãã ã¤ãã¤ã --- #### =~æ¼ç®åã¨ignorecase (Vim script) Vimã«ã¯`ignorecase`ã¨ãã大æå/å°æåã®éããç¡è¦ãããè¨å®ãããã¾ãã ãã®è¨å®ã¯ãVim scriptã®æååã®æ¯è¼æ¼ç®`=~`ã`!~`ã«ã¾ã§å½±é¿ãã¾ãã ãã®ãããignorecaseã®å½±é¿ãåããªã`=~#`ã`=~?`ã使ãã¹ããªã®ã§ãã --- #### ãã¹ã¦ãè¦ãããã¾ããï¼ ããããã®è¨èªããããããããã®éãããã¾ãã ããããã¹ã¦è¦ããå¿ è¦ãããã®ã§ããããã ãããã®éã¯ãã»ã¨ãã©æ¬è³ªçã§ã¯ãªãããã«æãã¾ãã ã¡ãªã¿ã«ãç´¹ä»ããäºä¾ã¯ãã¹ã¦Lintã«ãã£ã¦ææããã¾ãã --- ### Lintã®æ¤æ»é ç®2: ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã« --- #### ã¹ã¿ã¤ã«ãä¹±ããã¨ã¯ ã½ããã¿ãã»ãã¼ãã¿ãã®æ··å¨ããã¤ã³ãã³ãå¹ ã®ä¹±ããªã©ã®ãã¨ãããã¾ãã ä»ã«ãã空ç½ã®éãæ¹ãç°ãªã£ã¦ããããããã³ã¡ã³ãã®å é æåã®å¤§å°ãä¸è²«ãã¦ããªããã¨ãããã®ã¾ã§ããã¾ãã ããããã¹ã¿ã¤ã«ãä¹±ããã®ã¯ããã°ã©ãã®ææ§ã®åé¡ã§ã¯ããã¾ããã ããããã¹ã¿ã¤ã«ã®æ´¾é¥ãå¤ãããã®ãåé¡ãªã®ã§ãã --- #### braceã®æ¹è¡ä½ç½®ã ãã¨ã£ã¦ããã®ææ§ [Wikipedia - åä¸ãã¹ã¿ã¤ã«](https://ja.wikipedia.org/wiki/%E5%AD%97%E4%B8%8B%E3%81%92%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AB) - K&Rã®ã¹ã¿ã¤ã« - BSD/ãªã¼ã«ãã³ã®ã¹ã¿ã¤ã« - BSD/KNFã¹ã¿ã¤ã« - ãã¯ã¤ãã¹ãã¹ã®ã¹ã¿ã¤ã« - GNUã¹ã¿ã¤ã« - Picoã¹ã¿ã¤ã« - Bannerã¹ã¿ã¤ã« --- #### ã¢ã¬ã«ã®ã¼ããå¼ãèµ·ããã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã« ã¨ãã«ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã¯ãã¢ã¬ã«ã®ã¼åå¿ã®ãã¨ãæ°æã¡æªãæãä¸ãã¾ãã ç¹ã«ãJavaScriptã®ã»ãã³ãã³åç½®ã¹ã¿ã¤ã«ã¨ãã ç§ã¯èãããã¾ãããçºçãã¾ãã > foo(); > [1,2,3].forEach(bar); > > you could do this: > > foo() > ;[1,2,3].forEach(bar) å¼ç¨: [An Open Letter to JavaScript Leaders Regarding Semicolons](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding) --- ### ããã¾ã§ã®ã¾ã¨ã Lintã®æ¤æ»é ç®ã¯ããããããã¾ããã次ã®3ã¤ã«åé¡ã§ãã¾ã - 確å®ã«ééãã¦ãã - ãã¤ãééããã - ã¹ã¿ã¤ã«ãä¹±ãã¦ãã --- ## ãªãç§ã¯Lintã使ãã®ã? ãã¦ãç§ã¯èªä»å ±ã«èªããLintFreakã§ãã ãªããããªã«ãLintã好ããªã®ãã説æãã¾ãã --- ### ãã¹ãã¯ãã¦ãããããããè¦ã¤ããããªãåé¡ãã¡ ç§ã¯ãã¹ãã好ããªã®ã§ããã»ã©ã®ãã¨ããªãéããã¹ããæ¸ãã¾ãã ãããããã¹ããæ¸ãã¦ãè¦ã¤ããããªãåé¡ãã¡ããããã¨ã«æ°ãã¤ãã¾ãã åä½ã«æ¯éã¯ãªãã¦ããä¿å®æ§ã«æ¯éããããã¿ã¼ã³ã¯ããããããã¨ãããã¨ã§ãã --- #### å°éä¸è½ãªå¦ç å°éä¸è½ãªå¦çã¯ãæããã«ä¸å¿ è¦ãªã³ã¼ãã§ãã ã³ã¼ãã¯ææ¸ã¨ããå´é¢ããã¡ã¾ãã ã ãããååã¨ãã¦ä¸å¿ è¦ãªãã®ãã³ã¼ãã«æ®ãã¦ã¯ããã¾ããã --- #### æªä½¿ç¨ã®å¤æ° æªä½¿ç¨ã®å¤æ°ããä¸å¿ è¦ãªã³ã¼ãã§ãã ãããé »ç¹ã«çºçããåä»è ã§ãã --- #### ã¡ã¢ãªãªã¼ã¯ ã¡ã¢ãªãªã¼ã¯ã¯é·æéåä½ããããã°ã©ã ã§ã¯è´å½çãªåé¡ã§ãã ãã ããã¡ã¢ãªãªã¼ã¯ãåå ã§ã¦ããããã¹ãã失æãããã¨ã¯ã¾ãããã¾ããã 奮起ãã¦èä¹ ãã¹ãããããªãéãã¯ã¿ã¤ãããªãã®ã§ãã ããããç°¡åãªãã¿ã¼ã³ã§ããã°éçæ¤æ»ã§æ©æ¢°çã«çºè¦ã§ãã¾ãã --- ### ãã£ã¼ãããã¯ã®éã ã¦ããããã¹ãã§ã¯ãã¦ããããã¹ããæ¸ããã³ã¼ããå®è¡ããã¾ã§åé¡ããããã©ãããããã¾ããã Lintã¯éçãªæ¤æ»ãªã®ã§ãå®è¡ããã¾ã§ããªãåé¡ãé²è¦ãã¾ãã ãã®ãããã¦ããããã¹ããããæéãå°ãªããã£ã¼ãããã¯ãã¯ããã®ã§ãã --- #### å¤æ°åã®typoãåä½ãã¹ãã§çºè¦ããã®ã¯é ããã æ¤è¨¼ã§ããåé¡ã®ã¬ã¤ã¤ã¼ã¯ç°ãªãã¾ãããLintã§è¦ã¤ããåé¡ãã¦ããããã¹ãã§è¦ã¤ãããã¯ããã¾ããã --- ### ä¸è²«ããã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã®å®ç¾ ã³ã¼ãã®å¤è¦³ã¯ãã¨ã©ã¼ãã«ã¼ãã®ããã«éè¦ã§ãã ãããããããã¾ã§ãããã¦ããããã¹ãã¯ã³ã¼ããã©ããªå¤è¦³ããã¦ããã®ãã«ã¤ãã¦ç¡é¢å¿ã§ãã ã³ã¼ããã©ãæ¯ãèããã«èå³ãããããã§ãã --- ### ããã¾ã§ã®ã¾ã¨ã ç§ãLintãæããçç±ã¯3ã¤ï¼ - ãã¹ãã¯ãã¦ãã¦ããè¦ã¤ããããªãåé¡ããããã - ãã£ã¼ãããã¯ãã¨ã¦ãéããã - ä¸è²«ããã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ãå®ç¾ã§ãããã --- ## Lint ã®æ§ã ãªå´é¢ ã§ã¯ãç§ã®ä¸»è¦³ãã¯ããã¦ãLintããããããªè§åº¦ããã¿ã¤ãã¦ã¿ã¾ãã ããã¨ã次ã®ãããªå´é¢ãè¦ã¤ãããã¨ãã§ãã¾ãã --- ### Lintã®å´é¢: ã³ã¼ãã¬ãã¥ã¼ã®çååãã¼ã« ãããããæ©æ¢°ã§ã§ãããã¨ã人éãããã¹ãã§ã¯ããã¾ããã 人éãã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã®ä¹±ãçï¼å§ãã§ãã¯ï¼ããããªãã®ã¯ä¸æ¯ã§ãã 人éã¯ãã£ã¨å¥ã®ãã¨ã«æ³¨åããã¹ãã§ãã ã³ã¼ãã¬ãã¥ã¼ã®è£å©ãã¼ã«ã¨ãã¦ã®å´é¢ãã¤ããã¨ããã§ãããã --- ### Lintã®å´é¢: ã³ã¼ãã¬ãã¥ã¼ã®å質åä¸ãã¼ã« 人éã¯ãã¹ãããçãç©ã§ãã ãããããã¡ãã¨ãã¹ããããLintã¯ãã¹ããããã¾ããã ããã¯ãã³ã¼ãã¬ãã¥ã¼ã®è£å®ãã¼ã«ã¨ãã¦ã®å´é¢ã¨ãã¦æç¨ãªãã¨ãæå³ãã¦ãã¾ãã --- ### Lintã®å´é¢: è½ã¨ãç©´ã®å½¢å¼ç¥å ããããã®Lintã®ã«ã¼ã«ã¯ãå 人ãè¸ãã å°é·ã®æè¨ã§ãã ãã¨ãã°ãããã»ã©ã®`'use strict'`åé¡ã¯ãå®éã«Amazonã§èµ·ãã¦ãããã¨ã§ãã ãã®åé¡ããLintã®ã«ã¼ã«ã¨ãã¦ææåããããããããåºãç¥ãããããã«ãªãã¾ããã ããLintã«çµã¿è¾¼ã¾ãã¦ããªããã°ãç¥ã人ãç¥ãè½ã¨ãç©´ã¨ãã¦ã人ç¥ããéçºè ãè¦ããã¦ãããã¨ã§ãããã ãã®ããã«ãLintã¯ãå°é·ã®è¢«å®³è ã®ã¿ã®æé»ç¥ãå½¢å¼ç¥åããå´é¢ãããã¾ãã --- ### Lintã®å´é¢: ææ ã¯ããã¦ã®è¨èªãLintã¨ã¨ãã«ã¯ãããã®ã¯ã¨ã¦ããããã¨ã§ãã Lintã¯å 人ãæ©ãã å°é·æºã®ã¬ã¤ãã®ãããªãã®ã ããã§ãã ã¯ããããå°é·ãè¸ã¾ãªãæ©ãæ¹ãå¦ã¶ãã¨ã§ãæ©ãä¸éã§ãã¾ãã ã¾ããå¤ãã®å ´åãå°é·ã®ç¥èã¯è¨èªãã©ã¤ãã©ãªã«æ·±ãç解ãããããã¾ãã å®éã«ãLintã®åå ¸ã§ãããPerl Best PracticeãããJavaScript: Good Partsãã®è©å¤ã¯é常ã«é«ãã§ãã --- ### Lintã®å´é¢: ç´äºã®äºé²æ段 ã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã¯ç´äºã®ç¨®ãªã®ã§ãã¯ããããã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ãããã¦ãããã¨ã¯éè¦ã§ãã æç« ã§ãããããç¶²ç¾ çã«æ ä¿ã§ããLintã®æ¹ãæã¾ããã§ãã ãããæ ã£ã¦ãGitHubã§æããããã¨ãããã¾ãã ãã³ã¼ãã£ã³ã°ã¹ã¿ã¤ã«ã«ã¤ãã¦ã¨ãããè¨ããªããã¹ã¿ã¤ã«ãã§ãã«ã¼ãããã ã¾ã£ãããã®éãã§ãã¹ã¿ã¤ã«ãã§ãã«ã¼ãããã°ãç¸æã®æéãç¯ç´ã§ããã¯ãã§ãã ã¤ã¾ããç´äºãäºé²ããåæ¹ã®æéãç¯ç´ããããã®ãã¼ã«ã¨ããå´é¢ããããã¨ããããã¾ãã --- ### Lintã®å´é¢: åçåæ¤æ»ã«éçåæ¤æ»ã¤ãããã楽ã«å®è£ ã§ãããæ軽ææ³ ããã°ã©ãã³ã°ã®ãã¡ããããã°æéã®å²åã大ããã®ã¯ããç¥ããã¦ãã¾ãã ãªãã¹ããããã°æéãæ¸ããããã«ãéçåæ¤æ»ãã¤ããããªããã¨ãããããã¾ãã ãã ãå¾ä»ãã§éçåæ¤æ»ãã¤ããã®ã¯é常ã«é£ããã®ã§ãã éçåæ¤æ»ããªãã£ãè¨èªã¯ãéçåæ¤æ»ã«åããªãä»æ§ãå¤ããã¤ããã§ãã ããã§ãå°ããªã¹ã¯ã許容ãã¦ãLintã¬ãã«ã®å®è£ ã«ããã¨ãåçåæ¤æ»è¨èªã§ããããããå®è£ ã§ãã¾ãã ã¤ã¾ãããããã°æéãæ¸ããããã®ç°¡ä¾¿ãªæ¹æ³ã¨ããå´é¢ãæã£ã¦ãã¾ãã --- ### ããã¾ã§ã®ã¾ã¨ã - Lintã«ã¯ãããããªå´é¢ããã - ã³ã¼ãã¬ãã¥ã¼ã®çååãã¼ã« - ã³ã¼ãã¬ãã¥ã¼ã®å質åä¸ãã¼ã« - è½ã¨ãç©´ã®å½¢å¼ç¥å - ææ - ç´äºã®äºé²æ段 - åçåæ¤æ»ã«éçåæ¤æ»ã¤ãããã楽ã«å®è£ ã§ãããæ軽ææ³ --- ## ã¨ã©ã¼ãã«ã¼ãæ©æ§ã®æ¯è¼ ã§ã¯ãä»ã®ã¨ã©ã¼ãã«ã¼ãæ©æ§ããã¿ãLintã¯ã©ãã§ããããã ã¨ã©ã¼ãã«ã¼ãã®æ©æ§ã®ãªãã§ã©ã®ãããªç«ã¡ä½ç½®ãªã®ãã確èªãã¦ã¿ã¾ãããã --- ### é度ã¨ãªã¹ã¯ã®ãã¬ã¼ããªããåå¨ãã ã¨ã©ã¼ãã«ã¼ãæ©æ§ã¯ãé度ã¨ãªã¹ã¯æå¶ã®é¢ä¿ãã»ã¼ãã¬ã¼ããªãã®é¢ä¿ã«ããã¾ãã - ãã£ã¨ãé«éãªæ©æ§: æ§æãã¤ã©ã¤ã - é«éãªæ©æ§: Lint ã¦ããããã¹ã - ä½éãªæ©æ§: ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ã - ãã£ã¨ãé«éãªæ©æ§: E2Eãã¹ã --- - ãã£ã¨ãæ®åãªã¹ã¯ãé«ãæ©æ§: æ§æãã¤ã©ã¤ã - æ®åãªã¹ã¯ãé«ãæ©æ§: Lint ã¦ããããã¹ã - æ®åãªã¹ã¯ãä½ãæ©æ§: ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ã - ãã£ã¨ãæ®åãªã¹ã¯ãä½ãæ©æ§: E2Eãã¹ã --- ã¤ã¾ããLintã¯é«éã ããªã¹ã¯æå¶ã¯å¤§ãããªãã¨ããä½ç½®ä»ãã§ãã --- ãã®ãã¬ã¼ããªããããå¥ã®ãã¨ãã¿ãã¦ãã¾ãã Lintãæ¤è¨¼ã§ããåé¡ãã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ããE2Eãã¹ãçºè¦ãã¦ãã¾ãã¨ããã£ã¼ãããã¯ãé ããªãã®ã§ãã ã¤ã¾ããé«éãªæ©æ§ã§æ¤è¨¼ã§ããåé¡ã¯ãé«éãªæ©æ§ã«ä»»ããã¹ãã§ãã Lintã¯ãé«éããæãªããªãç¯å²ã§ãæ§æãã¤ã©ã¤ãã§æ¤è¨¼ã§ããåé¡ããã大ããªåé¡ãåãæ±ãã¹ãã§ãã --- ãã¦ãLintã®èæ¯èª¬æã¯ããã¾ã§ã«ãã¦ããã¾ãããã ããããã¯ãLintã¨ãã¹ãã¬ãã¼ã ã¯ã¼ã¯ã®é¢ä¿ãã¿ã¦ããã¾ãã --- ## çå: Lintã¨ãã¹ããã¬ã¼ã ã¯ã¼ã¯ã¯ä½ãéãã®ã ããã --- ### Lintã¨ãã¹ãã®ä¸¡æ¹ããããããã®ã·ã¹ãã æ§æãè¤éããã æè¿ã®JSçéã¯ãESLint + JSCS + Mocha + Karma + ... ã¨ããããã«ãå¤æ®µã®ã¨ã©ã¼ãã«ã¼ããå¥ã ã®ã¢ã¸ã¥ã¼ã«ã§æä¾ããã¦ãã¾ãã ããã«ãã£ã¦ãå¤æ®µã®ã¨ã©ã¼ãã«ã¼ãæ©æ§ãçµã¿åãããããã«ãã¹ã¯ãªãããå¿ è¦ã¨ãªãã»ã©è¤éãªæ§æã«ãªã£ã¦ãã¾ãã ãã®ããããããã®ã¨ã©ã¼ãã«ã¼ãæ©æ§ã®ãã¡ãLintã¨ãã¹ãã¬ãã¼ã ã¯ã¼ã¯ãå ±éåã§ããªããã¨æ©ãã§ãã¾ããã --- ### åãã㨠- ã³ã¼ãã«æ½ãåé¡ãæ¢ããå ±åããã㨠### éãã㨠- æ¤æ»ã«ã¼ã«ã¯ - éçºè ãã¤ããï¼ãã¹ããã¬ã¼ã ã¯ã¼ã¯ï¼ - ãããããç¨æããã¦ããï¼Lintï¼ --- ### è¦ãã¦ããéã ã¤ã¾ãããããããã¨ã§ã¯ãªãã§ããããï¼ - [éå ±é] æ¤æ»ã«ã¼ã«ã¯ãéçºè ãç¨æãã/ãããããç¨æããã¦ãã - [å ±é] ã³ã¼ãã«æ½ãåé¡ããæ¤æ»ã«ã¼ã«ã«ãã¨ã¥ãåéã»æ´å½¢ã»è¡¨ç¤ºããæ©è½ï¼ãã¹ãã©ã³ãã¼ã®æ©è½ï¼ --- #### 人çè³æºã®é¸æã¨éä¸ éå ±éé¨åã«ã¤ãã¦ã¯ã人çè³æºã®é¸æã¨éä¸ã®åé¡ã«ã¿ãã¾ãã æ¬æ¥ãæ¤æ»ã«ã¼ã«ã¯ãã¹ã¦éçºè ãå®è£ ãã¦ãããã¯ãã§ãã ã ããæ¤æ»ã«ã¼ã«ããã¤ãã¼ã§ãªãããã¤æ©æ¢°ã§æ¤æ»ã§ãããã®ã«ã¤ãã¦ã¯ã誰ããä¸åº¦å®è£ ããã°ããã§ããã®ã§ãã --- ã¤ã¾ããLintãã¹ãã¨ã¬ãã¼ã ã¯ã¼ã¯ãåãå·»ãç°å¢ã®æ¬è³ªã¯ãæ¤æ»ã«ã¼ã«å®è£ ã®åæ¥ã«ããã¨èãã¦ãã¾ãã ããã¦ããã¹ãã¬ãã¼ã ã¯ã¼ã¯ã®æ©è½ã®ãã¡ããã¹ãã©ã³ãã¼ã®æ©è½ã«ã¤ãã¦ã¯å ±éåã§ããã¯ãã§ãã --- #### æ¤æ»ã«ã¼ã«å®è£ ã®åæ¥ã®ç·å¼ã ã¾ããåæ¥ã®ç·å¼ãã«ã¤ãã¦ããããããè¦æ¹ãããã¨èãã¦ãã¾ãã --- æ´å²çã«è¦ãã°ãæ©æ¢°ã§ã§ãããã¨ã¯ãã»ã¨ãã©Lintãæ ã£ã¦ãã¾ããã ã¤ã¾ããç·å¼ãã¯ãããªã£ã¦ããã®ã§ã¯ãªãã§ããããï¼ - æ©æ¢°ã§ãã§ãããã¨ããLintã®ããã㨠- æ©æ¢°ã§ã¯ã§ããªããã¨ãããã¹ããã¬ã¼ã ã¯ã¼ã¯+人éã®ããã㨠--- ç¾ç¶ã®ãæ©æ¢°ã§ã§ãããã®ã©ã¤ã³ã¯æ§æ解æã§ããããã©ããç¨åº¦ã«ã¿ãã¾ãã ããããå°æ¥ã«ããã£ã¦ããã®å¾åã¯ç¶ãã®ã§ããããï¼ --- #### Lintã人éããä»äºã奪ããããï¼: å¤æ°åã®å¦¥å½æ§æ¨è« æè¿ãé£èªåãããJSã®å¤æ°åãæ©æ¢°å¦ç¿ã«ãã£ã¦æ¨è«ãããããã¸ã§ã¯ãã[JSNICE](http://www.jsnice.org/)ãããã¥ã¼ã¹ã«ãªãã¾ããã ãã®ããã«ãæ©æ¢°å¦ç¿ãå¿ç¨ããã°ããã£ã¨ãæ©æ¢°ãã§ãããç¯å²ãåºããã®ã§ã¯ãªãã§ããããï¼ ãã¨ãã°ãå¤æ°åã®å¦¥å½æ§æ¤è¨¼ã®ããã«ã --- ### ããã¾ã§ã®ã¾ã¨ã - Lintãã¹ãã¨ã¬ãã¼ã ã¯ã¼ã¯ã®éãã®æ¬è³ªã¯ãæ¤æ»ã«ã¼ã«å®è£ ã®åæ¥ - ãã¹ãã¬ãã¼ã ã¯ã¼ã¯ã®æ©è½ã®ãã¡ããã¹ãã©ã³ãã¼ã®æ©è½ã«ã¤ãã¦ã¯å ±éåã§ããã --- ## Lintã®ãããã æå¾ã«ãããããã®Lintãã©ããªã£ã¦ããããäºæ³ãããã¨æãã¾ãã --- ### Lint on ãã¹ãã©ã³ãã¼ ãã¹ããã¬ã¼ã ã¯ã¼ã¯ã®ããã¹ãã©ã³ãã¼ã«ãããé¨åã¯Lintã¨å ±éåã§ãã¾ãã ãã®ããããã¹ãã©ã³ãã¼ã®ããã§ä¸ä½ã¨ãã¦å®è¡ã§ããLintãç»å ´ããã¨èãã¦ãã¾ãã --- ### æ©æ¢°å¦ç¿ å ã»ã©ãè¨åããããæ¤æ»ã«ã¼ã«ã«æ©æ¢°å¦ç¿ã®ææãæ´»ç¨ããããã¬ã¼ã¯ã¹ã«ã¼ããããã¨äºæ³ãã¦ãã¾ãã --- ### ãã¬ã¼ã ã¯ã¼ã¯ã®Lintã®å°é ããã¾ã§ç´¹ä»ãã¦ããLintã¯ãã©ããè¨èªã«å¯¾ããLintã§ããã ããããLintã®ç´ã¥ããã®ãè¨èªã«ã¨ã©ãã¦ããã®ã¯ãã£ãããªãã¨æãã¾ãããï¼ è¨èªåºæã®è½ã¨ã穴以å¤ã«ãããã¬ã¼ã ã¯ã¼ã¯åºæã®è½ã¨ãç©´ããããã®ã§ãã ããããã¯ããã¬ã¼ã ã¯ã¼ã¯åºæã®è½ã¨ãç©´ãæ¤æ»ããLintãèå ãæµ´ã³ã¦ããã¨èãã¦ãã¾ãã --- ### ããã¾ã§ã®ã¾ã¨ã LintFreakã®æªæ¥äºæ³ï¼ - Lint on ãã¹ãã©ã³ãã¼ã®ç»å ´ - Lint with æ©æ¢°å¦ç¿ã®ãã¬ã¼ã¯ã¹ã«ã¼ - Lint for Frameworkã®æµ¸é --- ## ä½è«: Lintãéçºãã¦ãã¦ããã£ãã㨠ããèå³ãããã°ãæã¾ãã¦èãã¦ãã ããã - ãã¡Lintã®ä¸åå - æ¤æ»ã«ã¼ã«ã®ãã©ã°ã¤ã³åã«ããã£ã¦ç®æãã¹ãè¨è¨