Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8213afd

Browse files
lysz210XanderLuciano
authored andcommitted
add rule no-unused-expressions=off (SimulatedGREG#698)
* add rule no-unused-expressions=off * add eslint chai-friendly * add mocha to eslint env
1 parent 8cc768b commit 8213afd

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

template/.eslintrc.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
sourceType: 'module'
66
},
77
env: {
8+
mocha: process.env.NODE_ENV !== 'production',
89
browser: true,
910
node: true
1011
},
@@ -18,7 +19,8 @@ module.exports = {
1819
__static: true
1920
},
2021
plugins: [
21-
'html'
22+
'html',
23+
'chai-friendly'
2224
],
2325
'rules': {
2426
{{#if_eq eslintConfig 'standard'}}
@@ -38,5 +40,14 @@ module.exports = {
3840
{{/if_eq}}
3941
// allow debugger during development
4042
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
41-
}
43+
},
44+
overrides: [
45+
{
46+
"files": ["*-test.js", "*.spec.js"],
47+
"rules": {
48+
"no-unused-expressions": "off",
49+
'chai-friendly/no-unused-expressions': 'off',
50+
}
51+
}
52+
]
4253
}

template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"eslint": "^4.4.1",
109109
"eslint-friendly-formatter": "^3.0.0",
110110
"eslint-loader": "^1.9.0",
111+
"eslint-plugin-chai-friendly": "^0.4.1",
111112
"eslint-plugin-html": "^3.1.1",
112113
{{#if_eq eslintConfig 'standard'}}
113114
"eslint-config-standard": "^10.2.1",

0 commit comments

Comments
 (0)