-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
48 lines (46 loc) · 1.18 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// @ts-check
const { defineConfig } = require('eslint-define-config');
module.exports = defineConfig({
extends: [
// see source: https://github.com/bamlab/react-native-project-config/blob/main/packages/eslint-plugin/lib/configs/recommended.js
'plugin:@bam.tech/recommended',
'plugin:import/typescript',
],
plugins: ['import'],
settings: {
'import/resolver': {
typescript: true,
node: true,
},
},
overrides: [
{
// test files
files: ['**/*.test.ts', '**/*.test.tsx', '__mocks__/**', '**/jest-*'],
extends: 'plugin:@bam.tech/tests',
rules: {
'jest/no-restricted-matchers': [
'error',
{
toMatchSnapshot:
'Use toMatchComponentSnapshot for components and toMatchInlineSnapshot otherwise',
},
],
},
},
{
// config files that use CommonJS
files: [
'.eslintrc.js',
'babel.config.js',
'jest.config.js',
'prettier.config.js',
'app.config.js',
],
rules: {
'testing-library/no-await-sync-events': 'error',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
});