๋ด 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.
/*jshint node:true */
์ต์
์ ์ฌ์ฉํฉ๋๋ค.
@antonkovalyov ๋ค์ ํ๋ฒ ๊ฐ์ฌํฉ๋๋ค! "node": true
๋ฅผ .jshintrc
์ ์ถ๊ฐํ๋ฉด ๋ชจ๋ ๊ฒฝ๊ณ ๊ฐ ์ฌ๋ผ์ก์ต๋๋ค!
๋๋ ์ด๊ฒ์ ์ถ๊ฐํ๋ค:
{
"node" : true
}
.jshintrc ํ์ผ์์ ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์ ์๋ํ์ต๋๋ค. @mcandre ์ @valueof ๊ฐ์ฌํฉ๋๋ค!
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ์ด๊ฒ์ ์ถ๊ฐํ๋ค:
.jshintrc ํ์ผ์์ ๊ทธ๊ฒ์ ๋๋ฅผ ์ํด ์ ์๋ํ์ต๋๋ค. @mcandre ์ @valueof ๊ฐ์ฌํฉ๋๋ค!