-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy patheslint.config.js
38 lines (37 loc) · 1.15 KB
/
eslint.config.js
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
// This is the main configuration file for ESLint. It is a JavaScript file that exports an ESLint configuration object.
// https://eslint.org/docs/user-guide/configuring
import pluginVue from 'eslint-plugin-vue'
import js from '@eslint/js'
import globals from 'globals'
import eslintConfigPrettier from 'eslint-config-prettier'
import { defineConfig } from 'eslint/config'
export default defineConfig([
...pluginVue.configs['flat/recommended'],
js.configs.recommended,
eslintConfigPrettier,
{
files: ['**/*.js,**/*.vue,**/*.cjs'],
// removed rules that seem to have no effect
rules: {},
},
{
ignores: ['dist/**/*.js', 'docs/**/*.js', 'documentation/**/*.js'],
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
// TODO: we are using vitest and there is a plugin e.g. it, expect, describe
...globals.jest,
// e.g. document, alert, window
...globals.browser,
// Global vitest and Cypress variables so they don't violate no-undef
vi: 'readonly',
cy: 'readonly',
Cypress: 'readonly',
},
},
},
])