Skip to content

Commit f7fb0cf

Browse files
authored
refactor: add default options for fenced-code-language and no-html (#427)
1 parent 0add950 commit f7fb0cf

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

docs/rules/fenced-code-language.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ console.log(message);
3434

3535
The following options are available on this rule:
3636

37-
* `required: Array<string>` - when specified, fenced code blocks must use one of the languages specified in this array.
37+
* `required: Array<string>` - when specified, fenced code blocks must use one of the languages specified in this array. (default: `[]`)
3838

3939
Examples of **incorrect** code when configured as `"fenced-code-language": ["error", { required: ["js"] }]`:
4040

docs/rules/no-html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Hello <b>world!</b>
2424

2525
The following options are available on this rule:
2626

27-
* `allowed: Array<string>` - when specified, HTML tags are allowed only if they match one of the tags in this array.
27+
* `allowed: Array<string>` - when specified, HTML tags are allowed only if they match one of the tags in this array. (default: `[]`)
2828

2929
Examples of **incorrect** code when configured as `"no-html": ["error", { allowed: ["b"] }]`:
3030

src/rules/fenced-code-language.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export default {
5454
additionalProperties: false,
5555
},
5656
],
57+
58+
defaultOptions: [
59+
{
60+
required: [],
61+
},
62+
],
5763
},
5864

5965
create(context) {

src/rules/no-html.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ export default {
5757
additionalProperties: false,
5858
},
5959
],
60+
61+
defaultOptions: [
62+
{
63+
allowed: [],
64+
},
65+
],
6066
},
6167

6268
create(context) {

0 commit comments

Comments
 (0)