This repository was archived by the owner on Mar 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathoptional.js
More file actions
45 lines (37 loc) · 1.36 KB
/
optional.js
File metadata and controls
45 lines (37 loc) · 1.36 KB
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
/**
* Js-coding-standards
*
* @author Robert Rossmann <rr.rossmann@me.com>
* @copyright 2016 STRV
* @license http://choosealicense.com/licenses/bsd-3-clause BSD-3-Clause License
*/
'use strict'
module.exports = {
extends: '../shared/optional.js',
plugins: [
'react',
],
rules: {
// Disallow Use of Alert
// This rule is aimed at catching debugging code that should be removed and popup UI elements
// that should be replaced with less obtrusive, custom UIs.
'no-alert': 'warn',
// Enforce propTypes declarations alphabetical sorting
'react/sort-prop-types': ['warn', {
ignoreCase: true,
callbacksLast: false,
requiredFirst: false,
sortShapeProp: true,
}],
// Forbid foreign propTypes
// This rule forbids using another component's prop types unless they are explicitly
// imported/exported. This allows people who want to use
// babel-plugin-transform-react-remove-prop-types to remove propTypes from their components in
// production builds, to do so safely
'react/forbid-foreign-prop-types': 'warn',
// This rule prevents characters that you may have meant as JSX escape characters from being
// accidentally injected as a text node in JSX statements.
// Also breaks syntax highlighting in github pull requests.
'react/no-unescaped-entities': 'warn',
},
}