48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
module.exports = {
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaVersion: 2021,
|
|
sourceType: 'module',
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:react/recommended',
|
|
'plugin:react-hooks/recommended',
|
|
],
|
|
env: {
|
|
browser: true,
|
|
es2021: true,
|
|
node: true,
|
|
jest: true,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
ignorePatterns: [
|
|
'.eslintrc.js',
|
|
'babel.config.js',
|
|
'metro.config.js',
|
|
'node_modules',
|
|
'.expo',
|
|
],
|
|
rules: {
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/prop-types': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_' },
|
|
],
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
},
|
|
};
|