Skip to content

Commit f972b69

Browse files
authored
Merge pull request #132 from pablonete/add-no-only-tests
Add no-only-tests JS linter rule to detect test.only and suite.only
2 parents fd86832 + fd8d5fb commit f972b69

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

lib/configs/recommended.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
env: {
99
es6: true
1010
},
11-
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text'],
11+
plugins: ['github', 'prettier', 'eslint-comments', 'import', 'filenames', 'i18n-text', 'no-only-tests'],
1212
rules: {
1313
'constructor-super': 'error',
1414
'eslint-comments/disable-enable-pair': 'off',
@@ -85,6 +85,12 @@ module.exports = {
8585
'no-new-symbol': 'error',
8686
'no-obj-calls': 'error',
8787
'no-octal': 'error',
88+
'no-only-tests/no-only-tests': [
89+
'error',
90+
{
91+
block: ['describe', 'it', 'context', 'test', 'tape', 'fixture', 'serial', 'suite']
92+
}
93+
],
8894
'no-redeclare': 'error',
8995
'no-regex-spaces': 'error',
9096
'no-return-assign': 'error',

package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"eslint-plugin-filenames": "^1.3.2",
3333
"eslint-plugin-i18n-text": "^1.0.1",
3434
"eslint-plugin-import": "^2.22.1",
35+
"eslint-plugin-no-only-tests": "^2.6.0",
3536
"eslint-plugin-prettier": "^3.3.1",
3637
"eslint-rule-documentation": ">=1.0.0",
3738
"prettier": "^2.2.1",

0 commit comments

Comments
 (0)