File tree 4 files changed +7
-5
lines changed
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ module.exports = async function ({
36
36
if ( ! [ 'bundle' , 'cjs' , 'esm' ] . includes ( format ) ) throw TypeError ( 'Incorrect output type' ) ;
37
37
summary = { comment : normalizeSummary ( summary . comment ) , console : normalizeSummary ( summary . console ) } ;
38
38
39
- const TITLE = filename != null ? filename : '`core-js`' ;
39
+ const TITLE = filename !== null || filename !== undefined ? filename : '`core-js`' ;
40
40
let script = banner ;
41
41
let code = '\n' ;
42
42
@@ -95,7 +95,7 @@ module.exports = async function ({
95
95
} else console . log ( '\u001B[36mnothing\u001B[0m' ) ;
96
96
}
97
97
98
- if ( filename != null ) {
98
+ if ( ! ( filename === null || filename === undefined ) ) {
99
99
await mkdirp ( dirname ( filename ) ) ;
100
100
await writeFile ( filename , script ) ;
101
101
}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ module.exports = function ({
56
56
version = null ,
57
57
inverse = false ,
58
58
} = { } ) {
59
- if ( modules == null ) modules = filter ;
59
+ if ( modules === null || modules === undefined ) modules = filter ;
60
60
inverse = ! ! inverse ;
61
61
62
62
const parsedTargets = targets ? targetsParser ( targets ) : null ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ var $RegExp = global.RegExp;
8
8
var UNSUPPORTED_Y = fails ( function ( ) {
9
9
var re = $RegExp ( 'a' , 'y' ) ;
10
10
re . lastIndex = 2 ;
11
- return re . exec ( 'abcd' ) != null ;
11
+ return re . exec ( 'abcd' ) !== null ;
12
12
} ) ;
13
13
14
14
// UC Browser bug
@@ -21,7 +21,7 @@ var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
21
21
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
22
22
var re = $RegExp ( '^r' , 'gy' ) ;
23
23
re . lastIndex = 2 ;
24
- return re . exec ( 'str' ) != null ;
24
+ return re . exec ( 'str' ) !== null ;
25
25
} ) ;
26
26
27
27
module . exports = {
Original file line number Diff line number Diff line change @@ -154,6 +154,8 @@ const base = {
154
154
'no-empty-function' : ERROR ,
155
155
// disallow empty static blocks
156
156
'no-empty-static-block' : ERROR ,
157
+ // disallow `null` comparisons without type-checking operators
158
+ 'no-eq-null' : ERROR ,
157
159
// disallow use of eval()
158
160
'no-eval' : ERROR ,
159
161
// disallow adding to native types
You can’t perform that action at this time.
0 commit comments