Skip to content

Commit

Permalink
Improve the tasks (#54)
Browse files Browse the repository at this point in the history
Better consistency between the different tests
  • Loading branch information
damien-carcel authored Oct 1, 2023
2 parents ee6ba5c + b1aefec commit ce00106
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
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]

0 comments on commit ce00106

Please sign in to comment.