forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
77 lines (77 loc) · 1.85 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
module.exports = {
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
env: {
es6: true,
browser: true,
jest: true,
},
parser: "@babel/eslint-parser",
parserOptions: {
ecmaVersion: 2017,
ecmaFeatures: {
jsx: true,
experimentalObjectRestSpread: true
},
sourceType: 'module',
babelOptions: {
configFile: __dirname + "/.babelrc",
},
},
globals: {
gettext: false,
ngettext: false,
interpolate: false,
l: false,
expect: false,
test: false,
browser: false,
jest: false,
Promise: false,
Set: false,
URLSearchParameters: false,
FormData: false,
require: false,
shortcut: false,
sorttable: false,
$: false,
Pontoon: false,
jQuery: false,
Clipboard: false,
Chart: false,
NProgress: false,
diff_match_patch: false,
Highcharts: false,
Sideshow: false,
editor: false,
DIFF_INSERT: false,
DIFF_EQUAL: false,
DIFF_DELETE: false,
ga: false,
process: false,
generalShortcutsHandler: true,
traversalShortcutsHandler: true,
editorShortcutsHandler: true,
},
plugins: [
'react',
],
rules: {
'react/display-name': 0,
'react/prefer-es6-class': 1,
'react/prefer-stateless-function': 0,
"react/prop-types": 0,
"react/jsx-key": 0,
"react/jsx-uses-react": 1,
'react/jsx-uses-vars': 1,
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": true }],
"no-console": 1,
},
settings: {
'react': {
'version': 'detect'
}
}
};