From bbf61cd6d53d1f477d538ffd49125b486a714e3c Mon Sep 17 00:00:00 2001 From: mifi Date: Fri, 13 Feb 2026 15:02:30 -0300 Subject: [PATCH] More linting --- .gitignore | 2 ++ eslint.config.js | 20 ++++++++++++++++++++ package.json | 18 +++++++++++++++--- src/assets/css/style.css | 18 +++++++++++++----- stylelint.config.js | 8 ++++++++ 5 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 eslint.config.js create mode 100644 stylelint.config.js diff --git a/.gitignore b/.gitignore index 048d79a..695c41a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ node_modules pnpm-lock.yaml +.eslintcache +.stylelintcache diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..cd5232d --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,20 @@ +import prettierConfig from 'eslint-config-prettier/flat' + +export default [ + { + files: ['src/**/*.js'], + languageOptions: { + ecmaVersion: 'latest', + sourceType: 'script', + globals: { + window: 'readonly', + document: 'readonly', + dataLayer: 'writable', + }, + }, + rules: { + 'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], + }, + }, + prettierConfig, +] diff --git a/package.json b/package.json index ee188d5..c51a18f 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,28 @@ { + "type": "module", "name": "mifi-holdings-landing", "version": "1.0.0", "packageManager": "pnpm@10.29.3", "scripts": { + "docker:build": "docker build --platform linux/amd64 -t git.mifi.dev/mifi-holdings/landing:latest .", + "docker:push": "docker push git.mifi.dev/mifi-holdings/landing:latest", "format": "prettier --write .", "format:check": "prettier --check .", - "lint": "yamllint .woodpecker/ci.yml .woodpecker/build.yml .woodpecker/deploy.yml docker-compose.yml", - "docker:build": "docker build --platform linux/amd64 -t git.mifi.dev/mifi-holdings/landing:latest .", - "docker:push": "docker push git.mifi.dev/mifi-holdings/landing:latest" + "lint": "pnpm run lint:yaml && pnpm run lint:js && pnpm run lint:css", + "lint:css": "stylelint \"src/**/*.css\"", + "lint:js": "eslint src/", + "lint:yaml": "yamllint .woodpecker/ci.yml .woodpecker/build.yml .woodpecker/deploy.yml docker-compose.yml", + "lint:fix": "pnpm run lint:fix:js && pnpm run lint:fix:css && pnpm run lint:fix:yaml", + "lint:fix:js": "eslint src/ --fix", + "lint:fix:css": "stylelint \"src/**/*.css\" --fix", + "lint:fix:yaml": "yamllint .woodpecker/ci.yml .woodpecker/build.yml .woodpecker/deploy.yml docker-compose.yml --fix" }, "devDependencies": { + "eslint": "^10.0.0", + "eslint-config-prettier": "^10.1.8", "prettier": "^3.4.2", + "stylelint": "^17.3.0", + "stylelint-config-standard": "^40.0.0", "yaml-lint": "^1.7.0" }, "repository": { diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 64e8c73..0858bb5 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -5,39 +5,45 @@ body { padding: 0; background: #121212; color: #f4f4f4; - font-family: 'Inter', Arial, sans-serif; + font-family: Inter, Arial, sans-serif; } + body { display: flex; align-items: center; justify-content: center; min-height: 100vh; } + .container { text-align: center; - background: rgba(34, 39, 44, 0.92); + background: rgb(34 39 44 / 92%); padding: 3rem 2rem; border-radius: 1.5rem; - box-shadow: 0 2px 24px 0 rgba(0, 0, 0, 0.13); + box-shadow: 0 2px 24px 0 rgb(0 0 0 / 13%); max-width: 400px; margin: 1rem; } + .emoji { font-size: 2.8rem; margin-bottom: 1rem; } + h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -1px; } + p { color: #babed8; margin-bottom: 1.7rem; font-size: 1.14rem; line-height: 1.55; } + .scram { display: inline-block; padding: 0.7rem 1.4rem; @@ -49,13 +55,15 @@ p { text-decoration: none; transition: background 0.2s; margin-top: 0.5rem; - box-shadow: 0 1px 4px 0 rgba(112, 255, 215, 0.1); + box-shadow: 0 1px 4px 0 rgb(112 255 215 / 10%); } + .scram:hover { background: #50bf9c; color: #fff; } -@media (max-width: 430px) { + +@media (width <= 430px) { .container { padding: 2rem 0.6rem; } diff --git a/stylelint.config.js b/stylelint.config.js new file mode 100644 index 0000000..bfff201 --- /dev/null +++ b/stylelint.config.js @@ -0,0 +1,8 @@ +export default { + extends: ['stylelint-config-standard'], + overrides: [ + { + files: ['src/**/*.css'], + }, + ], +}