mirror of https://github.com/lukechilds/rollup.git
Browse Source
Introduce eslint to tests. Complaints are fixed, but none of them major.semi-dynamic-namespace-imports
Rich Harris
9 years ago
committed by
GitHub
38 changed files with 58 additions and 59 deletions
@ -0,0 +1,9 @@ |
|||||
|
{ |
||||
|
"rules": { |
||||
|
"no-console": [ 0 ], |
||||
|
"no-unused-vars": [ "error", { "vars": "all", "args": "none" } ] |
||||
|
}, |
||||
|
"env": { |
||||
|
"mocha": true |
||||
|
} |
||||
|
} |
@ -1,13 +1,13 @@ |
|||||
var os = require( 'os' ); |
var os = require( 'os' ); |
||||
|
|
||||
function toggleCase ( s ) { |
function toggleCase ( s ) { |
||||
return ( s == s.toLowerCase() ) ? s.toUpperCase() : s.toLowerCase(); |
return ( s == s.toLowerCase() ) ? s.toUpperCase() : s.toLowerCase(); |
||||
} |
} |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
skip: os.platform() !== 'win32', |
skip: os.platform() !== 'win32', |
||||
description: "can load config with cwd that doesn't match realpath", |
description: "can load config with cwd that doesn't match realpath", |
||||
command: 'rollup -c', |
command: 'rollup -c', |
||||
cwd: __dirname.replace( /^[A-Z]:\\/i, toggleCase ), |
cwd: __dirname.replace( /^[A-Z]:\\/i, toggleCase ), |
||||
execute: true |
execute: true |
||||
}; |
}; |
||||
|
@ -1,3 +1,3 @@ |
|||||
module.exports = { |
module.exports = { |
||||
description: 'consistent renaming test e' |
description: 'consistent renaming test e' |
||||
} |
}; |
@ -1,3 +1,3 @@ |
|||||
module.exports = { |
module.exports = { |
||||
description: '`delete` operator at the top level is preserved' |
description: '`delete` operator at the top level is preserved' |
||||
}; |
}; |
||||
|
@ -1,5 +1,3 @@ |
|||||
var assert = require( 'assert' ); |
|
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
description: 'allows export { x as y }' |
description: 'allows export { x as y }' |
||||
}; |
}; |
||||
|
@ -1,5 +1,3 @@ |
|||||
var assert = require('assert'); |
|
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
description: 'dynamic object assignments should be imported' |
description: 'dynamic object assignments should be imported' |
||||
}; |
}; |
||||
|
@ -1,9 +1,9 @@ |
|||||
var assert = require('assert'); |
var assert = require('assert'); |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
description: "namespace's 'default' properties should be available", |
description: "namespace's 'default' properties should be available", |
||||
|
|
||||
exports: function ( exports ) { |
exports: function ( exports ) { |
||||
assert.equal( exports, 42 ); |
assert.equal( exports, 42 ); |
||||
} |
} |
||||
}; |
}; |
||||
|
@ -1,9 +1,9 @@ |
|||||
var assert = require( 'assert' ); |
var assert = require( 'assert' ); |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
description: 'skips a dead conditional expression branch (g)', |
description: 'skips a dead conditional expression branch (g)', |
||||
code: function ( code ) { |
code: function ( code ) { |
||||
assert.ok( code.indexOf( 'var c = a;' ) >= 0, code ); |
assert.ok( code.indexOf( 'var c = a;' ) >= 0, code ); |
||||
assert.ok( code.indexOf( 'var d = b;' ) >= 0, code ); |
assert.ok( code.indexOf( 'var d = b;' ) >= 0, code ); |
||||
} |
} |
||||
}; |
}; |
||||
|
Loading…
Reference in new issue