11import antfu from '@antfu/eslint-config'
2+ import pluginBan from 'eslint-plugin-ban'
23
34export default antfu ( {
45 react : true ,
56 formatters : true ,
67} , {
8+ plugins : { ban : pluginBan } ,
79 rules : {
810 'ts/consistent-type-definitions' : 'off' ,
911 'react-refresh/only-export-components' : 'off' ,
1012 'react/prefer-destructuring-assignment' : 'off' ,
1113 'react/no-context-provider' : 'off' ,
1214 'ts/method-signature-style' : [ 'off' ] ,
15+ 'ban/ban' : [
16+ 'error' ,
17+ {
18+ name : [ 'JSON' , 'stringify' ] ,
19+ message : 'JSON.stringify can return undefined, use stringifyJSON instead' ,
20+ } ,
21+ ] ,
1322 } ,
1423} , {
1524 files : [ '**/*.test.ts' , '**/*.test.tsx' , '**/*.test-d.ts' , '**/*.test-d.tsx' , 'apps/content/shared/**' , 'playgrounds/**' , 'packages/*/playground/**' ] ,
@@ -18,6 +27,7 @@ export default antfu({
1827 'antfu/no-top-level-await' : 'off' ,
1928 'react-hooks/rules-of-hooks' : 'off' ,
2029 'no-alert' : 'off' ,
30+ 'ban/ban' : 'off' ,
2131 } ,
2232} , {
2333 files : [ 'apps/content/shared/**' , 'apps/content/docs/**' , 'apps/content/examples/**' , 'playgrounds/**' , 'packages/*/playground/**' ] ,
@@ -26,6 +36,7 @@ export default antfu({
2636 'perfectionist/sort-imports' : 'off' ,
2737 'import/first' : 'off' ,
2838 'react-hooks/rules-of-hooks' : 'off' ,
39+ 'ban/ban' : 'off' ,
2940 } ,
3041} , {
3142 files : [ 'apps/content/examples/**' ] ,
0 commit comments