Skip to content

Commit df30173

Browse files
author
Walker Leite
committed
feat(lint): update settings to airbnb - webpack template based
1 parent f4e2af3 commit df30173

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

template/.eslintrc.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint'
5+
},
6+
env: {
7+
browser: true,
8+
},
9+
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
10+
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
11+
extends: ['plugin:vue/recommended', 'airbnb-base', 'loopback'],
12+
// required to lint *.vue files
13+
plugins: [
14+
'vue'
15+
],
16+
parserOptions: {
17+
ecmaVersion: 6,
18+
sourceType: "module"
19+
},
20+
globals: {
21+
expect: true,
22+
assert: true,
23+
require: true,
24+
request: true
25+
},
26+
// add your custom rules here
27+
rules: {
28+
// don't require .vue extension when importing
29+
'import/extensions': ['error', 'always',
30+
{
31+
js: 'never',
32+
vue: 'never'
33+
}
34+
],
35+
// disallow reassignment of function parameters
36+
// disallow parameter object manipulation except for specific exclusions
37+
'no-param-reassign': ['error',
38+
{
39+
props: true,
40+
ignorePropertyModificationsFor: [
41+
'state', // for vuex state
42+
'acc', // for reduce accumulators
43+
'e' // for e.returnvalue
44+
]
45+
}
46+
],
47+
// allow debugger during development
48+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
49+
}
50+
}

0 commit comments

Comments
 (0)