-
Notifications
You must be signed in to change notification settings - Fork 38
/
.eslintrc-es6.js
95 lines (93 loc) · 2.66 KB
/
.eslintrc-es6.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
/**
* Copyright 2020 The AMP HTML Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS-IS' BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const path = require('path');
module.exports = {
'root': true,
'plugins': [
'notice',
'prettier',
'sort-imports-es6-autofix',
'sort-requires',
],
'env': {
'es6': true,
'jest': true,
'node': true,
},
'extends': ['prettier'],
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module',
},
'rules': {
'camelcase': 'error',
'curly': 'error',
'no-alert': 'error',
'no-debugger': 'error',
'no-div-regex': 'error',
'no-dupe-keys': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-global-assign': 'error',
'no-implicit-coercion': ['error', {'boolean': false}],
'no-implied-eval': 'error',
'no-iterator': 'error',
'no-lone-blocks': 'error',
'no-native-reassign': 'error',
'no-redeclare': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-undef': 'error',
'no-unused-expressions': 'error',
'no-unused-vars': ['error', {'argsIgnorePattern': '^(_$|unused)'}],
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-var': 'error',
'no-warning-comments': [
'error',
{'terms': ['do not submit'], 'location': 'anywhere'},
],
'notice/notice': [
'error',
{
'mustMatch': 'Copyright 20\\d{2} The AMP HTML Authors\\.',
'templateFile': path.resolve(
__dirname,
'build-system/LICENSE-TEMPLATE.txt'
),
'messages': {
'whenFailedToMatch': 'Missing or incorrect license header',
},
},
],
'object-shorthand': ['error', 'properties', {'avoidQuotes': true}],
'prefer-const': 'error',
'prettier/prettier': 'error',
'radix': 'error',
'sort-imports-es6-autofix/sort-imports-es6': [
'error',
{
'ignoreCase': false,
'ignoreMemberSort': false,
'memberSyntaxSortOrder': ['none', 'all', 'multiple', 'single'],
},
],
'sort-requires/sort-requires': 'error',
},
};