Jshint: JSHint + `"use strict";`๋Š” ๊ฐ€์งœ "'๋‚ด๋ณด๋‚ด๊ธฐ'๊ฐ€ ์ •์˜๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค." ๊ฒฝ๊ณ 

์— ๋งŒ๋“  2013๋…„ 05์›” 09์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: jshint/jshint

๋‚ด Node.js ์ฝ”๋“œ์— JSHint์™€ "use strict"; ๋ฅผ ๋ชจ๋‘ ์ ์šฉํ•˜๊ณ  ์‹ถ์ง€๋งŒ ๊ทธ๋ ‡๊ฒŒ ํ•  ๋•Œ JSHint๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ถˆํ‰ํ•ฉ๋‹ˆ๋‹ค.

$ jshint .
binfix.js: line 14, col 1, 'exports' is not defined.
binfix.js: line 24, col 1, 'exports' is not defined.
binfix.js: line 48, col 1, 'exports' is not defined.

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” ์ด๊ฒƒ์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค:

{
"node" : true
}

.jshintrc ํŒŒ์ผ์—์„œ ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž˜ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค. @mcandre ์™€ @valueof ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

๋ชจ๋“  3 ๋Œ“๊ธ€

/*jshint node:true */ ์˜ต์…˜์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

@antonkovalyov ๋‹ค์‹œ ํ•œ๋ฒˆ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! "node": true ๋ฅผ .jshintrc ์— ์ถ”๊ฐ€ํ•˜๋ฉด ๋ชจ๋“  ๊ฒฝ๊ณ ๊ฐ€ ์‚ฌ๋ผ์กŒ์Šต๋‹ˆ๋‹ค!

๋‚˜๋Š” ์ด๊ฒƒ์„ ์ถ”๊ฐ€ํ–ˆ๋‹ค:

{
"node" : true
}

.jshintrc ํŒŒ์ผ์—์„œ ๊ทธ๊ฒƒ์€ ๋‚˜๋ฅผ ์œ„ํ•ด ์ž˜ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค. @mcandre ์™€ @valueof ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰