Browse Source

More eslint

* Lint before test
* Fix lint errors
better-aggressive
Oskar Segersvärd 9 years ago
parent
commit
c7843808a6
  1. 3
      .eslintrc
  2. 2
      package.json
  3. 4
      src/utils/defaults.js
  4. 2
      src/utils/first.js

3
.eslintrc

@ -16,6 +16,9 @@
"mocha": true,
"node": true
},
"globals": {
"Promise": false
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"modules": true

2
package.json

@ -8,7 +8,7 @@
"rollup": "./bin/rollup"
},
"scripts": {
"pretest": "npm run build",
"pretest": "eslint src/**/*.js && npm run build",
"test": "mocha",
"pretest-coverage": "npm run build",
"test-coverage": "rm -rf coverage/* && istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/test.js",

4
src/utils/defaults.js

@ -1,5 +1,5 @@
import { isFile, readFileSync } from './fs.js';
import { dirname, extname, isAbsolute, resolve } from './path.js';
import { dirname, isAbsolute, resolve } from './path.js';
export function load ( id ) {
return readFileSync( id, 'utf-8' );
@ -28,5 +28,5 @@ export function resolveId ( importee, importer ) {
}
export function onwarn ( msg ) {
console.error( msg );
console.error( msg ); //eslint-disable-line no-console
}

2
src/utils/first.js

@ -9,5 +9,5 @@ export default function first ( candidates ) {
result :
Promise.resolve( candidate( ...args ) ) );
}, Promise.resolve() );
}
};
}

Loading…
Cancel
Save