2.2.0 • Published 10 years ago

urad-make-eslint v2.2.0

Weekly downloads
9
License
MIT
Repository
-
Last release
10 years ago

urAD JavaScript Coding Style

  1. 安裝
  2. 使用
  3. 選項

安裝

Setp 1

從 npmjs.org 下載、安裝 urAD 共用的 eslint 設定檔到專案內,安裝過程中會在 pwd 下產生 .eslinerc 檔案、dependencies.mk 兩個檔案

$ npm i --save urad-make-eslint

Step 2

建立 Makefile

# 載入相依的 Makefile
# 他會包含我們 urad-make-eslint 下的 index.mk
include dependencies.mk

# 取得所有 js 檔案位置
# $(shell ...) 請替換成取得所有專案內 js 檔的指令
SRC = $(shell find lib/ -type f -name '*.js')

使用

$ make eslint

如何閱讀錯誤訊息

error

  1. 檔案位置(index.js)
  2. 問題發生的行數、欄數(25 行、25 欄)
  3. 錯誤等級
  4. 錯誤訊息
  5. rule 名稱,可以用他到 eslint 網站上取得詳細說明(http://eslint.org/docs/rules/quotes

選項

eslintrc

2.2.0

10 years ago

2.1.0

10 years ago

2.0.0

10 years ago

1.1.0

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago