72 lines
1.6 KiB
JavaScript
72 lines
1.6 KiB
JavaScript
import js from "@eslint/js";
|
|
import pluginVue from "eslint-plugin-vue";
|
|
import vueTsEslintConfig from "@vue/eslint-config-typescript";
|
|
import vueParser from "vue-eslint-parser";
|
|
import tsParser from "@typescript-eslint/parser";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
{
|
|
ignores: [
|
|
"webpack.mix.js",
|
|
"**/*.php",
|
|
"**/*.svg",
|
|
"**/vendor/*.js",
|
|
"**/vendor/**/*.js",
|
|
"**/vendor/**/*.scss",
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...pluginVue.configs["flat/strongly-recommended"],
|
|
...vueTsEslintConfig(),
|
|
{
|
|
languageOptions: {
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
parser: vueParser,
|
|
parserOptions: {
|
|
parser: tsParser,
|
|
ecmaVersion: "latest",
|
|
sourceType: "module",
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.es2021,
|
|
},
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
node: {
|
|
extensions: [".js", ".vue", ".ts", ".d.ts"],
|
|
},
|
|
alias: {
|
|
extensions: [".vue", ".js", ".ts", ".scss", ".d.ts"],
|
|
map: [
|
|
["~", "./resources/assets"],
|
|
["@", "./node_modules"],
|
|
],
|
|
},
|
|
},
|
|
},
|
|
rules: {
|
|
indent: ["error", 4, { SwitchCase: 1 }],
|
|
"linebreak-style": ["error", "unix"],
|
|
quotes: ["error", "double"],
|
|
semi: ["error", "always"],
|
|
"vue/script-indent": ["error", 2, { baseIndent: 0, switchCase: 1 }],
|
|
"vue/one-component-per-file": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.ts", "**/*.vue"],
|
|
rules: {
|
|
"no-undef": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.vue"],
|
|
rules: {
|
|
indent: "off",
|
|
},
|
|
},
|
|
];
|