This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.js
84 lines (80 loc) · 2.24 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
/**
* SPDX-FileCopyrightText: © 2017 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: MIT
*/
'use strict';
const local = require('./utils/local');
const config = {
env: {
es6: true,
},
extends: ['eslint:recommended', require.resolve('eslint-config-prettier')],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
local('liferay'),
'no-for-of-loops',
'no-only-tests',
'notice',
'sort-destructure-keys',
],
rules: {
curly: 'error',
'default-case': 'error',
'liferay/array-is-array': 'error',
'liferay/destructure-requires': 'error',
'liferay/group-imports': 'error',
'liferay/import-extensions': 'error',
'liferay/imports-first': 'error',
'liferay/no-absolute-import': 'error',
'liferay/no-duplicate-imports': 'error',
'liferay/no-dynamic-require': 'error',
'liferay/no-it-should': 'error',
'liferay/no-require-and-call': 'error',
'liferay/padded-test-blocks': 'error',
'liferay/sort-import-destructures': 'error',
'liferay/sort-imports': 'error',
'lines-around-comment': [
'error',
{
afterBlockComment: false,
afterLineComment: true,
allowArrayEnd: true,
allowArrayStart: true,
allowBlockEnd: true,
allowBlockStart: true,
allowClassStart: true,
allowObjectEnd: true,
allowObjectStart: true,
beforeBlockComment: true,
beforeLineComment: true,
},
],
'no-console': ['error', {allow: ['warn', 'error']}],
'no-constant-condition': ['error', {checkLoops: false}],
'no-control-regex': 'off',
'no-for-of-loops/no-for-of-loops': 'error',
'no-only-tests/no-only-tests': 'error',
'no-return-assign': ['error', 'always'],
'no-unused-expressions': 'error',
'no-unused-vars': ['error', {argsIgnorePattern: '^_'}],
'object-shorthand': 'error',
'padding-line-between-statements': [
'error',
{blankLine: 'always', next: 'return', prev: '*'},
],
'prefer-arrow-callback': ['error', {allowNamedFunctions: true}],
'prefer-const': 'error',
'prefer-object-spread': 'error',
'quote-props': ['error', 'as-needed'],
radix: 'error',
'sort-destructure-keys/sort-destructure-keys': [
'error',
{caseSensitive: true},
],
'sort-keys': ['error', 'asc', {caseSensitive: true, natural: true}],
},
};
module.exports = config;