|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 |
| -const isDev = process.env.NODE_ENV === 'development'; |
4 |
| - |
| 3 | +/** @type {import('eslint').Linter.Config} */ |
5 | 4 | module.exports = {
|
6 | 5 | 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', |
14 | 7 | 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'] |
91 | 9 | }
|
92 | 10 | };
|
0 commit comments