Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 5eb9fd9

Browse files
feat: raise some rules to error level 🔥
BREAKING CHANGE:
1 parent f8d927c commit 5eb9fd9

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

‎environments/mocha/recommended.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ module.exports = {
2828
// Mocha allows you to write asynchronous tests by adding a done callback to the parameters of
2929
// your test function. It is easy to forget calling this callback after the asynchronous
3030
// operation is done.
31-
// @TODO (semver-major): Raise to `error`
32-
'mocha/handle-done-callback': 'warn',
31+
'mocha/handle-done-callback': 'error',
3332

3433
// Limit the number of top-level suites in a single file
3534
// This rule enforces having a limited amount of top-level suites in a file.
@@ -52,16 +51,14 @@ module.exports = {
5251
// Disallow tests to be nested within other tests
5352
// This rule looks for all test cases (it, specify and test) or suites (describe, context and
5453
// suite) which are nested within another test case.
55-
// @TODO (semver-major): Raise to `error`
56-
'mocha/no-nested-tests': 'warn',
54+
'mocha/no-nested-tests': 'error',
5755

5856
// Disallow returning in a test or hook function that uses a callback
5957
// Mocha's tests or hooks (like before) may be asynchronous by either returning a Promise or
6058
// specifying a callback parameter for the function. It can be confusing to have both methods
6159
// used in a test or hook, and from Mocha v3 on, causes the test to fail in order to force
6260
// developers to remove this source of confusion.
63-
// @TODO (semver-major): Raise to `error`
64-
'mocha/no-return-and-callback': 'warn',
61+
'mocha/no-return-and-callback': 'error',
6562

6663
// Disallow setup in describe blocks
6764
// Any setup directly in a describe is run before all tests execute. This rule reports all

‎environments/shared/recommended.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,7 @@ module.exports = {
582582
// The u flag disables the recovering logic Annex B defined. As a result, you can find errors
583583
// early. This is similar to the strict mode. Therefore, the u flag lets us work better with
584584
// regular expressions.
585-
// @TODO (semver-major): Raise to `error`
586-
'require-unicode-regexp': 'warn',
585+
'require-unicode-regexp': 'error',
587586

588587
// Disallow generator functions that do not have yield
589588
'require-yield': 'error',

0 commit comments

Comments
 (0)