@tim-code/eslint-config 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +2 -1
- package/package.json +1 -1
package/.eslintrc.js
CHANGED
|
@@ -50,7 +50,7 @@ module.exports = {
|
|
|
50
50
|
"error",
|
|
51
51
|
{
|
|
52
52
|
selector:
|
|
53
|
-
":not(BinaryExpression:matches([operator='!=='],
|
|
53
|
+
":not(BinaryExpression:matches([operator='!=='],[operator='===']), CallExpression[callee.object.name='Object'][callee.property.name='create']) > Literal[value=null]",
|
|
54
54
|
message:
|
|
55
55
|
'Usage of "null" is discouraged except when used because of legacy APIs; use "undefined" instead',
|
|
56
56
|
},
|
|
@@ -88,6 +88,7 @@ module.exports = {
|
|
|
88
88
|
// rule is too idealistic
|
|
89
89
|
camelcase: "off", // useful to allow non-camel case for compatibility like destructuring JSON
|
|
90
90
|
"sort-keys": "off", // too burdensome; doesn't affect order of destructured properties i.e. ({b, a}) => ({a, b}) would be fine
|
|
91
|
+
"sort-vars": "off", // let results, index
|
|
91
92
|
"no-param-reassign": "off", // a common pattern is to coerce parameters; noisy to rename parameters slightly differently
|
|
92
93
|
"no-magic-numbers": "off", // does not allow 1, 2, -1; also sometimes noisy to name every constant (for example in time calculations)
|
|
93
94
|
"id-length": "off", // single character variables can sometimes be useful: i, j, x, y, $, _
|