2021-01-17 12:54:49 -08:00
|
|
|
module.exports = {
|
|
|
|
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
|
|
|
|
extends: [
|
2023-11-28 00:45:21 +08:00
|
|
|
'airbnb',
|
2021-01-17 12:54:49 -08:00
|
|
|
'airbnb-typescript',
|
|
|
|
'airbnb/hooks',
|
2023-11-28 00:45:21 +08:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
2024-01-03 17:16:16 -05:00
|
|
|
'plugin:vitest/recommended',
|
2021-01-17 12:54:49 -08:00
|
|
|
'prettier',
|
|
|
|
],
|
2024-03-26 17:18:54 -07:00
|
|
|
plugins: ['@typescript-eslint', 'react-refresh'],
|
2021-01-17 12:54:49 -08:00
|
|
|
parserOptions: {
|
2021-05-28 02:23:09 +08:00
|
|
|
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
|
2021-01-17 12:54:49 -08:00
|
|
|
sourceType: 'module', // Allows for the use of imports
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true, // Allows for the parsing of JSX
|
|
|
|
},
|
|
|
|
project: './tsconfig.json',
|
|
|
|
},
|
|
|
|
rules: {
|
2023-11-28 00:45:21 +08:00
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
|
|
'arrow-body-style': 'off',
|
|
|
|
'class-methods-use-this': 'off',
|
|
|
|
'import/no-extraneous-dependencies': 'off',
|
2021-01-17 12:54:49 -08:00
|
|
|
'import/prefer-default-export': 'off', // TODO: remove this lint rule
|
2023-11-28 00:45:21 +08:00
|
|
|
'no-console': 'off',
|
2021-01-25 13:29:23 -08:00
|
|
|
'no-plusplus': 'off',
|
2021-02-05 14:21:04 -08:00
|
|
|
'no-prototype-builtins': 'off',
|
2023-11-28 00:45:21 +08:00
|
|
|
'no-restricted-exports': ['off', { restrictedNamedExports: ['default', 'then'] }],
|
2021-03-05 17:05:03 -08:00
|
|
|
'no-underscore-dangle': 'off',
|
2023-11-28 00:45:21 +08:00
|
|
|
'no-unsafe-optional-chaining': 'off',
|
|
|
|
'prefer-exponentiation-operator': 'off',
|
|
|
|
'prefer-regex-literals': 'off',
|
|
|
|
'react/destructuring-assignment': 'off',
|
|
|
|
'react/function-component-definition': 'off',
|
|
|
|
'react/jsx-no-bind': 'off',
|
|
|
|
'react/jsx-no-constructed-context-values': 'off',
|
|
|
|
'react/jsx-no-useless-fragment': 'off',
|
|
|
|
'react/jsx-props-no-spreading': 'off',
|
|
|
|
'react/no-unstable-nested-components': 'off',
|
|
|
|
'react/require-default-props': 'off',
|
2021-01-25 13:29:23 -08:00
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
varsIgnorePattern: '^_',
|
|
|
|
argsIgnorePattern: '^_',
|
|
|
|
},
|
|
|
|
],
|
2024-01-03 17:16:16 -05:00
|
|
|
'vitest/prefer-to-be': 'off',
|
2024-02-15 08:58:05 -05:00
|
|
|
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false }],
|
2024-08-19 20:47:07 -07:00
|
|
|
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
2021-01-17 12:54:49 -08:00
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
react: {
|
|
|
|
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
|
|
|
|
},
|
|
|
|
},
|
2025-01-29 20:42:01 -05:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['src/app/searchV2/**/*.tsx', 'src/app/entityV2/**/*.tsx'],
|
|
|
|
rules: {
|
|
|
|
'import/no-cycle': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-01-17 12:54:49 -08:00
|
|
|
};
|