-
Notifications
You must be signed in to change notification settings - Fork 0
/
strict.js
49 lines (44 loc) · 1.29 KB
/
strict.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
49
// @flow
const getCommonConfig = require('./src/getCommonConfig');
const prettierRules = require('./src/extraPrettierRules');
const basePreset = require('./src/presets/base');
const flowtypePreset = require('./src/presets/flowtype');
const jestPreset = require('./src/presets/jest');
const reactPreset = require('./src/presets/react');
const relayPreset = require('./src/presets/relay');
const { ERROR } = require('./src/constants');
/*::
import type { EslintConfig } from './src/EslintConfig.flow';
*/
module.exports = (getCommonConfig(ERROR, {
rules: {
...basePreset.rules,
...flowtypePreset.rules,
...jestPreset.rules,
...reactPreset.rules,
...relayPreset.rules,
...prettierRules,
},
plugins: [
...basePreset.plugins,
...flowtypePreset.plugins,
...jestPreset.plugins,
...reactPreset.plugins,
...relayPreset.plugins,
],
overrides: [
...(basePreset.overrides ?? []),
...(flowtypePreset.overrides ?? []),
...(jestPreset.overrides ?? []),
...(reactPreset.overrides ?? []),
...(relayPreset.overrides ?? []),
],
settings: {
...basePreset.settings,
// $FlowFixMe[exponential-spread]
...flowtypePreset.settings,
...jestPreset.settings,
...reactPreset.settings,
...relayPreset.settings,
},
}) /*: EslintConfig */);