aboutsummaryrefslogtreecommitdiff
path: root/eslint.config.mjs
blob: 67179876331c1e93e125b347e6340d2608bc2ac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginVue from "eslint-plugin-vue";

/** @type {import('eslint').Linter.Config[]} */
export default [
    pluginJs.configs.recommended,
    ...tseslint.configs.recommended,
    ...pluginVue.configs["flat/essential"],
    {
        languageOptions: {
            globals: {
                ...globals.browser,
                ...globals.node,
                "STUDIP": "writable",
                "CKEDITOR": "writable",
                "$": "writable",
                "_": "writable",
                "jQuery": "writable"
            }
        },
        files: ["resources/**/*.{js,mjs,cjs,ts,vue}"],
        ignores: [
            'resources/assets/javascripts/jquery/autoresize.jquery.min.js',
            'resources/assets/javascripts/jquery/jstree/jquery.jstree.js',
            'resources/assets/javascripts/vendor'
        ]
    },
    {
        files: ["**/*.vue"],
        languageOptions: {
            parserOptions: {
                parser: tseslint.parser
            }
        }
    },
    {
        rules: {
            "@typescript-eslint/no-require-imports": "off",
            "vue/html-indent": "off",
            "vue/multi-word-component-names": "off",
            "vue/no-deprecated-destroyed-lifecycle": "off",
            "indent": "off"
        }
    }
];