forked from betagouv/aides-jeunes
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patheslint.config.js
More file actions
104 lines (89 loc) · 2.48 KB
/
eslint.config.js
File metadata and controls
104 lines (89 loc) · 2.48 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import { defineConfig, globalIgnores } from "eslint/config"
import globals from "globals"
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat"
import prettier from "eslint-plugin-prettier"
import vue from "eslint-plugin-vue"
import typescriptEslint from "@typescript-eslint/eslint-plugin"
import js from "@eslint/js"
import { FlatCompat } from "@eslint/eslintrc"
import { fileURLToPath } from "url"
import { dirname } from "path"
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})
export default defineConfig([
{
languageOptions: {
globals: {
...globals.node,
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
ecmaVersion: 2018,
sourceType: "module",
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
extends: fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:vue/vue3-essential",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
"plugin:vue/vue3-recommended",
"plugin:prettier-vue/recommended",
"prettier",
"plugin:import/recommended",
),
),
plugins: {
prettier,
vue: fixupPluginRules(vue),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
},
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/naming-convention": [
"warn",
{
selector: ["interface", "enum", "enumMember", "typeAlias"],
format: ["PascalCase"],
},
],
"@typescript-eslint/no-duplicate-enum-values": "warn",
"import/named": "off",
"import/no-unresolved": "off",
"no-irregular-whitespace": 0,
"vue/multi-word-component-names": "off",
"vue/no-v-html": "off",
"vue/require-default-prop": "off",
},
},
globalIgnores([
"**/contribuer",
"**/dist",
"**/dist-server",
"**/IndividuForm.vue",
"**/*.min.js",
"**/node_modules",
"test/integration",
"**/.tmp",
"**/tmp",
]),
{
files: ["**/__tests__/*.{j,t}s?(x)"],
languageOptions: {
globals: {
...globals.jest,
},
},
},
])