chore: add ESLint + Prettier, fix all lint errors
- Install eslint, typescript-eslint, eslint-plugin-astro, prettier, prettier-plugin-astro, globals - Add flat eslint.config.mjs with recommended rules for JS, TS, Astro - Add .prettierrc with astro plugin - Add lint, lint:fix, format, format:check scripts - Fix prefer-const, no-unused-vars, no-useless-assignment across codebase - Fix AdBanner.astro JSX fragment for Prettier compatibility - Add eslint-disable around Yandex/Top.Mail.Ru inline scripts - Auto-format entire codebase with Prettier
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import astro from "eslint-plugin-astro";
|
||||
import globals from "globals";
|
||||
|
||||
export default [
|
||||
{ ignores: ["dist/**", ".astro/**", "node_modules/**", "src/env.d.ts"] },
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...astro.configs.recommended,
|
||||
{
|
||||
files: ["public/sw.js"],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.serviceworker,
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user