1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | const ignoreMethods = [
|
7 |
|
8 | 'render',
|
9 | 'renderError',
|
10 | 'export',
|
11 |
|
12 | 'beforeCreate',
|
13 | 'created',
|
14 | 'beforeMount',
|
15 | 'mounted',
|
16 | 'beforeUpdate',
|
17 | 'updated',
|
18 | 'activated',
|
19 | 'deactivated',
|
20 | 'beforeDestroy',
|
21 | 'destroyed',
|
22 |
|
23 | 'computed',
|
24 | 'components',
|
25 | 'mixins',
|
26 |
|
27 | 'bind',
|
28 | 'unbind',
|
29 |
|
30 | '$route',
|
31 | 'beforeRouteEnter',
|
32 | 'beforeRouteUpdate',
|
33 | 'beforeRouteLeave',
|
34 | ]
|
35 |
|
36 | module.exports = {
|
37 | root: true,
|
38 | env: {
|
39 |
|
40 | browser: true,
|
41 | node: true,
|
42 | es6: true,
|
43 | mocha: true
|
44 | },
|
45 |
|
46 | parser: 'babel-eslint',
|
47 | parserOptions: {
|
48 |
|
49 | ecmaVersion: 6,
|
50 | sourceType: 'module',
|
51 |
|
52 | ecmaFeatures: {
|
53 | experimentalObjectRestSpread: true,
|
54 | }
|
55 | },
|
56 | extends: 'standard',
|
57 | plugins: [
|
58 | 'html',
|
59 | 'import',
|
60 | 'promise',
|
61 | '@sweetui/sweet-mobile-sdk/object-literal-jsdoc',
|
62 | ],
|
63 |
|
64 | rules: {
|
65 | 'valid-jsdoc': [1, {
|
66 | requireReturn: false,
|
67 | }],
|
68 | 'require-jsdoc': [1, {
|
69 | require: {
|
70 | FunctionDeclaration: true,
|
71 | MethodDefinition: true,
|
72 | ClassDeclaration: true,
|
73 | },
|
74 | }],
|
75 | '@sweetui/sweet-mobile-sdk/object-literal-jsdoc/obj-doc': [1, {
|
76 | ignoreMethods,
|
77 | }],
|
78 |
|
79 | 'indent': [1, 4],
|
80 |
|
81 | 'no-cond-assign': 2,
|
82 |
|
83 | 'no-console': 1,
|
84 |
|
85 | 'no-debugger': 1,
|
86 |
|
87 | 'no-var': 2,
|
88 |
|
89 | 'no-dupe-args': 2,
|
90 |
|
91 | 'no-func-assign': 2,
|
92 |
|
93 | 'semi': [1, "never"],
|
94 |
|
95 | 'eqeqeq': [2, 'allow-null'],
|
96 |
|
97 | 'no-alert': 1,
|
98 |
|
99 | 'no-eval': 2,
|
100 |
|
101 | 'no-with': 2,
|
102 |
|
103 | 'strict': 2,
|
104 |
|
105 | 'init-declarations': 2,
|
106 |
|
107 | 'no-catch-shadow': 0,
|
108 |
|
109 | 'no-delete-var': 2,
|
110 |
|
111 | 'no-label-var': 2,
|
112 |
|
113 | 'no-restricted-globals': 2,
|
114 |
|
115 | 'no-shadow': 0,
|
116 |
|
117 | 'no-shadow-restricted-names': 2,
|
118 |
|
119 | 'no-undef': 2,
|
120 |
|
121 | 'no-undef-init': 2,
|
122 |
|
123 | 'no-undefined': 2,
|
124 |
|
125 | 'no-unused-vars': [1, {'vars': 'all', 'args': 'none'}],
|
126 |
|
127 | 'no-use-before-define': 1,
|
128 |
|
129 | 'max-len': [1, 160],
|
130 |
|
131 | 'eol-last': 0,
|
132 |
|
133 | 'quotes': [2, 'single'],
|
134 |
|
135 | 'no-const-assign': 2,
|
136 |
|
137 | 'no-underscore-dangle': 0,
|
138 |
|
139 | 'no-trailing-spaces': 2,
|
140 |
|
141 | 'no-lone-blocks': 2,
|
142 |
|
143 | 'jsx-quotes': 0,
|
144 |
|
145 | 'space-before-function-paren': [1, `never`],
|
146 |
|
147 | 'comma-dangle': [0, 'always'],
|
148 |
|
149 | 'key-spacing': [1, {'mode': 'strict'}],
|
150 |
|
151 | 'object-property-newline': [0, {'allowMultiplePropertiesPerLine': true}],
|
152 |
|
153 | 'prefer-promise-reject-errors': [0, {'allowEmptyReject': true}]
|
154 | },
|
155 | }
|