Skip to content

Commit 1e38bc6

Browse files
authored
Add valid-compile rule to recommended config (#43)
1 parent fa1cfcc commit 1e38bc6

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
250250
| [@ota-meshi/svelte/no-dupe-else-if-blocks](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-dupe-else-if-blocks.html) | disallow duplicate conditions in `{#if}` / `{:else if}` chains | :star: |
251251
| [@ota-meshi/svelte/no-not-function-handler](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-not-function-handler.html) | disallow use of not function in event handler | :star: |
252252
| [@ota-meshi/svelte/no-object-in-text-mustaches](https://ota-meshi.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches.html) | disallow objects in text mustache interpolation | :star: |
253-
| [@ota-meshi/svelte/valid-compile](https://ota-meshi.github.io/eslint-plugin-svelte/rules/valid-compile.html) | disallow warnings when compiling. | |
253+
| [@ota-meshi/svelte/valid-compile](https://ota-meshi.github.io/eslint-plugin-svelte/rules/valid-compile.html) | disallow warnings when compiling. | :star: |
254254

255255
## Security Vulnerability
256256

docs/rules/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ These rules relate to possible syntax or logic errors in Svelte code:
1818
| [@ota-meshi/svelte/no-dupe-else-if-blocks](./no-dupe-else-if-blocks.md) | disallow duplicate conditions in `{#if}` / `{:else if}` chains | :star: |
1919
| [@ota-meshi/svelte/no-not-function-handler](./no-not-function-handler.md) | disallow use of not function in event handler | :star: |
2020
| [@ota-meshi/svelte/no-object-in-text-mustaches](./no-object-in-text-mustaches.md) | disallow objects in text mustache interpolation | :star: |
21-
| [@ota-meshi/svelte/valid-compile](./valid-compile.md) | disallow warnings when compiling. | |
21+
| [@ota-meshi/svelte/valid-compile](./valid-compile.md) | disallow warnings when compiling. | :star: |
2222

2323
## Security Vulnerability
2424

docs/rules/valid-compile.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ since: "v0.7.0"
1010

1111
> disallow warnings when compiling.
1212
13+
- :gear: This rule is included in `"plugin:@ota-meshi/svelte/recommended"`.
14+
1315
## :book: Rule Details
1416

1517
This rule uses Svelte compiler to check the source code.

src/configs/recommended.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export = {
1414
"@ota-meshi/svelte/no-not-function-handler": "error",
1515
"@ota-meshi/svelte/no-object-in-text-mustaches": "error",
1616
"@ota-meshi/svelte/system": "error",
17+
"@ota-meshi/svelte/valid-compile": "error",
1718
},
1819
}

src/rules/valid-compile.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default createRule("valid-compile", {
6565
docs: {
6666
description: "disallow warnings when compiling.",
6767
category: "Possible Errors",
68-
recommended: false,
68+
recommended: true,
6969
},
7070
schema: [
7171
{

0 commit comments

Comments
 (0)