Skip to content

Commit

Permalink
fix: run update script
Browse files Browse the repository at this point in the history
  • Loading branch information
forivall committed Apr 22, 2023
1 parent e997e9e commit 1a67312
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ See also [Configuring ESLint](https://eslint.org/docs/user-guide/configuring).
|:--------|:------------|:--:|
| [cupcake/case-block](./docs/rules/case-block.md) | Enforces block statements in case blocks | ⭐️✒️ |
| [cupcake/declaration-order](./docs/rules/declaration-order.md) | Enforces order of variable declarations | ⭐️ |
| [cupcake/func-style](./docs/rules/func-style.md) | Enforce the consistent use of either `function` declarations or expressions | ⭐️ |

<!--RULE_TABLE_END-->

Expand Down
7 changes: 6 additions & 1 deletion docs/rules/func-style.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# cupcake/func-style
> Enforce the consistent use of either function declarations or expressions
> Enforce the consistent use of either `function` declarations or expressions
> - ⭐️ This rule is included in `plugin:cupcake/recommended` preset.
This rule is based on [eslint's `func-style` rule](https://eslint.org/docs/latest/rules/func-style). Visit their documentation for more in-depth information.
Expand Down Expand Up @@ -100,3 +100,8 @@ if (bar) {
## When Not To Use It

If you want to allow developers to each decide how they want to write functions on their own, then you can disable this rule.

## Implementation

- [Rule source](../../lib/rules/func-style.js)
- [Test source](../../tests/lib/rules/func-style.js)
1 change: 1 addition & 0 deletions lib/configs/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ module.exports = {
rules: {
"cupcake/case-block": "error",
"cupcake/declaration-order": "error",
"cupcake/func-style": "error",
},
};
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ module.exports = {
rules: {
"case-block": require("./rules/case-block"),
"declaration-order": require("./rules/declaration-order"),
"func-style": require("./rules/func-style"),
},
};

0 comments on commit 1a67312

Please sign in to comment.