Skip to content

Commit

Permalink
chore: add prettier lint wd-179
Browse files Browse the repository at this point in the history
  • Loading branch information
what1s1ove committed Nov 14, 2023
1 parent 5fb1291 commit ebbb67f
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 71 deletions.
10 changes: 5 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ rules:
no-console:
- error
- allow:
- warn
- error
- info
- warn
- error
- info
arrow-parens:
- error
- always
Expand All @@ -87,11 +87,11 @@ rules:

overrides:
- files:
- commitlint.config.js
- commitlint.config.js
rules:
import/no-default-export:
- off
- files:
- eleventy.config.cjs
- eleventy.config.cjs
env:
node: true
2 changes: 1 addition & 1 deletion .lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'*.{html,json,md}': prettier --write
'*.{json,md}': prettier --write
'*': make lint_editorconfig lint_fs
'*.css': make lint_css
'*.js': make lint_js
4 changes: 2 additions & 2 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ trailingComma: all
bracketSpacing: true
arrowParens: always
overrides:
- files: '*.html'
- files: '*.css'
options:
printWidth: 9999
singleQuote: false
10 changes: 5 additions & 5 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ plugins:
extends:
- stylelint-config-standard
rules:
selector-class-pattern: null
custom-property-pattern: null
color-hex-length: long
order/order:
selector-class-pattern: null
custom-property-pattern: null
color-hex-length: long
order/order:
- custom-properties
- declarations
order/properties-order:
order/properties-order:
- all
- position
- top
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@ start_server:
build: clean
npx eleventy

# Prettify

prettify:
npx prettier --write "**/*.{json,yml,css,js,cjs}"

# Lint

lint_fs:
npx ls-lint
lint_editorconfig:
npx editorconfig-checker
lint_prettify:
npx prettier --check "**/*.{json,yml,css,js,cjs}"
lint_html:
npx node-w3c-validator -i build/*.html -f lint -evH
lint_css:
npx stylelint "source/styles/**/*.css"
lint_js:
npx eslint --ext .js source/scripts
lint: lint_fs lint_editorconfig lint_html lint_css lint_js
lint: lint_fs lint_editorconfig lint_prettify lint_html lint_css lint_js
14 changes: 7 additions & 7 deletions eleventy.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ const init = (config) => {
),
})

return isDevelopment ? (
code +
`\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,${map.toString(
`base64`,
)}*/`
) : code
return isDevelopment
? code +
`\n/*# sourceMappingURL=data:application/json;charset=utf-8;base64,${map.toString(
`base64`,
)}*/`
: code
}
},
})
Expand Down Expand Up @@ -136,7 +136,7 @@ const init = (config) => {
await mkdir(`build/scripts`)
}

await fs.writeFile(`build/scripts/form.js`,formOutputFile.text)
await fs.writeFile(`build/scripts/form.js`, formOutputFile.text)
}

return async () => {
Expand Down
3 changes: 1 addition & 2 deletions source/styles/blocks/favorites.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
position: absolute;
content: "";
inset: 0;
background:
repeating-conic-gradient(
background: repeating-conic-gradient(
var(--color--secondary) 0% 25%,
var(--color--primary) 0% 50%
)
Expand Down
28 changes: 16 additions & 12 deletions source/styles/blocks/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,15 @@
margin: 0;
letter-spacing: 4px;
text-transform: uppercase;
background-image:
linear-gradient(
45deg,
#13a12f 0%,
#f5ff05 20%,
#1e32ff 40%,
#ff00fe 60%,
#02e853 80%,
#00d4ff 100%
);
background-image: linear-gradient(
45deg,
#13a12f 0%,
#f5ff05 20%,
#1e32ff 40%,
#ff00fe 60%,
#02e853 80%,
#00d4ff 100%
);
background-size: 1000% 1000%;
background-clip: text;
-webkit-text-fill-color: transparent;
Expand Down Expand Up @@ -130,7 +129,10 @@
height: 3px;
background-color: var(--color--secondary);
transform-origin: 50% 50%;
transition: top 0.3s 0.3s, transform 0.3s, background-color 500ms;
transition:
top 0.3s 0.3s,
transform 0.3s,
background-color 500ms;
}

.header__toggle-object::before {
Expand All @@ -144,7 +146,9 @@
.header--active .header__toggle-object::before,
.header--active .header__toggle-object::after {
top: 0;
transition: top 0.3s, transform 0.3s 0.5s;
transition:
top 0.3s,
transform 0.3s 0.5s;
}

.header--active .header__toggle-object::before {
Expand Down
42 changes: 6 additions & 36 deletions source/styles/globals/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,9 @@
font-style: normal;
font-display: swap;
src: url("../fonts/roboto-400.woff2") format("woff2");
unicode-range:
U+0000-00FF,
U+0131,
U+0152-0153,
U+02BB-02BC,
U+02C6,
U+02DA,
U+02DC,
U+2000-206F,
U+2074,
U+20AC,
U+2122,
U+2191,
U+2193,
U+2212,
U+2215,
U+FEFF,
U+FFFD;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}

@font-face {
Expand All @@ -30,22 +15,7 @@
font-style: normal;
font-display: swap;
src: url("../fonts/roboto-700.woff2") format("woff2");
unicode-range:
U+0000-00FF,
U+0131,
U+0152-0153,
U+02BB-02BC,
U+02C6,
U+02DA,
U+02DC,
U+2000-206F,
U+2074,
U+20AC,
U+2122,
U+2191,
U+2193,
U+2212,
U+2215,
U+FEFF,
U+FFFD;
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
}

0 comments on commit ebbb67f

Please sign in to comment.