-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
80 lines (79 loc) · 2.29 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
72
73
74
75
76
77
78
79
80
/** @type {import('eslint').ESLint.ConfigData} */
const config = {
extends: ['./node_modules/gts', 'plugin:react-hooks/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
eqeqeq: ['error', 'always', {null: 'ignore'}],
},
overrides: [
{
files: [
'packages/script-utils/src/**/*',
'**/vite.config.*',
'**/scripts/**/*',
],
rules: {
'no-process-exit': 'off',
'node/no-unpublished-import': 'off',
},
},
{
files: ['**/*.html'],
plugins: ['@html-eslint'],
extends: ['plugin:@html-eslint/recommended'],
parser: '@html-eslint/parser',
rules: {
'@html-eslint/indent': ['error', 2],
'@html-eslint/lowercase': 'error',
'@html-eslint/no-extra-spacing-attrs': [
'error',
{enforceBeforeSelfClose: true},
],
'@html-eslint/no-inline-styles': 'error',
'@html-eslint/no-multiple-empty-lines': ['error', {max: 1}],
'@html-eslint/no-script-style-type': 'error',
'@html-eslint/no-target-blank': 'error',
'@html-eslint/no-trailing-spaces': 'error',
'@html-eslint/require-closing-tags': 'error',
'@html-eslint/require-meta-charset': 'error',
'@html-eslint/require-meta-viewport': 'error',
},
},
{
files: ['**/*.jsx', '**/*.tsx'],
rules: {
'jsx-quotes': ['error', 'prefer-double'],
},
},
{
files: ['**/*.json'],
extends: ['plugin:jsonc/recommended-with-jsonc'],
parser: 'jsonc-eslint-parser',
rules: {
'jsonc/array-bracket-newline': 'error',
'jsonc/array-bracket-spacing': 'error',
'jsonc/array-element-newline': 'error',
'jsonc/comma-dangle': 'error',
'jsonc/indent': ['error', 2],
'jsonc/key-spacing': 'error',
'jsonc/object-curly-newline': 'error',
'jsonc/object-curly-spacing': 'error',
'jsonc/object-property-newline': 'error',
},
},
{
files: ['**/*.md'],
extends: ['plugin:markdownlint/recommended'],
parser: 'eslint-plugin-markdownlint/parser',
},
{
files: ['**/*.yaml'],
extends: ['plugin:yml/standard'],
parser: 'yaml-eslint-parser',
},
],
};
module.exports = config;