Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
javascript品質檢測工具 - ESLint
Search
julian7454
June 26, 2016
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
javascript品質檢測工具 - ESLint
簡介ESLint的工具特性
julian7454
June 26, 2016
More Decks by julian7454
See All by julian7454
Vue testing library - avoriaz
julian7454
0
79
Vue 2.0 開發環境 - 以 webpack2 建立
julian7454
0
96
houdini drafts
julian7454
0
69
PostCSS 與 cssnext
julian7454
0
110
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Fireside Chat
paigeccino
43
4.1k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
440
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
Side Projects
sachag
456
43k
Transcript
Js品質檢測工具-ESLint PIXNET 前端組 黃知遠 Julian
為何需要代碼品質檢測 • 減低開發過程review程式碼的時間。 • 避免花太多時間除錯。 • 快速產出風格統一的程式碼。 2
Eslint的優點 • 默認規則包含JSLint, JSHint, 可以無痛轉移。 • 規則可配置性高。 • 清晰明確的規則程式碼。 •
程式碼風格檢測 • 支持套件擴展,自定義規則。 3
支援外掛與jsx 4
規則的指定方式 布林值 : 0 關閉 1 警告 2 錯誤 Option
設定值視個別規則而定 http://eslint.org/docs/rules/ 5
繼承性 每個子目錄都可以有自己的 .eslintrc.檔案配置 取消繼承父目錄的規則 6
指定可執行環境與複寫全域 以 env 區塊指定模組或可執行環境, 避免偵錯“使用未 定義變數”。 函式庫使用globals匯出功能,true代表該變數可被覆寫。 7
Extends 重用設定 8
參考資料 ESLint http://eslint.org/ ESLint 使用入門 https://csspod.com/getting-started-with-eslint/ Apply ESLint – Using
Atom & linter – eslint https://amobiz.github.io/2015/12/21/applying-eslint-using-atom-linter-eslint/ Jslint to eslint https://www.qianduan.net/jslint-to-eslint/ 用 eslint x Airbnb javascript-rules 改善程式碼品質 http://seans.tw/2016/eslint-with-airbnb/ 9