-
Notifications
You must be signed in to change notification settings - Fork 0
/
react.js
44 lines (42 loc) · 861 Bytes
/
react.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
const {fileExtensionsWeb, json, jsonComment, jsNode, jsWeb, tsWeb, jsx, tsx} = require('./lib')
const tsConfigPatterns = ['tsconfig.json', 'tsconfig.*.json']
const configJSPatterns = ['.*rc.js', '*.config.js']
module.exports = {
root: true, // do not load `.eslintrc.*` files in parent folders up to the root directory
overrides: [
{
files: ['*.json'],
excludedFiles: tsConfigPatterns,
...json,
},
{
files: tsConfigPatterns,
...jsonComment,
},
{
files: configJSPatterns,
...jsNode,
},
{
files: ['*.js'],
excludedFiles: configJSPatterns,
...jsWeb,
},
{
files: ['*.ts'],
...tsWeb,
},
{
files: ['*.jsx'],
...jsx,
},
{
files: ['*.tsx'],
...tsx,
},
],
ignorePatterns: [
'node_modules',
...fileExtensionsWeb.map((ext) => `!.*${ext}`), // ignore dot folders but not dot files
],
}