Skip to content

Commit

Permalink
chore(eslint): define eslint flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
j10ccc committed Oct 10, 2024
1 parent d983b6d commit 270a177
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import pluginVue from "eslint-plugin-vue";
import vueTsEslintConfig from "@vue/eslint-config-typescript";
import vueParser from "vue-eslint-parser";

export default [
...pluginVue.configs["flat/recommended"],
...vueTsEslintConfig(),
{
rules: {
indent: ["error", 2],
quotes: ["error", "double"],
camelcase: "warn",
semi: "error",
"no-trailing-spaces": "error",
"linebreak-style": ["error", "unix"],
"no-warning-comments": "warn",
"@typescript-eslint/no-explicit-any": "off"
},
},
{
files: ["**/*.vue"],
languageOptions: {
parser: vueParser
},
rules: {
"vue/multi-word-component-names": "off",
}
},
{
files: ["config/*.js"],
rules: {
"@typescript-eslint/no-require-imports": "off"
}
},
{
ignores: [
"dist/*",
".swc/*",
".github/*"
],
}
];

0 comments on commit 270a177

Please sign in to comment.