Last active
October 29, 2023 02:42
-
-
Save euxn23/a943090c57e53672078d365bfdbd230e to your computer and use it in GitHub Desktop.
eslint for vue
This file contains hidden or 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
| import typescriptParser from "@typescript-eslint/parser" | |
| import typescriptPlugin from "@typescript-eslint/eslint-plugin" | |
| import vueParser from 'vue-eslint-parser' | |
| import vuePlugin from 'eslint-plugin-vue' | |
| export default [ | |
| { | |
| files: ["src/**/*.{ts,vue}"], | |
| languageOptions: { | |
| parser: vueParser, | |
| parserOptions: { | |
| parser: typescriptParser, | |
| ecmaVersion: 2020, | |
| sourceType: "module", | |
| project: "./tsconfig.json", | |
| extraFileExtensions: ['.vue'] | |
| }, | |
| }, | |
| plugins: { | |
| "@typescript-eslint": typescriptPlugin, | |
| vue: vuePlugin, | |
| }, | |
| rules: { | |
| ...typescriptPlugin.configs["recommended"].rules, | |
| ...typescriptPlugin.configs["eslint-recommended"].rules, | |
| ...vuePlugin.configs["recommended"].rules, | |
| }, | |
| }, | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment