-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
138 lines (129 loc) · 4.06 KB
/
index.js
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/**
* ESLint Configuration File
* http://eslint.org/docs/developer-guide/shareable-configs
*
* Plugins:
* eslint-plugin-strict-vue - https://github.com/GlebkaF/eslint-plugin-strict-vue
* eslint-plugin-import - https://github.com/benmosher/eslint-plugin-import
* eslint-plugin-jest - https://github.com/jest-community/eslint-plugin-jest
* eslint-plugin-prettier - https://github.com/prettier/eslint-plugin-prettier
* eslint-plugin-strict-vue - https://github.com/GlebkaF/eslint-plugin-strict-vue
* eslint-plugin-vue - https://github.com/vuejs/eslint-plugin-vue
* eslint-plugin-vuejs-accessibility - https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility
*
* Configurations:
* eslint-config-airbnb-base - https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base
* eslint-config-prettier - https://github.com/prettier/eslint-config-prettier
*/
module.exports = {
parserOptions: {
// https://github.com/babel/babel/tree/master/eslint/babel-eslint-parser
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
plugins: ['strict-vue', 'vuejs-accessibility'],
extends: [
'prettier',
'airbnb-base',
'plugin:vue/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:vuejs-accessibility/recommended',
],
rules: {
'linebreak-style': 'off',
camelcase: 'off',
'no-console': 'warn',
// Set indents to 4 spaces everywhere
indent: [
'warn',
4,
{
// https://github.com/babel/babel-eslint/issues/530
ignoredNodes: ['TemplateLiteral'],
},
],
// Max length set to 119 to match PEP8
'max-len': [
'warn',
{
code: 119,
ignorePattern: 'class=',
ignoreUrls: true,
},
],
'vue/html-closing-bracket-newline': [
'error',
{
singleline: 'never',
multiline: 'never',
},
],
'vue/html-indent': ['warn', 4],
'vue/html-closing-bracket-spacing': [
'error',
{
startTag: 'never',
endTag: 'never',
selfClosingTag: 'always',
},
],
'vue/max-attributes-per-line': [
'error',
{
singleline: {
max: 1,
},
multiline: {
max: 1,
},
},
],
'vue/singleline-html-element-content-newline': [
'error',
{
ignoreWhenNoAttributes: false,
ignoreWhenEmpty: true,
},
],
// Allow certain variables to be reassigned
'no-param-reassign': [
'error',
{
props: true,
ignorePropertyModificationsFor: [
'e', // for e.returnvalue
'state', // for vuex state
'ctx', // nuxt context,
'jestVue', // Jest Vue Object
],
},
],
// Allow certain scoped variables to be used multiple times
'no-shadow': [
'error',
{
allow: ['state', 'getters', 'actions', 'mutations'],
},
],
// Dont warn about dev dependencies for files not used production
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/storybook/*',
'**/mocks/*',
'**/helpers/*',
'**/*.spec.js',
'**/*.test.js',
'**/*.spec.js',
'**/*conf*.js',
'**/*build*.js',
'**/*report*.js',
'**/*.story.js',
],
},
],
'strict-vue/require-jsdoc': 'off',
},
};