-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
71 lines (70 loc) · 1.85 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
60
61
62
63
64
65
66
67
68
69
70
71
/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true,
"vue/setup-compiler-macros": true,
},
extends: [
"eslint:recommended",
"plugin:vue/vue3-recommended",
"@vue/eslint-config-typescript/recommended",
"plugin:cypress/recommended",
"prettier",
],
parserOptions: {
ecmaVersion: 13,
sourceType: "module",
},
plugins: ["vue"],
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"vue/multi-word-component-names": "off",
// prevents vars used in `<script setup>` from being reported as unused
// can be removed once https://github.com/vuejs/eslint-config-typescript/pull/42 is merged into eslint-config-typescript
"vue/script-setup-uses-vars": "error",
"vue/attribute-hyphenation": ["error", "never"],
"vue/v-on-event-hyphenation": ["error", "never"],
"vue/component-definition-name-casing": "off",
"vue/component-name-in-template-casing": [
"warn",
"PascalCase",
{
registeredComponentsOnly: false,
ignores: [
"component",
"client-only",
"keep-alive",
"router-link",
"router-view",
"teleport",
"a-scene",
"a-text",
"a-camera",
],
},
],
},
ignorePatterns: ["**/vendor/**/*.js", "**/public/**/*.js"],
globals: {
axios: true,
Echo: true,
L: true, // leaflet
},
overrides: [
// cypress should only be linted in cypress/
{
files: ["**/cypress/**/*.[jt]s"],
extends: ["plugin:cypress/recommended"],
},
// this keeps jest from linting cypress files
{
files: ["**/resources/**/*.[jt]s"],
extends: ["plugin:jest/recommended", "plugin:jest/style"],
},
],
};