Skip to content

Commit 90a88dd

Browse files
committed
config for formatters
1 parent 8989d4f commit 90a88dd

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed

.babelrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"presets": [
3+
"next/babel"
4+
],
5+
"plugins": [
6+
"transform-flow-strip-types",
7+
"babel-plugin-root-import",
8+
["styled-components", { "ssr": true }]
9+
]
10+
}

.eslintrc

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"parser": "babel-eslint",
3+
"env": {
4+
"browser": true,
5+
"node": true,
6+
"jest/globals": true
7+
},
8+
"extends": [
9+
"airbnb",
10+
"prettier",
11+
"prettier/flowtype",
12+
"prettier/react",
13+
"plugin:flowtype/recommended"
14+
],
15+
"plugins": ["jest", "flowtype", "jsdoc"],
16+
"rules": {
17+
"import/no-unresolved": "off",
18+
"import/extensions": "error",
19+
"import/no-named-as-default": "error",
20+
"import/no-amd": "error",
21+
"import/no-named-default": "error",
22+
"import/order": [
23+
1,
24+
{
25+
groups: [
26+
"builtin",
27+
["external", "internal"],
28+
"parent",
29+
["sibling", "index"],
30+
],
31+
},
32+
],
33+
"jest/no-disabled-tests": "warn",
34+
"jest/no-focused-tests": "error",
35+
"jest/no-identical-title": "error",
36+
"jest/prefer-to-have-length": "warn",
37+
"jest/valid-expect": "error",
38+
"flowtype/boolean-style": [
39+
2,
40+
"boolean"
41+
],
42+
"flowtype/define-flow-type": 1,
43+
"flowtype/generic-spacing": [
44+
2,
45+
"never"
46+
],
47+
"flowtype/no-mixed": 2,
48+
"flowtype/no-primitive-constructor-types": 2,
49+
"flowtype/no-types-missing-file-annotation": 2,
50+
"flowtype/no-weak-types": 2,
51+
"flowtype/object-type-delimiter": [
52+
2,
53+
"comma"
54+
],
55+
"flowtype/require-parameter-type": 2,
56+
"flowtype/require-readonly-react-props": 0,
57+
"flowtype/require-return-type": [
58+
2,
59+
"always",
60+
{
61+
"annotateUndefined": "never"
62+
}
63+
],
64+
"flowtype/require-valid-file-annotation": 2,
65+
"flowtype/semi": [
66+
2,
67+
"always"
68+
],
69+
"flowtype/space-after-type-colon": [
70+
2,
71+
"always"
72+
],
73+
"flowtype/space-before-generic-bracket": [
74+
2,
75+
"never"
76+
],
77+
"flowtype/space-before-type-colon": [
78+
2,
79+
"never"
80+
],
81+
"flowtype/type-id-match": [
82+
2,
83+
"^([A-Z][a-z0-9]+)+Type$"
84+
],
85+
"flowtype/union-intersection-spacing": [
86+
2,
87+
"always"
88+
],
89+
"flowtype/use-flow-type": 1,
90+
"flowtype/valid-syntax": 1,
91+
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['draft'] }],
92+
},
93+
"settings": {
94+
"flowtype": {
95+
"onlyFilesWithFlowAnnotation": true
96+
}
97+
}
98+
}

.flowconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[ignore]
2+
.*/build/.*
3+
4+
[include]
5+
6+
[libs]
7+
./node_modules/immer/src/immer.js.flow
8+
./flow-typed
9+
10+
[lints]
11+
12+
[options]
13+
module.name_mapper='^~\/\(.*\)$' -> '<PROJECT_ROOT>/\1'
14+
15+
[strict]

.prettierrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parser": "babel",
3+
"trailingComma": "all",
4+
"tabWidth": 2,
5+
"semi": true,
6+
"singleQuote": true,
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"printWidth": 100
10+
}

0 commit comments

Comments
 (0)