UNPKG

3.35 kBJavaScriptView Raw
1"use strict";
2
3module.exports = {
4 extends: ["prettier", "prettier/react"],
5 rules: {
6 // http://eslint.org/docs/rules/
7 "array-callback-return": "warn",
8 "default-case": ["warn", { commentPattern: "^no default$" }],
9 "dot-location": ["warn", "property"],
10 eqeqeq: ["warn", "allow-null"],
11 "new-parens": "warn",
12 "no-array-constructor": "warn",
13 "no-caller": "warn",
14 "no-cond-assign": ["warn", "always"],
15 "no-const-assign": "error",
16 "no-control-regex": "warn",
17 "no-delete-var": "warn",
18 "no-dupe-args": "warn",
19 "no-dupe-class-members": "warn",
20 "no-dupe-keys": "warn",
21 "no-duplicate-case": "warn",
22 "no-empty-character-class": "warn",
23 "no-empty-pattern": "warn",
24 "no-eval": "warn",
25 "no-ex-assign": "warn",
26 "no-extend-native": "warn",
27 "no-extra-bind": "warn",
28 "no-extra-label": "warn",
29 "no-fallthrough": "warn",
30 "no-func-assign": "warn",
31 "no-implied-eval": "warn",
32 "no-invalid-regexp": "warn",
33 "no-iterator": "warn",
34 "no-label-var": "warn",
35 "no-labels": ["warn", { allowLoop: true, allowSwitch: false }],
36 "no-lone-blocks": "warn",
37 "no-loop-func": "warn",
38 "no-mixed-operators": [
39 "warn",
40 {
41 groups: [
42 ["&", "|", "^", "~", "<<", ">>", ">>>"],
43 ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
44 ["&&", "||"],
45 ["in", "instanceof"]
46 ],
47 allowSamePrecedence: false
48 }
49 ],
50 "no-multi-str": "warn",
51 "no-native-reassign": "warn",
52 "no-negated-in-lhs": "warn",
53 "no-new-func": "warn",
54 "no-new-object": "warn",
55 "no-new-symbol": "warn",
56 "no-new-wrappers": "warn",
57 "no-obj-calls": "warn",
58 "no-octal": "warn",
59 "no-octal-escape": "warn",
60 "no-redeclare": "warn",
61 "no-regex-spaces": "warn",
62 "no-restricted-syntax": ["warn", "WithStatement"],
63 "no-script-url": "warn",
64 "no-self-assign": "warn",
65 "no-self-compare": "warn",
66 "no-sequences": "warn",
67 "no-shadow-restricted-names": "warn",
68 "no-sparse-arrays": "warn",
69 "no-template-curly-in-string": "warn",
70 "no-this-before-super": "warn",
71 "no-throw-literal": "warn",
72 "no-undef": "error",
73 "no-restricted-globals": ["error", "event"],
74 "no-unexpected-multiline": "error",
75 "no-unreachable": "warn",
76 "no-unused-expressions": [
77 "warn",
78 {
79 allowShortCircuit: true,
80 allowTernary: true
81 }
82 ],
83 "no-unused-labels": "warn",
84 "no-unused-vars": [
85 "warn",
86 {
87 vars: "local",
88 varsIgnorePattern: "^_|PropTypes",
89 args: "none",
90 ignoreRestSiblings: true
91 }
92 ],
93 "no-use-before-define": ["error", "nofunc"],
94 "no-useless-computed-key": "warn",
95 "no-useless-concat": "warn",
96 "no-useless-constructor": "warn",
97 "no-useless-escape": "warn",
98 "no-useless-rename": [
99 "warn",
100 {
101 ignoreDestructuring: false,
102 ignoreImport: false,
103 ignoreExport: false
104 }
105 ],
106 "no-with": "warn",
107 "no-whitespace-before-property": "warn",
108 "operator-assignment": ["warn", "always"],
109 radix: "warn",
110 "require-yield": "warn",
111 "rest-spread-spacing": ["warn", "never"],
112 strict: ["warn", "never"],
113 "unicode-bom": ["warn", "never"],
114 "use-isnan": "warn",
115 "valid-typeof": "error"
116 }
117};