Skip to content

Commit

Permalink
chore: fix lint, ensure it runs before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jun 6, 2024
1 parent 8094d0d commit 50df940
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function getMajor() {
return Number(svelte.VERSION.split('.')[0]);
}

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

module.exports = function(source, map) {
this.cacheable();
Expand Down Expand Up @@ -176,7 +176,7 @@ module.exports = function(source, map) {
// context when logging to console
let err_str = err.toString();
if (getMajor() < 5 || !err_str.startsWith('CompileError:')) {
err_str = `${err.name}: ${err_str}`
err_str = `${err.name}: ${err_str}`;
}
callback(new Error(err_str));
});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"all": "npm run lint && npm run test",
"test": "mocha --harmony --full-trace --check-leaks",
"lint": "eslint index.js lib/*.js test/**/*.js"
"lint": "eslint index.js lib/*.js test/**/*.js",
"prepublishOnly": "npm run all"
},
"keywords": [
"svelte",
Expand Down

0 comments on commit 50df940

Please sign in to comment.