mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 17:27:22 +08:00
DISABLE_THIRD_PARTY_CHECK=Update node deps R=tvanderlippe@chromium.org Bug: chromium:1180760 Change-Id: Ieb4cbb72ea2537c742b7f97fa8458efb23f643e0 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2739611 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
eslint-plugin-mocha
ESLint rules for mocha.
Install and configure
This plugin requires ESLint 4.0.0 or later.
npm install --save-dev eslint-plugin-mocha
Then add a reference to this plugin and selected rules in your eslint config:
{
"plugins": [
"mocha"
]
}
Plugin Settings
This plugin supports the following settings, which are used by multiple rules:
additionalCustomNames: This allows rules to check additional function names when looking for suites or test cases. This might be used with a custom Mocha extension, such asember-mochaExample:
{
"rules": {
"mocha/no-skipped-tests": "error",
"mocha/no-exclusive-tests": "error"
},
"settings": {
"mocha/additionalCustomNames": [
{ "name": "describeModule", "type": "suite", "interfaces": [ "BDD" ] },
{ "name": "testModule", "type": "testCase", "interfaces": [ "TDD" ] }
]
}
}
Recommended config
This plugin exports a recommended config that enforces good practices.
Enable it with the extends option:
{
"extends": [
"plugin:mocha/recommended"
]
}
See Configuring Eslint on eslint.org for more info.
Rules documentation
The documentation of the rules can be found here.