Skip to content

Commit 47cfc78

Browse files
committed
Add object-shorthand and no-useless-rename rules to default config
closes #19
1 parent 2c96297 commit 47cfc78

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

β€Ždocs/angular-ngrx.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Config for **Angular** projects using **NgRx** library.
4747
}
4848
```
4949

50-
## πŸ“ Rules (370)
50+
## πŸ“ Rules (372)
5151

52-
**340** rules are included from [`@code-pushup/eslint-config/angular`](./angular.md#πŸ“-rules-340). For brevity, only the **30** additional rules are listed in this document.
52+
**342** rules are included from [`@code-pushup/eslint-config/angular`](./angular.md#πŸ“-rules-342). For brevity, only the **30** additional rules are listed in this document.
5353

5454
> πŸ”§ 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).
5555

β€Ždocs/angular.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Config for **Angular** projects.
4747
}
4848
```
4949

50-
## πŸ“ Rules (370)
50+
## πŸ“ Rules (372)
5151

52-
**295** rules are included from [`@code-pushup/eslint-config/typescript`](./typescript.md#πŸ“-rules-295). For brevity, only the **75** additional rules are listed in this document.
52+
**297** rules are included from [`@code-pushup/eslint-config/typescript`](./typescript.md#πŸ“-rules-297). For brevity, only the **75** additional rules are listed in this document.
5353

5454
> πŸ”§ 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).
5555

β€Ždocs/graphql.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ Config for **GraphQL servers** implemented in Node.js.
3333
}
3434
```
3535

36-
## πŸ“ Rules (292)
36+
## πŸ“ Rules (294)
3737

38-
**265** rules are included from [`@code-pushup/eslint-config/node`](./node.md#πŸ“-rules-265). For brevity, only the **27** additional rules are listed in this document.
38+
**267** rules are included from [`@code-pushup/eslint-config/node`](./node.md#πŸ“-rules-267). For brevity, only the **27** additional rules are listed in this document.
3939

4040
> πŸ”§ 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).
4141

β€Ždocs/index.mdβ€Ž

Lines changed: 4 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 (249)
9+
## πŸ“ Rules (251)
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
@@ -129,7 +129,7 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
129129
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)<br />Return of boolean expressions should not be wrapped into an "if-then-else" statement | | πŸ’‘ | |
130130
| [![sonarjs](./icons/other/sonar.png)](https://github.com/SonarSource/eslint-plugin-sonarjs#readme) | [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)<br />A "while" loop should be used instead of a "for" loop | | πŸ”§ | |
131131

132-
### ⚠️ Warnings (135)
132+
### ⚠️ Warnings (137)
133133

134134
| Plugin | Rule | Options | Autofix | Overrides |
135135
| :--------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-------: |
@@ -144,6 +144,8 @@ Refer to [setup instructions in README](../README.md#πŸ—οΈ-setup).
144144
| | [no-console](https://eslint.org/docs/latest/rules/no-console)<br />Disallow the use of `console` | <details><summary>allow: error, warn, info</summary><pre lang="json"><code>{&#13; "allow": [&#13; "error",&#13; "warn",&#13; "info"&#13; ]&#13;}</code></pre></details> | πŸ’‘ | |
145145
| | [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports)<br />Disallow duplicate module imports | | | |
146146
| | [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)<br />Disallow initializing variables to `undefined` | | πŸ”§ | |
147+
| | [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)<br />Disallow renaming import, export, and destructured assignments to the same name | | πŸ”§ | |
148+
| | [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)<br />Require or disallow method and property shorthand syntax for object literals | | πŸ”§ | |
147149
| | [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)<br />Require template literals instead of string concatenation | | πŸ”§ | |
148150
| | [radix](https://eslint.org/docs/latest/rules/radix)<br />Enforce the consistent use of the radix argument when using `parseInt()` | | πŸ’‘ | |
149151
| | [yoda](https://eslint.org/docs/latest/rules/yoda)<br />Require or disallow "Yoda" conditions | | πŸ”§ | |

β€Ždocs/node.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Config for **Node.js** projects.
1919
}
2020
```
2121

22-
## πŸ“ Rules (253)
22+
## πŸ“ Rules (255)
2323

24-
**249** rules are included from [the default config](./index.md#πŸ“-rules-249). For brevity, only the **4** additional rules are listed in this document.
24+
**251** rules are included from [the default config](./index.md#πŸ“-rules-251). For brevity, only the **4** additional rules are listed in this document.
2525

2626
> πŸ”§ 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).
2727

β€Ždocs/typescript.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ Config for strict **TypeScript** projects.
6464
}
6565
```
6666

67-
## πŸ“ Rules (296)
67+
## πŸ“ Rules (298)
6868

69-
**249** rules are included from [the default config](./index.md#πŸ“-rules-249). For brevity, only the **47** additional rules are listed in this document.
69+
**251** rules are included from [the default config](./index.md#πŸ“-rules-251). For brevity, only the **47** additional rules are listed in this document.
7070

7171
> πŸ”§ 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).
7272

β€Žindex.jsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module.exports = {
9393
{ skipBlankLines: true, skipComments: true },
9494
],
9595
'max-nested-callbacks': ['warn', { max: 3 }],
96+
'object-shorthand': 'warn',
9697
'no-bitwise': 'warn',
9798
'no-console': ['warn', { allow: ['error', 'warn', 'info'] }],
9899
'no-duplicate-imports': 'warn',
@@ -102,6 +103,7 @@ module.exports = {
102103
'no-template-curly-in-string': 'error',
103104
'no-undef-init': 'warn',
104105
'no-unreachable-loop': 'error',
106+
'no-useless-rename': 'warn',
105107
'prefer-template': 'warn',
106108
radix: 'warn',
107109
yoda: 'warn',

0 commit comments

Comments
Β (0)