diff --git a/.eslintrc.yml b/.eslintrc.yml index 045ec9a0..2ddd59fa 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -61,9 +61,9 @@ rules: no-console: - error - allow: - - warn - - error - - info + - warn + - error + - info arrow-parens: - error - always @@ -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 diff --git a/.lintstagedrc.yml b/.lintstagedrc.yml index 1a52a295..7272cf7b 100644 --- a/.lintstagedrc.yml +++ b/.lintstagedrc.yml @@ -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 diff --git a/.prettierrc.yml b/.prettierrc.yml index 34d195ce..e5524cb7 100644 --- a/.prettierrc.yml +++ b/.prettierrc.yml @@ -8,6 +8,6 @@ trailingComma: all bracketSpacing: true arrowParens: always overrides: - - files: '*.html' + - files: '*.css' options: - printWidth: 9999 + singleQuote: false diff --git a/.stylelintrc.yml b/.stylelintrc.yml index a5d609a0..a57c0dfa 100644 --- a/.stylelintrc.yml +++ b/.stylelintrc.yml @@ -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 diff --git a/Makefile b/Makefile index 79aad137..cd4c5794 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/eleventy.config.cjs b/eleventy.config.cjs index daff59eb..f71eb4d0 100644 --- a/eleventy.config.cjs +++ b/eleventy.config.cjs @@ -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 } }, }) @@ -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 () => { diff --git a/source/styles/blocks/favorites.css b/source/styles/blocks/favorites.css index 14c5e980..07ee15e6 100644 --- a/source/styles/blocks/favorites.css +++ b/source/styles/blocks/favorites.css @@ -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% ) diff --git a/source/styles/blocks/header.css b/source/styles/blocks/header.css index d38a5d5d..f0e6a6e3 100644 --- a/source/styles/blocks/header.css +++ b/source/styles/blocks/header.css @@ -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; @@ -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 { @@ -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 { diff --git a/source/styles/globals/fonts.css b/source/styles/globals/fonts.css index 350e7886..242357aa 100644 --- a/source/styles/globals/fonts.css +++ b/source/styles/globals/fonts.css @@ -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 { @@ -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; }