forked from drewjbartlett/vue-flickity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
131 lines (130 loc) · 3.48 KB
/
.eslintrc.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
const restrictedGlobals = require('eslint-restricted-globals')
.filter(name => name !== 'self');
module.exports = {
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
},
extends: ['airbnb-base', 'plugin:vue/recommended'],
globals: {
chrome: true,
it: true,
describe: true,
beforeAll: true,
beforeEach: true,
afterEach: true,
afterAll: true,
before: true,
after: true,
chai: true,
sinon: true,
expect: true,
jest: true,
test: true,
},
env: {
browser: true,
node: true,
},
rules: {
'no-restricted-globals': ['error'].concat(restrictedGlobals),
'no-underscore-dangle': 0,
'no-mixed-operators': 0,
'max-len': ['error', {
code: 120,
ignoreUrls: true,
ignoreStrings: true,
ignoreComments: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
ignorePattern: "trans\\(|transChoice\\("
}],
'arrow-parens': ['error', 'as-needed'],
'comma-dangle': ['error', 'always-multiline'],
indent: ['error', 2, { SwitchCase: 1 }],
'no-plusplus': 0,
curly: ['error', 'all'],
'no-return-assign': 0,
'prefer-destructuring': 0,
'import/extensions': 0,
'consistent-return': 0,
'operator-linebreak': [2, 'after', {"overrides": { "?": "before", ":": "before" }}],
'spaced-comment': 0,
'global-require': 0,
'dot-notation': [2, { allowPattern: '^[a-z]+(_[a-z]+)+$' }],
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'import/prefer-default-export': 0,
'space-before-function-paren': ['error', 'never'],
'no-param-reassign': ['error', { props: false }],
'class-methods-use-this': 0,
'no-restricted-syntax': ['error', 'WithStatement'],
'linebreak-style': process.env.NODE_ENV !== 'production' ? 'off' : ['error', 'unix'],
'no-debugger': 1,
'no-console': process.env.NODE_ENV !== 'production' ? 1 : 2,
'valid-jsdoc': [
'error',
{
prefer: { return: 'return' },
preferType: { Boolean: 'boolean', Function: 'function', Number: 'number', Object: 'object', String: 'string' },
requireReturn: false,
requireParamDescription: false,
requireReturnDescription: false,
},
],
'vue/max-attributes-per-line': 0,
'vue/require-default-prop': 0,
'vue/html-end-tags': 'error',
'vue/no-multi-spaces': 'error',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'vue/html-indent': [
'error',
2,
{
attribute: 1,
closeBracket: 0,
ignores: [],
},
],
'vue/attribute-hyphenation': ['error', 'always'],
'vue/order-in-components': [
'error',
{
order: [
'el',
'name',
'parent',
'functional',
['delimiters', 'comments'],
['components', 'directives', 'filters'],
'extends',
'mixins',
'inheritAttrs',
'model',
['props', 'propsData'],
'data',
'computed',
'watch',
'LIFECYCLE_HOOKS',
'methods',
['template', 'render'],
'renderError',
],
},
],
'vue/name-property-casing': ['error', 'kebab-case'],
'vue/require-prop-types': ['error'],
'vue/require-valid-default-prop': ['error'],
},
};