-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
110 lines (76 loc) · 5.92 KB
/
atom.xml
File metadata and controls
110 lines (76 loc) · 5.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>mewtwo个人博客</title>
<subtitle>blog</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="https://mewtwo-chi.github.io/"/>
<updated>2017-05-16T15:59:08.000Z</updated>
<id>https://mewtwo-chi.github.io/</id>
<author>
<name>mewtwo</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>javascript语言精粹读书笔记-第一章</title>
<link href="https://mewtwo-chi.github.io/2017/05/16/javascript-good-parts/one/"/>
<id>https://mewtwo-chi.github.io/2017/05/16/javascript-good-parts/one/</id>
<published>2017-05-16T15:52:00.000Z</published>
<updated>2017-05-16T15:59:08.000Z</updated>
<summary type="html">
</summary>
<category term="读书笔记" scheme="https://mewtwo-chi.github.io/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/"/>
<category term="javascript语言精粹读书笔记" scheme="https://mewtwo-chi.github.io/categories/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/javascript%E8%AF%AD%E8%A8%80%E7%B2%BE%E7%B2%B9%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/"/>
<category term="javascript" scheme="https://mewtwo-chi.github.io/tags/javascript/"/>
</entry>
<entry>
<title>zepto源码分析一</title>
<link href="https://mewtwo-chi.github.io/2017/04/20/zepto-source-code-analysis/one/"/>
<id>https://mewtwo-chi.github.io/2017/04/20/zepto-source-code-analysis/one/</id>
<published>2017-04-20T15:21:00.000Z</published>
<updated>2017-05-16T15:59:08.000Z</updated>
<summary type="html">
</summary>
<category term="源码分析" scheme="https://mewtwo-chi.github.io/categories/%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/"/>
<category term="zepto源码分析" scheme="https://mewtwo-chi.github.io/categories/%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/zepto%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90/"/>
<category term="javascript" scheme="https://mewtwo-chi.github.io/tags/javascript/"/>
<category term="zepto" scheme="https://mewtwo-chi.github.io/tags/zepto/"/>
</entry>
<entry>
<title>基于fis3的eslint自动检测插件</title>
<link href="https://mewtwo-chi.github.io/2017/03/09/Essay/fis3-lint-noob-eslint/"/>
<id>https://mewtwo-chi.github.io/2017/03/09/Essay/fis3-lint-noob-eslint/</id>
<published>2017-03-09T05:45:00.000Z</published>
<updated>2017-05-16T15:55:46.000Z</updated>
<content type="html"><![CDATA[<p>##起因<br>团队发展到一定规模就需要有一个统一的标准去约束成员,统一编码风格。要完成这件事就需要先确定几个事:</p>
<ul>
<li>用什么样的编码规范</li>
<li>是自己定义一套还是基于开源标准</li>
<li>编码规范怎么在实际开发中执行</li>
</ul>
<h2 id="选择规范"><a href="#选择规范" class="headerlink" title="选择规范"></a>选择规范</h2><p>在团队中开了几次头脑风暴,也实际调研了下现有的编码规范。目前比较流向的两个规范:</p>
<ul>
<li>feross 的 standard 标准,目前在 github 上有1w多个star <a href="https://github.com/feross/standard" target="_blank" rel="external">github地址</a> <a href="https://standardjs.com/" target="_blank" rel="external">官网地址</a></li>
<li>airbnb 公司的 javascript 标准,目前在 github 上 star 已经突破5w <a href="https://github.com/airbnb/javascript" target="_blank" rel="external">github地址</a></li>
</ul>
<p>虽然 airbnb 公司的方案已有 5w 个 star,不过 standard 标准大有赶超的意思,所以最后选择了基于standard来做 js 规范。</p>
<h2 id="确定方案"><a href="#确定方案" class="headerlink" title="确定方案"></a>确定方案</h2><p>好了,现在确定了编码规范,剩下的就是怎么去落地标准。如果只是让每个人去学习标准并不能保证所有人都能严格的执行标准去写代码,所以最好的办法还是在开发阶段就发现问题,并且必须要解决了错误才能继续开发,这样就能保证大家都是一样的标准了。</p>
<p>由于团队使用的是百度的 <a href="http://fis.baidu.com/" target="_blank" rel="external">fis3</a> 作为构建工具,所以第一想法就是用 fis3+eslint 来检查代码。<br>于是就在 fis3 的插件列表中搜了下,找到几款基于 eslint 的 fis3 插件:</p>
<p><img src="http://op292cjvq.bkt.clouddn.com/fis3/eslint/DE834AC8-D396-47AF-A8C0-EC3BDD94B83D.png" alt="fis3 eslint" title="fis3 eslint"></p>
<p>但是美中不足的是这些插件大都是在终端中显示错误信息,而且错误信息的格式也不优雅:<br><img src="http://op292cjvq.bkt.clouddn.com/fis3/eslint/4DFC04BF-9DEE-4162-A31E-62EC731245FB.png" alt="fis3 eslint zsh" title="fis3 eslint zsh"></p>
<p>基于以上原因最终确定自己开发一款基于fis3,eslint和standard标准的插件。</p>
<h2 id="钩子"><a href="#钩子" class="headerlink" title="钩子"></a>钩子</h2>]]></content>
<summary type="html">
<p>##起因<br>团队发展到一定规模就需要有一个统一的标准去约束成员,统一编码风格。要完成这件事就需要先确定几个事:</p>
<ul>
<li>用什么样的编码规范</li>
<li>是自己定义一套还是基于开源标准</li>
<li>编码规范怎么在实际开发中执行</li>
</
</summary>
<category term="随笔" scheme="https://mewtwo-chi.github.io/categories/%E9%9A%8F%E7%AC%94/"/>
<category term="fis3" scheme="https://mewtwo-chi.github.io/tags/fis3/"/>
<category term="eslint" scheme="https://mewtwo-chi.github.io/tags/eslint/"/>
<category term="nodejs" scheme="https://mewtwo-chi.github.io/tags/nodejs/"/>
<category term="插件开发" scheme="https://mewtwo-chi.github.io/tags/%E6%8F%92%E4%BB%B6%E5%BC%80%E5%8F%91/"/>
</entry>
</feed>