Skip to content

Commit a357730

Browse files
committed
feat: update rules
1 parent e9a66e4 commit a357730

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# eslint-config-o2team-wx [![Build Status](https://travis-ci.org/o2team/eslint-config-o2team.svg?branch=master)](https://travis-ci.org/o2team/eslint-config-o2team)
2+
# eslint-config-o2team-wx [![Build Status](https://travis-ci.org/o2team/eslint-config-o2team-wx.svg?branch=master)](https://travis-ci.org/o2team/eslint-config-o2team-wx)
33

44
> ESLint [Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs.html) for WXAPP based on the O2Team Javascript Style Guide
55

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,14 @@ module.exports = {
2222
amd: false,
2323
mocha: false,
2424
jasmine: false
25+
},
26+
global: {
27+
App: false,
28+
Behavior: false,
29+
Component: false,
30+
Page: false,
31+
getApp: false,
32+
getCurrentPages: false,
33+
wx: false
2534
}
2635
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-o2team-wx",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "ESLint Shareable Config for WXAPP based on the O2Team Javascript Style Guide",
55
"main": "index.js",
66
"scripts": {

rules/style.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ module.exports = {
1616
'block-spacing': 'error',
1717

1818
// require brace style
19-
// 'brace-style': ['error', '1tbs', { allowSingleLine: true }],
20-
'brace-style': 'off',
19+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
2120

2221
// require camelcase
2322
'camelcase': ['error', { properties: 'never' }],
@@ -257,8 +256,7 @@ module.exports = {
257256
'require-jsdoc': 'off',
258257

259258
// require or disallow semicolons instead of ASI
260-
// 'semi': ['error', 'never'],
261-
'semi': 'off',
259+
'semi': ['error', 'never'],
262260

263261
// enforce spacing before and after semicolons
264262
'semi-spacing': ['error', { before: false, after: true }],

0 commit comments

Comments
 (0)