Skip to content

Commit

Permalink
feat: configure prettier, eslint, husky and lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOricil committed Jan 31, 2024
1 parent b0e37b5 commit 494270d
Show file tree
Hide file tree
Showing 6 changed files with 4,093 additions and 1,439 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ["some-other-config-you-use", "prettier"],
parserOptions: {
ecmaVersion: "2015",
sourceType: "module",
},
};
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
coverage
node_modules
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"build": "rollup -c",
"start": "node dist/index.cjs",
"test": "jest --coverage",
"release": "semantic-release"
"release": "semantic-release",
"lint": "eslint .",
"format": "prettier --write \"**/*.{js,ts}\"",
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write \"**/*.{js,ts}\" --ignore-unknown"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
Expand All @@ -31,7 +37,12 @@
"@semantic-release/npm": "^11.0.2",
"@semantic-release/release-notes-generator": "^12.1.0",
"@types/jest": "^29.5.11",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"lint-staged": "^15.2.0",
"prettier": "3.2.4",
"rollup": "^4.9.6",
"semantic-release": "^17.4.7",
"ts-jest": "^29.1.2",
Expand Down
Loading

0 comments on commit 494270d

Please sign in to comment.