feat: Prettier and stylelint in CI
This commit is contained in:
parent
e7e8e6b84b
commit
8393218622
5 changed files with 29 additions and 14 deletions
|
@ -52,6 +52,20 @@ credo:
|
||||||
- mix deps.get
|
- mix deps.get
|
||||||
- mix credo --all
|
- mix credo --all
|
||||||
|
|
||||||
|
stylelint:
|
||||||
|
stage: test
|
||||||
|
image: "node:16"
|
||||||
|
script:
|
||||||
|
- cd apps/app/assets/
|
||||||
|
- npx stylelint **/*.css
|
||||||
|
|
||||||
|
prettier:
|
||||||
|
stage: test
|
||||||
|
image: "node:16"
|
||||||
|
script:
|
||||||
|
- cd apps/app/assets/
|
||||||
|
- npx prettier --check **/*.js
|
||||||
|
|
||||||
build_image_for_commit:
|
build_image_for_commit:
|
||||||
stage: test
|
stage: test
|
||||||
image: "docker:20.10"
|
image: "docker:20.10"
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
node_modules
|
node_modules
|
||||||
|
css/phoenix.css
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
@import "tailwindcss/base";
|
@import "tailwindcss/base";
|
||||||
|
|
||||||
@import "tailwindcss/components";
|
@import "tailwindcss/components";
|
||||||
|
|
||||||
@import "tailwindcss/utilities";
|
@import "tailwindcss/utilities";
|
||||||
|
|
||||||
@import "@fortawesome/fontawesome-free/css/all.css";
|
@import "@fortawesome/fontawesome-free/css/all.css";
|
||||||
|
|
||||||
@import "blog";
|
@import "blog";
|
||||||
@import "code";
|
@import "code";
|
||||||
|
|
||||||
|
@ -14,13 +10,13 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"]::after {
|
input[type="checkbox"]::after {
|
||||||
content: "";
|
display: inline-flex;
|
||||||
color: currentColor;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: inline-flex;
|
color: currentColor;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="checkbox"]:checked::after {
|
input[type="checkbox"]:checked::after {
|
||||||
|
@ -33,8 +29,9 @@ input[type="checkbox"]:checked::after {
|
||||||
|
|
||||||
.password-revealer {
|
.password-revealer {
|
||||||
@apply absolute;
|
@apply absolute;
|
||||||
height: 45px;
|
|
||||||
width: 45px;
|
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
.hljs {
|
.hljs {
|
||||||
@apply mt-6 mb-12 border-l-4 border-indigo-900 font-mono;
|
@apply mt-6 mb-12 border-l-4 border-indigo-900 font-mono;
|
||||||
--background-color: theme("colors.indigo.100");
|
--background-color: theme("colors.indigo.100"); /* stylelint-disable-line custom-property-empty-line-before */
|
||||||
--attribute-color: theme("colors.orange.700");
|
--attribute-color: theme("colors.orange.700");
|
||||||
--section-color: theme("colors.teal.700");
|
--section-color: theme("colors.teal.700");
|
||||||
--string-color: theme("colors.green.700");
|
--string-color: theme("colors.green.700");
|
||||||
|
|
|
@ -4,7 +4,10 @@ pre-commit:
|
||||||
credo:
|
credo:
|
||||||
runner: mix credo diff master
|
runner: mix credo diff master
|
||||||
stylelint:
|
stylelint:
|
||||||
|
root: "apps/app/assets/"
|
||||||
glob: "*.{css}"
|
glob: "*.{css}"
|
||||||
runner: (cd apps/app/assets/; npx stylelint {staged_files})
|
runner: npx stylelint {staged_files}
|
||||||
prettier:
|
prettier:
|
||||||
runner: (cd apps/app/assets/; npx prettier --check **/*.js)
|
root: "apps/app/assets/"
|
||||||
|
glob: "*.{js}"
|
||||||
|
runner: npx prettier --check {staged_files}
|
||||||
|
|
Loading…
Reference in a new issue