diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..9e63cb8 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,45 @@ +module.exports = { + env: { + browser: true, + es2021: true + }, + extends: [ + 'plugin:react/recommended', + 'eslint:recommended', + 'standard-with-typescript' + ], + overrides: [ + { + files: ['*.ts', '*.tsx'], // Your TypeScript files extension + + // As mentioned in the comments, you should extend TypeScript plugins here, + // instead of extending them outside the `overrides`. + // If you don't want to extend any rules, you don't need an `extends` attribute. + extends: [ + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking' + ], + + parserOptions: { + project: ['./tsconfig.json'] // Specify it only for TypeScript files + } + } + ], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + ecmaFeatures: { + jsx: true + } + }, + plugins: [ + 'react' + ], + rules: { + 'no-use-before-define': 'off', + 'max-len': ['error', { code: 120 }], + 'react/react-in-jsx-scope': 'off', + '@typescript-eslint/no-use-before-define': ['error'], + 'react/jsx-indent': ['error', 2] + } +} diff --git a/index.html b/index.html index e0d1c84..aad7fb5 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,20 @@ -