Skip to content

Commit

Permalink
Merge pull request #50 from DavidTanner/prettier
Browse files Browse the repository at this point in the history
chore: use eslint and husky for styling
  • Loading branch information
DavidTanner authored Oct 18, 2023
2 parents f7c01d0 + f8cec18 commit f349ae0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": "airbnb-base",
"extends": [
"airbnb-base"
],
"rules": {
"func-names": "off",

Expand All @@ -26,7 +28,8 @@
"@typescript-eslint"
],
"extends": [
"plugin:@typescript-eslint/recommended-requiring-type-checking"
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"airbnb-typescript/base"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ test/results

src/**/*.d.ts
src/**/*.js
/.eslintcache
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"

npx lint-staged
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
"npm": ">=2.14.7"
},
"scripts": {
"lint": "eslint .",
"lint": "eslint . --cache",
"pretest": "npm run lint",
"test": "npx vitest run --coverage",
"prepublishOnly": "tsc -p tsconfig.build.json",
"clean": "tsc --build --clean; rm -rf tsconfig.build.tsbuildinfo tsconfig.tsbuildinfo"
"clean": "tsc --build --clean; rm -rf tsconfig.build.tsbuildinfo tsconfig.tsbuildinfo",
"prepare": "husky install"
},
"keywords": [
"credstash",
Expand All @@ -31,6 +32,7 @@
"url": "https://github.com/DavidTanner/nodecredstash.git"
},
"devDependencies": {
"@aws-sdk/util-dynamodb": "^3.137.0",
"@commitlint/cli": "^17.8.0",
"@commitlint/config-conventional": "^17.8.0",
"@types/debug": "^4.1.9",
Expand All @@ -41,14 +43,15 @@
"aws-sdk-client-mock": "^3.0.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
"eslint": "^8.51.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jest": "^27.4.2",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"lint-staged": "^15.0.1",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
Expand All @@ -57,5 +60,8 @@
"@aws-sdk/client-kms": "^3.137.0",
"@aws-sdk/lib-dynamodb": "^3.137.0",
"debug": "^4.3.4"
},
"lint-staged": {
"*.ts": "eslint --cache --fix"
}
}

0 comments on commit f349ae0

Please sign in to comment.