Skip to content

Commit 9b1fa35

Browse files
authored
Merge pull request #9176 from torchiaf/epinio/resolve-conflicts-with-master
[UI] merge `master` into `epinio-dev`
2 parents 3c3c860 + 525ab88 commit 9b1fa35

File tree

554 files changed

+3691
-1876
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

554 files changed

+3691
-1876
lines changed

.eslintrc.default.js

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
module.exports = {
2+
// root: true,
3+
env: {
4+
browser: true,
5+
node: true
6+
},
7+
globals: { NodeJS: true, Timer: true },
8+
plugins: ['jest', '@typescript-eslint'],
9+
extends: [
10+
'standard',
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'@vue/standard',
14+
'@vue/typescript/recommended',
15+
'plugin:vue/recommended',
16+
'plugin:cypress/recommended',
17+
],
18+
rules: {
19+
20+
// Styling
21+
'semi-spacing': 'off',
22+
'space-in-parens': 'off',
23+
'array-bracket-spacing': 'warn',
24+
'arrow-parens': 'warn',
25+
'arrow-spacing': ['warn', { before: true, after: true }],
26+
'block-spacing': ['warn', 'always'],
27+
'brace-style': ['warn', '1tbs'],
28+
'comma-dangle': ['warn', 'only-multiline'],
29+
'comma-spacing': 'warn',
30+
indent: ['warn', 2],
31+
'keyword-spacing': 'warn',
32+
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }],
33+
'no-trailing-spaces': 'warn',
34+
'func-call-spacing': ['warn', 'never'],
35+
'wrap-iife': 'off',
36+
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
37+
'multiline-ternary': ['warn', 'never'],
38+
'no-whitespace-before-property': 'warn',
39+
'object-curly-spacing': ['warn', 'always'],
40+
'object-property-newline': 'warn',
41+
'object-shorthand': 'warn',
42+
'padded-blocks': ['warn', 'never'],
43+
'quote-props': 'warn',
44+
'rest-spread-spacing': 'warn',
45+
semi: ['warn', 'always'],
46+
'space-before-function-paren': ['warn', 'never'],
47+
'space-infix-ops': 'warn',
48+
'spaced-comment': 'warn',
49+
'switch-colon-spacing': 'warn',
50+
'template-curly-spacing': ['warn', 'always'],
51+
'yield-star-spacing': ['warn', 'both'],
52+
'key-spacing': ['warn', {
53+
align: {
54+
beforeColon: false,
55+
afterColon: true,
56+
on: 'value',
57+
mode: 'strict'
58+
},
59+
multiLine: {
60+
beforeColon: false,
61+
afterColon: true
62+
},
63+
}],
64+
65+
'object-curly-newline': ['warn', {
66+
ObjectExpression: {
67+
multiline: true,
68+
minProperties: 3
69+
},
70+
ObjectPattern: {
71+
multiline: true,
72+
minProperties: 4
73+
},
74+
ImportDeclaration: {
75+
multiline: true,
76+
minProperties: 5
77+
},
78+
ExportDeclaration: {
79+
multiline: true,
80+
minProperties: 3
81+
}
82+
}],
83+
'padding-line-between-statements': [
84+
'warn',
85+
{
86+
blankLine: 'always',
87+
prev: '*',
88+
next: 'return',
89+
},
90+
{
91+
blankLine: 'always',
92+
prev: 'function',
93+
next: 'function',
94+
},
95+
// This configuration would require blank lines after every sequence of variable declarations
96+
{
97+
blankLine: 'always',
98+
prev: ['const', 'let', 'var'],
99+
next: '*'
100+
},
101+
{
102+
blankLine: 'any',
103+
prev: ['const', 'let', 'var'],
104+
next: ['const', 'let', 'var']
105+
}
106+
],
107+
quotes: [
108+
'warn',
109+
'single',
110+
{
111+
avoidEscape: true,
112+
allowTemplateLiterals: true
113+
},
114+
],
115+
'space-unary-ops': [
116+
'warn',
117+
{
118+
words: true,
119+
nonwords: false,
120+
}
121+
],
122+
},
123+
overrides: [
124+
// TS Exceptions
125+
{
126+
files: ['**/*.{js,ts,vue}'],
127+
rules: {
128+
// Errors
129+
'@typescript-eslint/no-empty-function': 'off', // Opinionated?
130+
'@typescript-eslint/ban-types': 'off', // This does not seems to work well with Vue2
131+
}
132+
},
133+
134+
// Tests exceptions due mocks
135+
{
136+
files: [
137+
'**/*.test.{js,ts}',
138+
'**/__tests__/**/*.{js,ts}'
139+
],
140+
rules: {
141+
'@typescript-eslint/no-empty-function': 'off',
142+
'@typescript-eslint/no-non-null-assertion': 'off',
143+
'@typescript-eslint/explicit-module-boundary-types': 'off',
144+
'jest/prefer-expect-assertions': 'off',
145+
},
146+
extends: ['plugin:jest/all']
147+
},
148+
149+
// bug?
150+
{
151+
files: ['**/*.{js,vue}'],
152+
rules: {
153+
// Warnings
154+
'@typescript-eslint/explicit-module-boundary-types': 'off',
155+
}
156+
},
157+
]
158+
};

0 commit comments

Comments
 (0)