Skip to content

Commit 583c168

Browse files
committed
chore: Update eslint dependencies and add new rule for disallowed comments
1 parent b3caff8 commit 583c168

File tree

8 files changed

+55
-223
lines changed

8 files changed

+55
-223
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ This repository contains custom ESLint rules to enhance code quality and consist
1212
This repository contains custom ESLint rules to enhance code quality and consistency across projects, created by Tomer Horowitz.
1313

1414
## Rules
15+
<!-- begin auto-generated rules list -->
16+
17+
💼 Configurations enabled in.\
18+
✅ Set in the `recommended` configuration.\
19+
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
20+
21+
| Name              | Description | 💼 | 🔧 |
22+
| :--------------------------------------------------- | :------------------------------------------------------------------------------- | :---------------------------------- | :- |
23+
| [no-comments](docs/rules/no-comments.md) | Disallow comments except for specified allowed patterns. |![badge-recommended-typescript][] | 🔧 |
24+
| [no-default-export](docs/rules/no-default-export.md) | Convert unnamed default exports to named default exports based on the file name. |![badge-recommended-typescript][] | 🔧 |
25+
| [no-destructuring](docs/rules/no-destructuring.md) | Disallow destructuring that does not meet certain conditions |![badge-recommended-typescript][] | |
26+
27+
<!-- end auto-generated rules list -->
1528

1629
### 1. No-destructuring Rule
1730

docs/rules/no-comments.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Disallow comments except for specified allowed patterns (`th-rules/no-comments`)
2+
3+
💼 This rule is enabled in the following configs: ✅ `recommended`, `recommended-typescript`.
4+
5+
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
6+
7+
<!-- end auto-generated rule header -->
8+
9+
## Options
10+
11+
<!-- begin auto-generated rule options list -->
12+
13+
| Name | Description | Type |
14+
| :--------- | :------------------------------------------- | :------- |
15+
| `allow` | Additional patterns to allow in comments. | String[] |
16+
| `disallow` | Additional patterns to disallow in comments. | String[] |
17+
18+
<!-- end auto-generated rule options list -->

docs/rules/no-default-export.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Convert unnamed default exports to named default exports based on the file name (`th-rules/no-default-export`)
2+
3+
💼 This rule is enabled in the following configs: ✅ `recommended`, `recommended-typescript`.
4+
5+
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
6+
7+
<!-- end auto-generated rule header -->

docs/rules/no-destructuring.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Disallow destructuring that does not meet certain conditions (`th-rules/no-destructuring`)
2+
3+
💼 This rule is enabled in the following configs: ✅ `recommended`, `recommended-typescript`.
4+
5+
<!-- end auto-generated rule header -->
6+
7+
## Options
8+
9+
<!-- begin auto-generated rule options list -->
10+
11+
| Name | Type |
12+
| :----------------------------- | :------ |
13+
| `maximumDestructuredVariables` | Integer |
14+
| `maximumLineLength` | Integer |
15+
16+
<!-- end auto-generated rule options list -->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"eslint-plugin-react-native": "^4.1.0",
2929
"eslint-plugin-security": "^3.0.1",
3030
"eslint-plugin-sonarjs": "^1.0.4",
31-
"eslint-plugin-th-rules": "^1.11.4",
31+
"eslint-plugin-th-rules": "^1.12.0",
3232
"requireindex": "^1.2.0"
3333
},
3434
"devDependencies": {

src/tests/no-comments.js

Lines changed: 0 additions & 115 deletions
This file was deleted.

src/tests/no-default-export.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/tests/no-destructuring.js

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)