Skip to content

Instantly share code, notes, and snippets.

@jojojojojoj5564656465465
Created January 15, 2023 18:14
Show Gist options
  • Save jojojojojoj5564656465465/db752de71f456354c219bec29df15c1c to your computer and use it in GitHub Desktop.
Save jojojojojoj5564656465465/db752de71f456354c219bec29df15c1c to your computer and use it in GitHub Desktop.
astro & eslint
module.exports = {
// ...
extends: [
// ...
'plugin:astro/recommended',
'@tinkoff/eslint-config/app',
],
// ...P
overrides: [
{
// Define the configuration for `.astro` file.
files: ['*.astro'],
// Allows Astro components to be parsed.
parser: 'astro-eslint-parser',
// Parse the script in `.astro` as TypeScript by adding the following configuration.
// It's the setting you need when using TypeScript.
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro'],
},
rules: {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
},
},
// ...
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment