mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
49 lines
1.3 KiB
JavaScript
49 lines
1.3 KiB
JavaScript
import tseslint from 'typescript-eslint';
|
|
import callstackConfig from '@callstack/eslint-config/react-native.flat.js';
|
|
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
import jest from 'eslint-plugin-jest';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['build/', 'experiments-rtl/', 'website/', 'eslint.config.mjs', 'jest-setup.ts'],
|
|
},
|
|
...callstackConfig,
|
|
...tseslint.configs.strict,
|
|
{
|
|
plugins: {
|
|
'simple-import-sort': simpleImportSort,
|
|
},
|
|
rules: {
|
|
'simple-import-sort/imports': [
|
|
'error',
|
|
{
|
|
groups: [['^\\u0000', '^react', '^@?\\w', '^'], ['^\\.']],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
'no-console': 'error',
|
|
'import/order': 'off',
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.test.{ts,tsx}', 'src/test-utils/**'],
|
|
plugins: {
|
|
jest: jest,
|
|
},
|
|
rules: {
|
|
'react/no-multi-comp': 'off',
|
|
'react-native/no-color-literals': 'off',
|
|
'react-native/no-inline-styles': 'off',
|
|
'react-native/no-raw-text': 'off',
|
|
'react-native-a11y/has-valid-accessibility-descriptors': 'off',
|
|
'react-native-a11y/has-valid-accessibility-ignores-invert-colors': 'off',
|
|
'react-native-a11y/has-valid-accessibility-value': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
},
|
|
},
|
|
];
|