forked from storybookjs/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (42 loc) · 1.16 KB
/
Copy patheslint.config.js
File metadata and controls
44 lines (42 loc) · 1.16 KB
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
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');
const globals = require('globals');
const pluginDocusaurus = require('@docusaurus/eslint-plugin');
module.exports = defineConfig([
{
ignores: [
'.yarn/**',
'**/dist/**',
'packages/react-native/template/**/*',
'packages/react-native/src/rn-host-detect.js',
'packages/react-native/scripts/mocks/**/*',
'**/storybook.requires.ts',
'examples/expo-example/.expo/**/*',
'examples/expo-example/.maestro/**/*',
'docs/build/**/*',
],
},
...expoConfig.map((config) => ({
...config,
ignores: [...(config.ignores || []), 'docs/**/*'],
})),
{
files: ['**/*.spec.js', '**/*.spec.jsx', '**/*.test.js', '**/*.test.jsx'],
languageOptions: {
globals: { ...globals.jest, ...globals.node },
},
},
{
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/array-type': 'off',
},
},
{
files: ['docs/**/*.ts', 'docs/**/*.tsx'],
plugins: {
'@docusaurus': pluginDocusaurus,
},
rules: pluginDocusaurus.configs.recommended.rules,
},
]);