FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/static/src/javascripts/.eslintrc.js at master · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
static
/
src
/
javascripts
/
.eslintrc.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (81 loc) · 3.07 KB
Breadcrumbs
frontend
/
static
/
src
/
javascripts
/
.eslintrc.js
Copy path
File metadata and controls
87 lines (81 loc) · 3.07 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
//
@flow
module
.
exports
=
{
env
:
{
browser
:
true
,
jest
:
true
,
}
,
parser
:
'babel-eslint'
,
parserOptions
:
{
sourceType
:
'module'
,
ecmaVersion
:
6
,
}
,
settings
:
{
'import/resolver'
:
'webpack'
,
}
,
extends
:
[
'plugin:flowtype/recommended'
,
'prettier/flowtype'
,
'prettier/react'
,
]
,
plugins
:
[
'flowtype'
,
'flow-header'
]
,
rules
:
{
// require-specific overrides
'import/extensions'
:
'off'
,
'import/no-webpack-loader-syntax'
:
'off'
,
// used for require plugins still
'import/no-namespace'
:
2
,
'import/prefer-default-export'
:
'off'
,
// we explicitly warn against default export below
// these are bad habits in react that we're already abusing.
// if we go more [p]react we should look at them.
// not saying it's ok, but we don't reuse modules or
// develop this stuff much. disabling for now.
'react/no-multi-comp'
:
'off'
,
'react/no-find-dom-node'
:
'off'
,
'react/jsx-no-bind'
:
'off'
,
'react/prefer-stateless-function'
:
'off'
,
'react/jsx-filename-extension'
:
'off'
,
// disallow naming variables 'guardian', because
// window.guardian is our global config/settings object
'id-blacklist'
:
[
'error'
,
'guardian'
]
,
// disallow modules we used to use but have retired, either for
// babel polyfills or browser natives
'no-restricted-imports'
:
[
'error'
,
{
paths
:
[
'lodash'
,
'lodash/collections/forEach'
,
'lodash/collections/map'
,
'lodash/collections/reduce'
,
'lodash/collections/reduceRight'
,
'lodash/collections/some'
,
'lodash/collections/filter'
,
'lodash/collections/every'
,
'lodash/collections/contains'
,
'lodash/collections/find'
,
'lodash/collections/toArray'
,
'lodash/objects/assign'
,
'lodash/objects/values'
,
'lodash/objects/merge'
,
'lodash/objects/keys'
,
'lodash/objects/isArray'
,
'lodash/arrays/indexOf'
,
'lodash/arrays/compact'
,
'lodash/arrays/intersection'
,
'Promise'
,
]
,
patterns
:
[
'!lodash/*'
]
,
}
,
]
,
'flow-header/flow-header'
:
'error'
,
'no-param-reassign'
:
[
'error'
,
{
props
:
false
}
]
,
'no-prototype-builtins'
:
'off'
,
// our own rules for frontend
// live in tools/eslint-plugin-guardian-frontend
'guardian-frontend/global-config'
:
'error'
,
'guardian-frontend/no-multiple-classlist-parameters'
:
'error'
,
'guardian-frontend/no-default-export'
:
'warn'
,
'guardian-frontend/no-direct-access-config'
:
'warn'
,
// flow should take care of our return values
'consistent-return'
:
'off'
,
}
,
}
;
Back
|
FazBrowse Home
|
New Git URL