Skip to content

Commit b917937

Browse files
davehentonmrchief
authored andcommitted
style: Create .codeclimate.yml (#74)
1 parent efceffa commit b917937

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.codeclimate.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
version: "2" # required to adjust maintainability checks
2+
checks:
3+
argument-count:
4+
config:
5+
threshold: 4
6+
complex-logic:
7+
config:
8+
threshold: 4
9+
file-lines:
10+
config:
11+
threshold: 250
12+
method-complexity:
13+
config:
14+
threshold: 5
15+
method-count:
16+
config:
17+
threshold: 20
18+
method-lines:
19+
config:
20+
threshold: 25
21+
nested-control-flow:
22+
config:
23+
threshold: 4
24+
return-statements:
25+
config:
26+
threshold: 4
27+
similar-code:
28+
config:
29+
threshold: # language-specific defaults. an override will affect all languages.
30+
identical-code:
31+
config:
32+
threshold: # language-specific defaults. an override will affect all languages.
33+
plugins:
34+
eslint:
35+
enabled: true
36+
channel: "eslint-4"
37+
exclude_patterns:
38+
- "docs/"
39+
- "snapshots/"
40+
- "**/node_modules/"
41+
- "**/*.test.js"

.eslintrc.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"parserOptions": {
3+
"ecmaFeatures": {
4+
"jsx": true
5+
}
6+
},
27
"parser": "babel-eslint",
38
"extends": "airbnb",
49
"plugins": ["react", "jsx-a11y", "import"],
@@ -45,7 +50,15 @@
4550
"no-plusplus": 0,
4651
"no-shadow": 0,
4752
"no-unused-expressions": [2, { "allowShortCircuit": true }],
48-
"object-curly-newline": 0,
53+
"object-curly-newline": [
54+
"error",
55+
{
56+
"ObjectExpression": { "multiline": true, "minProperties": 3 },
57+
"ObjectPattern": { "multiline": true, "minProperties": 3 },
58+
"ImportDeclaration": { "multiline": true, "minProperties": 3 },
59+
"ExportDeclaration": { "multiline": true, "minProperties": 3 }
60+
}
61+
],
4962
"react/forbid-prop-types": 0,
5063
"react/require-default-props": 0,
5164
"react/jsx-filename-extension": [

0 commit comments

Comments
 (0)