You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
484 B

const path = require( 'path' );
const assert = require( 'assert' );
module.exports = {
description: 'warns on missing (but unused) imports',
warnings: [
{
code: 'NON_EXISTENT_EXPORT',
message: `Non-existent export 'b' is imported from foo.js`,
pos: 12,
loc: {
file: path.resolve( __dirname, 'main.js' ),
line: 1,
column: 12
},
frame: `
1: import { a, b } from './foo.js';
^
2:
3: assert.equal( a, 42 );
`
}
]
};