|
| 1 | +import globals from "globals"; |
| 2 | +import pluginJs from "@eslint/js"; |
| 3 | +import tseslint from "typescript-eslint"; |
| 4 | +import pluginVue from "eslint-plugin-vue"; |
| 5 | +import pluginPromise from "eslint-plugin-promise"; |
| 6 | +import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; |
| 7 | + |
| 8 | +export default tseslint.config( |
| 9 | + { |
| 10 | + ignores: ["node_modules/**", "dist/**", "public/js/app.constants.js", "public/mockServiceWorker.js"], |
| 11 | + }, |
| 12 | + { |
| 13 | + files: ["**/*.{js,mjs,ts,vue}"], |
| 14 | + languageOptions: { globals: globals.browser, ecmaVersion: "latest", parserOptions: { parser: tseslint.parser } }, |
| 15 | + extends: [pluginJs.configs.recommended, ...tseslint.configs.recommended, ...pluginVue.configs["flat/essential"], pluginPromise.configs["flat/recommended"], eslintPluginPrettierRecommended], |
| 16 | + rules: { |
| 17 | + "no-duplicate-imports": "error", |
| 18 | + "promise/prefer-await-to-then": "error", |
| 19 | + "require-await": "error", |
| 20 | + "no-await-in-loop": "warn", |
| 21 | + "prefer-rest-params": "error", |
| 22 | + "prefer-spread": "error", |
| 23 | + "no-var": "error", |
| 24 | + "prefer-const": "error", |
| 25 | + eqeqeq: ["error", "smart"], |
| 26 | + "no-throw-literal": "warn", |
| 27 | + }, |
| 28 | + } |
| 29 | +); |
0 commit comments