From 965be1664e9efa8d1f565b482a5bfd2b0565a996 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Mon, 20 Feb 2023 16:55:11 +0100 Subject: [PATCH] fix(eslint): add configuration for inline script tags --- .eslintrc.json | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7e65b3c..ad89f12 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "browser": true }, "extends": ["eslint:recommended", "plugin:prettier/recommended", "plugin:astro/recommended"], - "plugins": ["prettier"], + "plugins": ["prettier", "astro"], "parserOptions": { "sourceType": "module" }, @@ -18,9 +18,26 @@ "parser": "astro-eslint-parser", "parserOptions": { "parser": "@typescript-eslint/parser", - "extraFileExtensions": [".astro"] + "extraFileExtensions": [".astro"], + "sourceType": "module" }, - "rules": {} + "rules": { + "astro/no-conflict-set-directives": "error", + "astro/no-unused-define-vars-in-style": "error" + } + }, + { + "files": ["**/*.astro/*.js", "*.astro/*.js"], + "env": { + "browser": true, + "es2020": true + }, + "parserOptions": { + "sourceType": "module" + }, + "rules": { + "prettier/prettier": "off" + } } ] }