Skip to content

Commit 7cba114

Browse files
feat: add logical-assignment-operators and operator-assignment lint rules (#662)
## PR Checklist - [x] Addresses an existing open issue: fixes #646; fixes #647 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Enables the two rules.
1 parent ab9a81a commit 7cba114

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.eslintrc.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ module.exports = {
3939
rules: {
4040
// These off-by-default rules work well for this repo and we like them on.
4141
"jsdoc/informative-docs": "error",
42+
"logical-assignment-operators": [
43+
"error",
44+
"always",
45+
{ enforceForIfStatements: true },
46+
],
47+
"operator-assignment": "error",
4248

4349
// These on-by-default rules don't work well for this repo and we like them off.
4450
"jsdoc/require-jsdoc": "off",

0 commit comments

Comments
 (0)