-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.eslintrc.cjs
100 lines (94 loc) · 2.34 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
module.exports = {
root: true,
ignorePatterns: [
'**/node_modules',
'**/build',
'**/builddir',
'**/dist',
'**/target',
'**/.yarn',
'**/project.packagespec.json',
],
overrides: [
{
// yml linter
files: ['*.yml'],
extends: ['plugin:yml/standard'],
parser: 'yaml-eslint-parser',
plugins: ['automation-custom'],
rules: {
'yml/plain-scalar': [
2,
'always',
{
// ignore path from ref, that must be quoted
ignorePatterns: ['[./#a-zA-Z0-9_]+'],
},
],
'yml/quotes': [
2,
{
prefer: 'single',
avoidEscape: true,
},
],
'yml/no-multiple-empty-lines': [
2,
{
max: 1,
maxEOF: 0,
maxBOF: 0,
},
],
'yml/require-string-key': 2,
},
overrides: [
{
files: ['specs/**/*.yml'],
rules: {
'automation-custom/end-with-dot': 'error',
'automation-custom/no-big-int': 'error',
'automation-custom/no-final-dot': 'error',
'automation-custom/single-quote-ref': 'error',
},
overrides: [
{
files: ['!specs/bundled/*.yml'],
rules: {
'automation-custom/out-of-line-all-of': 'error',
'automation-custom/out-of-line-any-of': 'error',
'automation-custom/out-of-line-enum': 'error',
'automation-custom/out-of-line-one-of': 'error',
'automation-custom/ref-common': 'error',
'automation-custom/valid-acl': 'error',
'automation-custom/valid-inline-title': 'error',
},
},
],
},
],
},
{
// actions yml linter
files: ['.github/**/*.yml'],
rules: {
'yml/no-empty-mapping-value': 0,
},
},
{
files: ['*.json'],
parserOptions: {
extraFileExtensions: ['.json'],
},
extends: ["plugin:json/recommended-legacy"]
},
{
files: ['templates/**/*.mustache'],
parser: 'eslint-plugin-automation-custom',
plugins: ['automation-custom'],
rules: {
'automation-custom/no-new-line': 'error',
},
},
],
};