File tree Expand file tree Collapse file tree 6 files changed +96
-1
lines changed
Expand file tree Collapse file tree 6 files changed +96
-1
lines changed File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+
2+ // ES6 代码规范练习场
3+
4+ // 为便于测试,关闭部分规则检测
5+ /* eslint no-unused-vars: 0 */
6+
7+ // [类型](#types)
8+ // 使用 let const 替代 var
9+ var type11 = 123
10+ var type2 = 'hello'
11+
12+ const type3 = 123
13+ let type4 = 123
14+ // type4 = 456
15+ const type5 = 'hello'
16+
17+ const type121 = [ 1 , 2 ]
18+ const type122 = type121
19+ type122 [ 0 ] = 9
20+
21+ console . log ( type122 [ 0 ] , type122 [ 0 ] )
22+
23+
24+ // [引用](#references)
25+
26+
27+ // [对象](#objects)
28+
29+
30+ // [数组](#arrays)
31+
32+
33+ // [解构](#destructuring)
34+
35+
36+ // [字符串](#strings)
37+
38+
39+ // [函数](#functions)
40+
41+
42+ // [箭头函数](#arrow-functions)
43+
44+
45+ // [类 & 构造函数](#classes--constructors)
46+
47+
48+ // [模块](#modules)
49+
50+
51+ // [Iterators and Generators](#iterators-and-generators)
52+
53+
54+ // [属性](#properties)
55+
56+
57+ // [变量](#variables)
58+
59+
60+ // [提升](#hoisting)
61+
62+
63+ // [比较运算符 & 等号](#comparison-operators--equality)
64+
65+
66+ // [代码块](#blocks)
67+
68+
69+ // [注释](#comments)
70+
71+
72+ // [空白](#whitespace)
73+
74+
75+ // [逗号](#commas)
76+
77+
78+ // [分号](#semicolons)
79+
80+
81+ // [类型转换](#type-casting--coercion)
82+
83+
84+ // [命名规则](#naming-conventions)
85+
86+
87+ // [存取器](#accessors)
88+
89+
90+ // [事件](#events)
91+
92+
93+ // [jQuery](#jquery)
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ NOTE: 本文对[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascr
3232# 安装依赖到全局,就不用每个项目单独安装了
3333# standard: npm install -g eslint-config-standard eslint-plugin-standard eslint-plugin-promise
3434# airbnb: npm install -g eslint eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y eslint-plugin-airbnb
35- # 推荐使用 airbnb,目前稍有改动,具体详见[.eslintrc](./.eslintrc)
35+ # 推荐使用 airbnb,目前稍有改动,具体详见
36+ # [es6 规则配置 .eslintrc](.eslintrc)
37+ # [es5 规则配置 .eslintrc](es5.eslintrc)
3638
3739# 测试配置效果,可以参看文档用例,使用 test.js 集中测试,可以保留用例
3840```
You can’t perform that action at this time.
0 commit comments