mirror of https://github.com/lukechilds/rollup.git
Browse Source
warn on missing unused imports in deshadowing phase, rather than throwinglegacy-quote-reserved-properties
Rich Harris
8 years ago
committed by
GitHub
4 changed files with 21 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
const path = require( 'path' ); |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
solo: true, |
|||
description: 'warns on missing (but unused) imports', |
|||
warnings: warnings => { |
|||
assert.deepEqual( warnings, [ |
|||
`Non-existent export 'b' is imported from ${path.resolve(__dirname, 'foo.js')} by ${path.resolve(__dirname, 'main.js')}` |
|||
]); |
|||
} |
|||
}; |
@ -0,0 +1 @@ |
|||
export var a = 42; |
@ -0,0 +1,3 @@ |
|||
import { a, b } from './foo.js'; |
|||
|
|||
assert.equal( a, 42 ); |
Loading…
Reference in new issue