Skip to content

Commit 50df940

Browse files
committed
chore: fix lint, ensure it runs before publishing
1 parent 8094d0d commit 50df940

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function getMajor() {
6363
return Number(svelte.VERSION.split('.')[0]);
6464
}
6565

66-
const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/
66+
const svelte_module_regex = /\.svelte(\.[^./\\]+)*\.(js|ts)$/;
6767

6868
module.exports = function(source, map) {
6969
this.cacheable();
@@ -176,7 +176,7 @@ module.exports = function(source, map) {
176176
// context when logging to console
177177
let err_str = err.toString();
178178
if (getMajor() < 5 || !err_str.startsWith('CompileError:')) {
179-
err_str = `${err.name}: ${err_str}`
179+
err_str = `${err.name}: ${err_str}`;
180180
}
181181
callback(new Error(err_str));
182182
});

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"scripts": {
88
"all": "npm run lint && npm run test",
99
"test": "mocha --harmony --full-trace --check-leaks",
10-
"lint": "eslint index.js lib/*.js test/**/*.js"
10+
"lint": "eslint index.js lib/*.js test/**/*.js",
11+
"prepublishOnly": "npm run all"
1112
},
1213
"keywords": [
1314
"svelte",

0 commit comments

Comments
 (0)