Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function AppContent() {
useAuthState();

useEffect(() => {
hydrateLocale();
hydrateTheme();
void hydrateLocale();
void hydrateTheme();
}, []);

return <RootNavigator />;
Expand Down
2 changes: 1 addition & 1 deletion frontend/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ExpoConfig, ConfigContext } from "expo/config";
import type { ExpoConfig, ConfigContext } from "expo/config";

export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
Expand Down
106 changes: 106 additions & 0 deletions frontend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import js from '@eslint/js';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import reactNativePlugin from 'eslint-plugin-react-native';

export default [
{
ignores: [
'node_modules/**',
'.expo/**',
'.expo-shared/**',
'dist/**',
'build/**',
'*.log',
],
},
js.configs.recommended,
// Config files (CommonJS)
{
files: ['*.config.js', '*.config.ts'],
languageOptions: {
globals: {
require: 'readonly',
module: 'readonly',
process: 'readonly',
__dirname: 'readonly',
exports: 'readonly',
},
},
},
// TypeScript/React Native files
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
},
globals: {
__DEV__: 'readonly',
React: 'readonly',
JSX: 'readonly',
require: 'readonly',
module: 'readonly',
process: 'readonly',
__dirname: 'readonly',
atob: 'readonly',
btoa: 'readonly',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
'react-native': reactNativePlugin,
},
rules: {
...tsPlugin.configs.recommended.rules,
...reactPlugin.configs.recommended.rules,
...reactHooksPlugin.configs.recommended.rules,

// TypeScript
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/explicit-module-boundary-types': 'warn',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-misused-promises': 'error',

// React
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',

// React Native
'react-native/no-unused-styles': 'error',
'react-native/no-inline-styles': 'warn',

// General
'no-console': ['error', { allow: ['warn', 'error'] }],
'prefer-const': 'error',
'no-var': 'error',
'eqeqeq': ['error', 'always'],
'no-implicit-coercion': 'error',
'no-return-await': 'error',
'require-await': 'error',
},
settings: {
react: {
version: 'detect',
},
},
},
];
Loading
Loading