Created
January 15, 2023 18:14
-
-
Save jojojojojoj5564656465465/db752de71f456354c219bec29df15c1c to your computer and use it in GitHub Desktop.
astro & eslint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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