Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the tasks #54

Merged
merged 2 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- ~/.cache/yarn
- run:
name: Lint the stylesheets
command: task tests:stylelint
command: task tests:stylelint:check
- run:
name: Check the code style
command: task tests:prettier
command: task tests:prettier:check
- run:
name: Lint the TS code
command: task tests:eslint
command: task tests:eslint:check
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
]
}
},
"name": "carcel.dev",
"initializeCommand": "./.devcontainer/setup.sh",
"name": "carcel.dev",
"postCreateCommand": "task dependencies:install",
"runServices": ["dev", "prod"],
"remoteUser": "node",
"service": "devcontainer",
Expand Down
44 changes: 25 additions & 19 deletions taskfiles/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
version: '3'

tasks:
prettier:
prettier:check:
desc: Check the code style.
cmds:
- yarn prettier --check
aliases: [p]
aliases: [p:c]

prettier-fix:
prettier:fix:
desc: Fix the code style.
cmds:
- yarn prettier --write
aliases: [pf]
aliases: [p:f]

stylelint:
stylelint:check:
desc: Lint the CSS code.
cmds:
- yarn stylelint
aliases: [s]
aliases: [s:c]

stylelint-fix:
stylelint:fix:
desc: Fix the CSS code style.
cmds:
- yarn stylelint --fix
aliases: [sf]
aliases: [s:f]

eslint:
eslint:check:
desc: Lint the TypeScript code.
cmds:
- yarn eslint
aliases: [l]
aliases: [l:c]

eslint:fix:
desc: Fix the JavaScript code issues.
cmds:
- yarn eslint --fix
aliases: [l:f]

all:
desc: Execute all the tests.
Expand All @@ -39,22 +45,22 @@ tasks:
- echo "| Check the code style |"
- echo "|----------------------|"
- echo ""
- task: prettier
- task: prettier:check
- echo ""
- echo "|----------------------|"
- echo "| Lint the stylesheets |"
- echo "|----------------------|"
- echo ""
- task: stylelint
- task: stylelint:check
- echo ""
- echo "|------------------|"
- echo "| Lint the TS code |"
- echo "|------------------|"
- echo "|----------------------|"
- echo "| Lint the TS code |"
- echo "|----------------------|"
- echo ""
- task: eslint
- task: eslint:check
- echo ""
- echo "|------------------------------------------------------------------------------|"
- echo "| All tests successful. You can run \"task run:down\" to stop the application. |"
- echo "|------------------------------------------------------------------------------|"
- echo "|----------------------|"
- echo "| All tests successful |"
- echo "|----------------------|"
- echo ""
aliases: [a]
Loading