-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.eslintrc.cjs
52 lines (52 loc) · 1.14 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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsonc/recommended-with-json',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
},
overrides: [
{
files: ["**/*.json", "**/*.json5", "**/*.jsonc"],
parser: "jsonc-eslint-parser",
},
],
plugins: ['react', 'vitest'],
settings: {
react: {
version: '16.13',
},
},
globals: {
APP_VERSION: true,
APP_ENVIRONMENT: true,
SENTRY_DSN: true,
__BACKEND_ENDPOINT__: true,
__GRAPHQL_ENDPOINT__: true,
__EXPORT_ENDPOINT__: true,
__PROCESS_ENDPOINT__: true,
__PANDOC_EXPORT_ENDPOINT__: true,
__HUMANID_REGISTER_ENDPOINT__: true
},
rules: {
'react/prop-types': ['warn'],
'no-unused-vars': ['warn'],
'jsonc/indent': ['error', 2],
// 'jsonc/sort-keys': ['warn'],
'jsonc/key-spacing': ['error'],
'jsonc/no-irregular-whitespace': ['error'],
'jsonc/object-curly-newline': ['error'],
'jsonc/object-property-newline': ['error']
},
}