Skip to content

Commit 9abc9c3

Browse files
committed
Update eslint, stylelint rules, update @mdi/font ⬆️
1 parent 56f587a commit 9abc9c3

File tree

6 files changed

+9488
-29685
lines changed

6 files changed

+9488
-29685
lines changed

.eslintrc.js

+3-85
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,10 @@
11
'use strict';
22

3-
const isDev = process.env.NODE_ENV === 'development';
4-
3+
/** @type {import('eslint').Linter.Config} */
54
module.exports = {
65
root: true,
7-
// https://github.com/Flet/eslint-config-semistandard
8-
extends: [
9-
'semistandard',
10-
'plugin:vue/recommended'
11-
],
12-
// required to lint *.vue files
13-
plugins: ['vue'],
6+
extends: '@extensionengine',
147
rules: {
15-
indent: ['error', 2, {
16-
SwitchCase: 1,
17-
// NOTE: Consistent indentation IS enforced;
18-
// ESLint calculated indentation start IS NOT!
19-
// https://eslint.org/docs/rules/indent#memberexpression
20-
MemberExpression: 'off'
21-
}],
22-
'arrow-parens': ['error', 'as-needed'],
23-
// TODO: Remove this after all error reports get resolved!
24-
'prefer-const': 'off',
25-
'comma-dangle': ['warn', 'never'],
26-
'no-debugger': isDev ? 'warn' : 'error',
27-
'no-unreachable': isDev ? 'warn' : 'error',
28-
'space-before-function-paren': ['error', {
29-
anonymous: 'always',
30-
named: 'never'
31-
}],
32-
'sort-imports': ['error', {
33-
'ignoreCase': true
34-
}],
35-
// Vue rules
36-
'vue/html-self-closing': ['error', {
37-
html: {
38-
void: 'never',
39-
normal: 'never',
40-
component: 'always'
41-
},
42-
svg: 'never',
43-
math: 'never'
44-
}],
45-
'vue/html-closing-bracket-newline': ['error', {
46-
singleline: 'never',
47-
multiline: 'never'
48-
}],
49-
'vue/singleline-html-element-content-newline': 'off',
50-
'vue/max-attributes-per-line': ['error', {
51-
singleline: 5,
52-
multiline: 4
53-
}],
54-
'vue/name-property-casing': ['error', 'kebab-case'],
55-
// TODO: Add order for custom directives once supported
56-
'vue/attributes-order': ['error', {
57-
order: [
58-
'DEFINITION',
59-
'LIST_RENDERING',
60-
'CONDITIONALS',
61-
'RENDER_MODIFIERS',
62-
'UNIQUE',
63-
'TWO_WAY_BINDING',
64-
'OTHER_DIRECTIVES',
65-
'EVENTS',
66-
'GLOBAL',
67-
'OTHER_ATTR',
68-
'CONTENT'
69-
]
70-
}],
71-
'vue/order-in-components': ['error', {
72-
order: [
73-
'el',
74-
'name',
75-
['template', 'render', 'renderError'],
76-
['parent', 'functional', 'delimiters', 'comments'],
77-
'extends',
78-
'mixins',
79-
'inheritAttrs',
80-
'model',
81-
['props', 'propsData'],
82-
'data',
83-
'computed',
84-
'methods',
85-
'watch',
86-
'LIFECYCLE_HOOKS',
87-
['directives', 'filters'],
88-
'components'
89-
]
90-
}]
8+
'vue/component-definition-name-casing': ['error', 'kebab-case']
919
}
9210
};

babel.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
/** @type {import('@babel/core').TransformOptions} */
4+
module.exports = {
5+
presets: [
6+
'poi/babel'
7+
]
8+
};

client/common/api/request.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Object.defineProperty(client, 'base', {
4444
client.interceptors.request.use(config => {
4545
const { token } = client.auth;
4646
if (token) {
47-
config.headers['Authorization'] = [authScheme, token].join(' ');
47+
config.headers.Authorization = [authScheme, token].join(' ');
4848
return config;
4949
}
50-
delete config.headers['Authorization'];
50+
delete config.headers.Authorization;
5151
return config;
5252
});
5353

0 commit comments

Comments
 (0)