-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.cjs
59 lines (58 loc) · 1.69 KB
/
.eslintrc.cjs
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
48
49
50
51
52
53
54
55
56
57
58
59
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
parserOptions: {
sourceType: 'module',
},
root: true,
ignorePatterns: ['node_modules', '.github', 'dist'],
plugins: ['simple-import-sort', 'mocha'],
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'plugin:cypress/recommended',
'plugin:prettier-vue/recommended',
],
env: {
node: true,
'vue/setup-compiler-macros': true,
},
rules: {
'no-var': 'error', // no var allowed, only let and const keywords
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'mocha/no-exclusive-tests': 'error', // Do not allow it.only() tests
eqeqeq: ['error', 'always'],
},
globals: {
VITE_ENVIRONMENT: true,
__APP_VERSION__: true,
defineModel: 'readonly',
},
overrides: [
{
files: ['tests/**/*.{js,ts,jsx,tsx}', 'src/**/__test__/**/*.spec.js'],
rules: {
'no-prototype-builtins': 'off',
},
},
{
files: ['*.md'],
excludedFiles: ['LICENSE.md'],
parser: 'eslint-plugin-markdownlint/parser',
extends: ['plugin:markdownlint/recommended'],
rules: {
'markdownlint/md013': 'off',
'markdownlint/md028': 'off',
'no-irregular-whitespace': 'off',
},
},
],
}