forked from liferay/alloy-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
91 lines (89 loc) · 1.86 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
/**
* SPDX-FileCopyrightText: © 2014 Liferay, Inc. <https://liferay.com>
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
const path = require('path');
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true,
},
extends: ['liferay/react'],
globals: {
AlloyEditor: true,
CKEDITOR: true,
Liferay: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
},
rules: {
'new-cap': [
'error',
{
capIsNewExceptions: [
'ButtonActionStyle',
'ButtonProps',
'ButtonCommand',
'ButtonCommandActive',
'ButtonKeystroke',
'ButtonProps',
'ButtonStateClasses',
'ButtonStyle',
'ToolbarButtons',
'WidgetArrowBox',
'WidgetDropdown',
'WidgetExclusive',
'WidgetFocusManager',
'WidgetPosition',
],
newIsCapExceptions: [
'CKEDITOR.command',
'CKEDITOR.dom.comment',
'CKEDITOR.dom.documentFragment',
'CKEDITOR.dom.element',
'CKEDITOR.dom.elementPath',
'CKEDITOR.dom.event',
'CKEDITOR.dom.node',
'CKEDITOR.dom.nodeList',
'CKEDITOR.dom.range',
'CKEDITOR.dom.rangeList',
'CKEDITOR.dom.selection',
'CKEDITOR.dom.text',
'CKEDITOR.dom.walker',
'CKEDITOR.dom.window',
'CKEDITOR.htmlParser.basicWriter',
'CKEDITOR.htmlParser.element',
'CKEDITOR.htmlParser.filter',
'CKEDITOR.htmlParser.fragment.fromHtml',
'CKEDITOR.style',
'CKEDITOR.template',
],
},
],
'no-inner-declarations': 'off',
'no-invalid-this': 'warn',
'notice/notice': [
'error',
{
templateFile: path.join(__dirname, 'copyright.js'),
},
],
'react/display-name': 'warn',
'react/no-find-dom-node': 'warn',
'react/no-string-refs': 'warn',
'react/prop-types': 'warn',
'sort-keys': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
};