mirror of
https://github.com/logos-messaging/OpChan.git
synced 2026-01-04 22:03:07 +00:00
48 lines
1.1 KiB
JavaScript
48 lines
1.1 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
env: {
|
|
node: true,
|
|
browser: true,
|
|
es2020: true,
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
project: './tsconfig.json',
|
|
},
|
|
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
rules: {
|
|
'react/react-in-jsx-scope': 'off', // Not needed with React 17+
|
|
'react/prop-types': 'off', // Using TypeScript for prop validation
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
'no-unused-vars': 'off', // Turn off base rule
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
|
|
// General rules
|
|
'no-console': 'warn',
|
|
'prefer-const': 'error',
|
|
'no-var': 'error',
|
|
'object-shorthand': 'error',
|
|
'prefer-template': 'error',
|
|
},
|
|
ignorePatterns: [
|
|
'dist/',
|
|
'node_modules/',
|
|
'*.js',
|
|
'*.d.ts',
|
|
],
|
|
};
|