Skip to content

Commit

Permalink
feat: re-introduce vue plugin
Browse files Browse the repository at this point in the history
Signed-off-by: diba1013 <diba1013@proton.me>
  • Loading branch information
diba1013 committed Jul 13, 2024
1 parent 79e2472 commit a9f19dd
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "^6.4.0",
"eslint-plugin-unicorn": "^54.0.0",
"eslint-plugin-vue": "^9.27.0",
"eslint-plugin-yml": "^1.14.0",
"globals": "^15.8.0",
"typescript-eslint": "8.0.0-alpha.41"
Expand Down
22 changes: 20 additions & 2 deletions packages/eslint-config/src/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import js from "@eslint/js";
import jsonc from "eslint-plugin-jsonc";
import perfectionist from "eslint-plugin-perfectionist";
import unicorn from "eslint-plugin-unicorn";
import vue from "eslint-plugin-vue";
import yml from "eslint-plugin-yml";
import globals from "globals";
import typescript from "typescript-eslint";
Expand Down Expand Up @@ -126,7 +127,7 @@ export function defineConfig({
// JavaScript
...defineCustomizedConfigurations({
customize: {
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.ts"],
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.ts", "**/*.vue"],
},
configurations: [
// Enable recommended eslint configuration
Expand Down Expand Up @@ -214,7 +215,7 @@ export function defineConfig({
// TypeScript
...defineCustomizedConfigurations({
customize: {
files: ["**/*.ts", "**/*.tsx"],
files: ["**/*.ts", "**/*.tsx", "**/*.vue"],
},
configurations: [
// Enable base typescript configuration
Expand All @@ -235,6 +236,23 @@ export function defineConfig({
},
},
}),
// Vue
...defineCustomizedConfigurations({
customize: {
files: ["**/*.vue"],
},
configurations: [
// Enable community crafted configuration
...vue.configs["flat/recommended"],
],
overwrite: {
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
},
}),
// Allow overwrites
...configs,
// Configure global ignores
Expand Down
59 changes: 56 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a9f19dd

Please sign in to comment.