Skip to content

Commit bdb2209

Browse files
author
teddylin
committed
-x
1 parent 4d40899 commit bdb2209

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintrc.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
root: true,
3+
globals: { wx: true },
4+
parser: 'babel-eslint',
5+
parserOptions: {
6+
sourceType: 'module'
7+
},
8+
env: {
9+
browser: true
10+
11+
},
12+
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
13+
extends: 'standard',
14+
// required to lint *.wpy files
15+
plugins: [
16+
'html'
17+
],
18+
settings: {
19+
'html/html-extensions': ['.html', '.wpy']
20+
},
21+
// add your custom rules here
22+
'rules': {
23+
// allow paren-less arrow functions
24+
'arrow-parens': 0,
25+
// allow async-await
26+
'generator-star-spacing': 0,
27+
// allow debugger during development
28+
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
29+
'space-before-function-paren': 0
30+
}
31+
}

0 commit comments

Comments
 (0)