Skip to content

Commit 94a4603

Browse files
committedDec 19, 2020
Add new rules, fixes #10
1 parent e10ce1f commit 94a4603

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ Then add a `.eslintrc` with the following:
4545

4646
* :warning: [`func-style`](https://eslint.org/docs/rules/func-style) – disallows function declarations, good to be consistent with how functions are declared
4747
* :warning: [`no-console`](https://eslint.org/docs/rules/no-console) – warns on existence of `console.log` and similar, as they are mostly used for debugging and should not be committed
48+
* :stop_sign: [`no-nonoctal-decimal-escape`](https://eslint.org/docs/rules/no-nonoctal-decimal-escape) – there's no reason not to ban it
49+
* :stop_sign: [`no-unsafe-optional-chaining`](https://eslint.org/docs/rules/no-unsafe-optional-chaining) – enforces one to be careful with `.?` and not use it in ways that can inadvertently cause errors or `NaN` results
4850
* :warning: [`no-warning-comments`](https://eslint.org/docs/rules/no-warning-comments) – warns of the existence of `FIXME` comments, as they should always be fixed before pushing
4951
* :stop_sign: [`object-shorthand`](https://eslint.org/docs/rules/object-shorthand) – requires the use of object shorthands for properties, more tidy
50-
* :stop_sign: [`quote-props`](https://eslint.org/docs/rules/quote-props)– requires properties to be quoted when needed but otherwise disallows it
52+
* :stop_sign: [`quote-props`](https://eslint.org/docs/rules/quote-props) – requires properties to be quoted when needed but otherwise disallows it
5153

5254
### :package: Added ESLint rule package
5355

‎eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
"func-style": ["warn", "expression", { "allowArrowFunctions": true }],
4343
"no-console": "warn",
44+
"no-unsafe-optional-chaining": ["error", { "disallowArithmeticOperators": true }],
4445
"no-warning-comments": ["warn", { "terms": ["fixme"] }],
4546
"object-shorthand": ["error", "properties", { "avoidQuotes": true }],
4647
"quote-props": ["error", "as-needed", { "keywords": true, "numbers": true, "unnecessary": false }],

0 commit comments

Comments
 (0)