From 2b988b9be950d60ea8acfa3771f115f7485dadf6 Mon Sep 17 00:00:00 2001 From: Kai Moschcau Date: Tue, 24 Mar 2026 17:20:35 +0100 Subject: [PATCH] build: update tooling configs and ignore files --- .prettierignore | 3 +++ .stylelintignore | 5 +++++ README.md | 6 +++--- eslint.config.mjs | 6 ++++++ package.json | 4 +++- 5 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..619be33 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +/.astro/ +/dist/ +/pnpm-lock.yaml diff --git a/.stylelintignore b/.stylelintignore index 1095cb2..0f9e2bd 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,7 +1,12 @@ # vim: filetype=gitignore + +/dist/ + *.ico *.json *.md *.mjs +*.png *.svg +*.webp *.yaml diff --git a/README.md b/README.md index 2da66e5..d26b89f 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,9 @@ Any static assets, like images, can be placed in the `public/` directory. All commands are run from the root of the project, from a terminal: -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `pnpm install` | Installs dependencies | +| Command | Action | +| :--------------------- | :----------------------------------------------- | +| `pnpm install` | Installs dependencies | | `pnpm dev` | Starts local dev server at `localhost:4321` | | `pnpm build` | Build your production site to `./dist/` | | `pnpm preview` | Preview your build locally, before deploying | diff --git a/eslint.config.mjs b/eslint.config.mjs index 0d7105f..ba18f98 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -5,17 +5,23 @@ import { defineConfig } from "eslint/config"; import jsxA11y from "eslint-plugin-jsx-a11y"; export default defineConfig([ + { + ignores: ["./dist/"], + }, + { files: ["**/*.{js,mjs}"], plugins: { js }, extends: ["js/recommended"], }, + { files: ["**/*.{astro,html}"], plugins: { "jsx-a11y": jsxA11y, }, }, + ...eslintPluginAstro.configs.recommended, eslintPluginPrettierRecommended, ]); diff --git a/package.json b/package.json index 81a2eff..7dceadb 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,10 @@ "build": "astro build", "preview": "astro preview", "astro": "astro", + "format": "prettier --write .", + "format:check": "prettier --check .", "lint:eslint": "eslint", - "lint:markuplint": "markuplint '**/*.{astro,html}'", + "lint:markuplint": "markuplint './{public,src}/**/*.{astro,html}'", "lint:stylelint": "stylelint .", "deploy": "astro build && scp -r dist/* vds:~/dockervolumes/kmoschcau_website/web/" },