Skip to content

Commit f4fc671

Browse files
authored
feat(oxlint-config): add consistent-function-scoping, no-clone-element and no-react-children rules (#215)
1 parent 0fab147 commit f4fc671

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎packages/oxlint-config/src/storybook.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default {
2626
'typescript/no-unsafe-call': 'off',
2727
'typescript/no-unsafe-argument': 'off',
2828
'typescript/no-explicit-any': 'off',
29+
'unicorn/consistent-function-scoping': 'off',
2930
'trigen/func-style': 'off'
3031
}
3132
}

‎packages/oxlint-config/src/subconfigs/basic.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export default {
238238
'eslint/operator-assignment': ['error', 'always'],
239239
'eslint/prefer-object-spread': 'error',
240240
'eslint/unicode-bom': 'error',
241+
'unicorn/consistent-function-scoping': 'error',
241242
'trigen/func-style': 'error',
242243
'trigen/naming-convention': [
243244
'error',

‎packages/oxlint-config/src/subconfigs/react.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default {
2424
// React
2525
'react/no-array-index-key': 'warn',
2626
'react/no-children-prop': 'error',
27+
'react/no-clone-element': 'error',
2728
'react/no-danger': 'warn',
2829
'react/no-danger-with-children': 'error',
2930
'react/no-did-mount-set-state': 'error',
@@ -37,6 +38,7 @@ export default {
3738
ignoreStateless: true
3839
}
3940
],
41+
'react/no-react-children': 'error',
4042
'react/no-redundant-should-component-update': 'error',
4143
'react/no-render-return-value': 'error',
4244
'react/no-string-refs': 'error',

‎packages/oxlint-config/src/test.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default {
2525
'typescript/no-explicit-any': 'off',
2626
'typescript/await-thenable': 'off',
2727
'typescript/no-floating-promises': 'off',
28+
'unicorn/consistent-function-scoping': 'off',
2829
'trigen/import-order': 'off',
2930
'eslint/prefer-destructuring': 'off',
3031
'eslint/no-loop-func': 'off',

0 commit comments

Comments
 (0)