mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
3 changed files with 23 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||||
|
var path = require( 'path' ); |
||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
var warned = false; |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'warns about use of eval', |
||||
|
options: { |
||||
|
onwarn: function ( message ) { |
||||
|
warned = true; |
||||
|
assert.ok( /Use of `eval` \(in .+?main\.js\) is discouraged, as it may cause issues with minification\. See https:\/\/github.com\/rollup\/rollup\/wiki\/Troubleshooting#avoiding-eval for more details/.test( message ) ); |
||||
|
} |
||||
|
}, |
||||
|
exports: function () { |
||||
|
assert.ok( warned, 'did not warn' ); |
||||
|
} |
||||
|
}; |
@ -0,0 +1 @@ |
|||||
|
var result = eval( '1 + 1' ); |
Loading…
Reference in new issue