Skip to content

Commit f823b18

Browse files
committed
docs(config): document parser rules function in ESLint config helper
1 parent 14c4a39 commit f823b18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/config/helpers/build-eslint.js

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ const prettier = withBaseConfig('eslint-config-prettier')
1313

1414
const hasReact = hasAnyDep('react')
1515

16+
/**
17+
* Helper that applies some rules conditionally based on whether the TypeScript
18+
* parser and type-aware linting rules are enabled
19+
*
20+
* @param {boolean} [typescript] - whether specific TypeScript parsing is applied
21+
* @param {boolean} [react] - whether in React support is enabled
22+
*/
1623
const parserRules = (typescript = false, react = false) => {
1724
const isOff = off => (off ? 'off' : 'error')
1825

0 commit comments

Comments
 (0)