Skip to content

Commit 2d7900e

Browse files
committed
Add no-useless-computed key rule
Closes #26
1 parent 9dcc857 commit 2d7900e

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

β€Ždocs/angular.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Config for **Angular** projects.
5252
);
5353
```
5454

55-
## πŸ“ Rules (420)
55+
## πŸ“ Rules (421)
5656

57-
**344** rules are included from [`typescript` config](./typescript.md#πŸ“-rules-344). For brevity, only the **76** additional rules are listed in this document.
57+
**345** rules are included from [`typescript` config](./typescript.md#πŸ“-rules-345). For brevity, only the **76** additional rules are listed in this document.
5858

5959
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
6060

β€Ždocs/graphql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Config for **GraphQL servers** implemented in Node.js.
3939
export default tseslint.config(...graphql);
4040
```
4141

42-
## πŸ“ Rules (316)
42+
## πŸ“ Rules (317)
4343

44-
**293** rules are included from [`node` config](./node.md#πŸ“-rules-293). For brevity, only the **23** additional rules are listed in this document.
44+
**294** rules are included from [`node` config](./node.md#πŸ“-rules-294). For brevity, only the **23** additional rules are listed in this document.
4545

4646
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
4747

β€Ždocs/javascript.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Default config, suitable for any **JavaScript/TypeScript** project.
66

77
Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
88

9-
## πŸ“ Rules (289)
9+
## πŸ“ Rules (290)
1010

1111
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
1212
@@ -135,7 +135,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
135135
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)<br />The output of functions that don't return anything should not be used | | | |
136136
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)<br />Non-existent operators "=+", "=-" and "=!" should not be used | | πŸ’‘ | |
137137

138-
### ⚠️ Warnings (169)
138+
### ⚠️ Warnings (170)
139139

140140
| Plugin | Rule | Options | Autofix | Overrides |
141141
| :--------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: |
@@ -152,6 +152,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
152152
| | [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)<br />Disallow empty static blocks | | | |
153153
| | [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)<br />Disallow initializing variables to `undefined` | | πŸ”§ | |
154154
| | [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)<br />Disallow unused private class members | | | |
155+
| | [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key)<br />Disallow unnecessary computed property keys in objects and classes | | πŸ”§ | |
155156
| | [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)<br />Disallow renaming import, export, and destructured assignments to the same name | | πŸ”§ | |
156157
| | [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)<br />Require or disallow method and property shorthand syntax for object literals | | πŸ”§ | |
157158
| | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)<br />Require template literals instead of string concatenation | | πŸ”§ | |

β€Ždocs/ngrx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ Config for **Angular** projects using **NgRx** library.
5252
);
5353
```
5454

55-
## πŸ“ Rules (450)
55+
## πŸ“ Rules (451)
5656

57-
**420** rules are included from [`angular` config](./angular.md#πŸ“-rules-420). For brevity, only the **30** additional rules are listed in this document.
57+
**421** rules are included from [`angular` config](./angular.md#πŸ“-rules-421). For brevity, only the **30** additional rules are listed in this document.
5858

5959
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
6060

β€Ždocs/node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Config for **Node.js** projects.
2020
export default tseslint.config(...node);
2121
```
2222

23-
## πŸ“ Rules (293)
23+
## πŸ“ Rules (294)
2424

25-
**289** rules are included from [`javascript` config](./javascript.md#πŸ“-rules-289). For brevity, only the **4** additional rules are listed in this document.
25+
**290** rules are included from [`javascript` config](./javascript.md#πŸ“-rules-290). For brevity, only the **4** additional rules are listed in this document.
2626

2727
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
2828

β€Ždocs/typescript.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ Config for strict **TypeScript** projects.
6565
export default tseslint.config(...typescript);
6666
```
6767

68-
## πŸ“ Rules (344)
68+
## πŸ“ Rules (345)
6969

70-
**289** rules are included from [`javascript` config](./javascript.md#πŸ“-rules-289). For brevity, only the **55** additional rules are listed in this document.
70+
**290** rules are included from [`javascript` config](./javascript.md#πŸ“-rules-290). For brevity, only the **55** additional rules are listed in this document.
7171

7272
> πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).<br>πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).<br>πŸ§ͺ🚫 Disabled for [test files](../README.md#πŸ§ͺ-test-overrides).<br>πŸ§ͺ⚠️ Severity lessened to warning for [test files](../README.md#πŸ§ͺ-test-overrides).
7373

β€Žsrc/configs/javascript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export default tseslint.config(
119119
],
120120
'max-nested-callbacks': ['warn', { max: 3 }],
121121
'no-inner-declarations': 'error',
122-
'object-shorthand': 'warn',
123122
'no-bitwise': 'warn',
124123
'no-console': ['warn', { allow: ['error', 'warn', 'info'] }],
125124
'no-duplicate-imports': 'warn',
@@ -130,6 +129,8 @@ export default tseslint.config(
130129
'no-undef-init': 'warn',
131130
'no-unreachable-loop': 'error',
132131
'no-useless-rename': 'warn',
132+
'no-useless-computed-key': 'warn',
133+
'object-shorthand': 'warn',
133134
'prefer-template': 'warn',
134135
radix: 'warn',
135136
yoda: 'warn',

0 commit comments

Comments
Β (0)