diff --git a/src/templates/init/eslintrc.json.ts b/src/templates/init/eslintrc.json.ts index 20ad923e..04ad8d42 100755 --- a/src/templates/init/eslintrc.json.ts +++ b/src/templates/init/eslintrc.json.ts @@ -71,6 +71,40 @@ export const eslintrcJson = async (appName: string, template: string) => { ], }, }, + { + files: ['./webapp/**/*.ts', './webapp/**/*.tsx'], + extends: [ + 'next/core-web-vitals', + 'eslint:recommended', + 'plugin:react-hooks/recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', + ], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint', 'react-hooks'], + env: { + browser: true, + es2021: true, + }, + rules: { + 'react-hooks/rules-of-hooks': 'error', + 'react-hooks/exhaustive-deps': 'warn', + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-var-requires': 0, + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/no-empty-function': 0, + '@typescript-eslint/ban-ts-comment': [ + 'off', + { + 'ts-ignore': 'allow-with-description', + }, + ], + }, + }, ], } } else if (