Skip to content

Commit aee95f6

Browse files
committed
Install husky and lint-staged
1 parent 1ddc359 commit aee95f6

File tree

7 files changed

+1312
-17
lines changed

7 files changed

+1312
-17
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.lintstagedrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
'api/**/*': [
3+
() => 'npm run lint --prefix api',
4+
() => 'npm run format --prefix api',
5+
],
6+
'app/**/*': [
7+
() => 'npm run lint --prefix app',
8+
() => 'npm run format --prefix app',
9+
],
10+
};

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "es5",
3+
"singleQuote": true,
4+
"jsxSingleQuote": true
5+
}

api/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl<'a> Message<'a> {
1414

1515
#[get("/status")]
1616
async fn hello() -> impl Responder {
17-
web::Json(Message::new("Success!"))
17+
web::Json(Message::new("success!"))
1818
}
1919

2020
#[actix_web::main]

app/src/sagas/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function* mainSaga() {
2525
yield fork(allTakes);
2626
yield put(fetchApiStatusAction());
2727
yield put(incrementAction());
28-
yield put(incrementAction());
2928
}
3029

3130
export default mainSaga;

0 commit comments

Comments
 (0)