Skip to content

Commit e18f651

Browse files
authored
Merge pull request #271 from MekDrop/codex/bump-eslint-to-10-1-0
Upgrade ESLint to v10 flat config setup
2 parents 67c3f6c + 91fb8b6 commit e18f651

6 files changed

Lines changed: 249 additions & 192 deletions

File tree

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint.config.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
const { FlatCompat } = require("@eslint/eslintrc");
2-
const js = require("@eslint/js");
3-
4-
const compat = new FlatCompat({
5-
baseDirectory: __dirname,
6-
recommendedConfig: js.configs.recommended,
7-
});
1+
const globals = require("globals");
2+
const prettier = require("eslint-config-prettier/flat");
3+
const vue = require("eslint-plugin-vue");
84

95
module.exports = [
106
{
@@ -15,37 +11,42 @@ module.exports = [
1511
".quasar/**",
1612
"node_modules/**",
1713
".eslintrc.js",
14+
".eslintrc.cjs",
1815
"quasar.config.*.temporary.compiled*",
1916
],
2017
},
21-
...compat.config({
22-
root: true,
23-
parserOptions: {
18+
{
19+
languageOptions: {
2420
ecmaVersion: 2021,
21+
sourceType: "module",
22+
globals: {
23+
...globals.browser,
24+
...globals.node,
25+
ga: "readonly",
26+
cordova: "readonly",
27+
__statics: "readonly",
28+
__QUASAR_SSR__: "readonly",
29+
__QUASAR_SSR_SERVER__: "readonly",
30+
__QUASAR_SSR_CLIENT__: "readonly",
31+
__QUASAR_SSR_PWA__: "readonly",
32+
process: "readonly",
33+
Capacitor: "readonly",
34+
chrome: "readonly",
35+
},
2536
},
26-
env: {
27-
node: true,
28-
browser: true,
29-
"vue/setup-compiler-macros": true,
30-
},
31-
extends: ["plugin:vue/vue3-essential", "prettier"],
32-
plugins: ["vue"],
33-
globals: {
34-
ga: "readonly",
35-
cordova: "readonly",
36-
__statics: "readonly",
37-
__QUASAR_SSR__: "readonly",
38-
__QUASAR_SSR_SERVER__: "readonly",
39-
__QUASAR_SSR_CLIENT__: "readonly",
40-
__QUASAR_SSR_PWA__: "readonly",
41-
process: "readonly",
42-
Capacitor: "readonly",
43-
chrome: "readonly",
37+
plugins: {
38+
vue,
4439
},
4540
rules: {
4641
"prefer-promise-reject-errors": "off",
4742
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
43+
},
44+
},
45+
...vue.configs["flat/essential"],
46+
prettier,
47+
{
48+
rules: {
4849
"vue/no-v-text-v-html-on-component": "off",
4950
},
50-
}),
51+
},
5152
];

0 commit comments

Comments
 (0)