mirror of
https://github.com/luxexchange/eslint-config.git
synced 2026-10-30 18:13:47 +00:00
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
const biomeSupportedRules = require('./biome-supported')
|
|
const { reactNative: reactNativeImports } = require('@luxfi/eslint-config/restrictedImports')
|
|
|
|
module.exports = {
|
|
extends: [require.resolve('./base.js')],
|
|
env: {
|
|
browser: true,
|
|
node: false,
|
|
},
|
|
plugins: ['react', 'react-hooks', 'no-relative-import-paths', 'local-rules'],
|
|
ignorePatterns: ['**/__generated__/'],
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
rules: {
|
|
// Disable all ESLint rules that have been migrated to Biome
|
|
...biomeSupportedRules,
|
|
'react/react-in-jsx-scope': 'off',
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['*.ts', '*.tsx'],
|
|
excludedFiles: ['functions/**'],
|
|
rules: {
|
|
'import/no-unused-modules': ['error', { unusedExports: true }],
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
excludedFiles: ['**/*.native.*', '**/*.ios.*', '**/*.android.*'],
|
|
rules: {
|
|
'@typescript-eslint/no-restricted-imports': ['error', reactNativeImports],
|
|
},
|
|
},
|
|
],
|
|
}
|