Skip to content

Commit

Permalink
env: add sweep-check script
Browse files Browse the repository at this point in the history
  • Loading branch information
identity16 committed Sep 29, 2023
1 parent c6ab461 commit c3c9cfa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx",
"test": "react-scripts test",
"eject": "react-scripts eject",
"depcruise": "depcruise src --include-only '^src' --config --metrics --output-type dot | dot -T svg | depcruise-wrap-stream-in-html > dependency-graph.html"
"depcruise": "depcruise src --include-only '^src' --config --metrics --output-type dot | dot -T svg | depcruise-wrap-stream-in-html > dependency-graph.html",
"sweep-check": "scripts/sweep-check.sh"
},
"eslintConfig": {
"extends": [
Expand Down
5 changes: 5 additions & 0 deletions scripts/sweep-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

if [[ $1 == *".ts" || $1 == *".tsx" ]]; then
eslint $1
tsc $1 --noEmit
fi
2 changes: 1 addition & 1 deletion sweep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sandbox:
- npm install -g yarn
- yarn install
check:
- yarn lint
- yarn sweep-check {file_path}

# This setting contains a list of rules that Sweep will check for. If any of these rules are broken in a new commit, Sweep will create an pull request to fix the broken rule.
rules:
Expand Down

0 comments on commit c3c9cfa

Please sign in to comment.