Skip to content

Commit

Permalink
Merge pull request #81 from bhima2001/add-husky
Browse files Browse the repository at this point in the history
Add husky
  • Loading branch information
BirushaNdegeya authored Sep 27, 2024
2 parents f92ec24 + ad3d656 commit 95f7327
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx lint-staged
2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npm run test
17 changes: 17 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


export default [
{files: ["**/*.{js,jsx,ts}"]},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error"
}
}
];
21 changes: 18 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,24 @@
"version": "1.0.0",
"description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\"",
"lint": "eslint"
},
"keywords": [],
"author": "Kali Academy",
"license": "MIT"
}
"license": "MIT",
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": "eslint"
},
"dependencies": {
"husky": "^9.1.6",
"lint-staged": "^15.2.10"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"eslint": "^9.11.1",
"globals": "^15.9.0",
"typescript-eslint": "^8.7.0"
}
}

0 comments on commit 95f7327

Please sign in to comment.