You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,3 +20,37 @@ We have a configuration for jsdoc rules that you can use if your team decides th
20
20
"@fs/eslint-config-frontier-react/jsdoc"
21
21
],
22
22
```
23
+
24
+
## CodeClimate Usage
25
+
26
+
It is important to note that in order for CodeClimate to use this custom config, we have to work around their limitations a bit.
27
+
28
+
1. Add a prepare section to your .codeclimate.yml that will download this eslint-config file. [Prepare Docs](https://docs.codeclimate.com/docs/configuring-the-prepare-step)
- If you also opt into the jsdoc plugin we provide, you'll also need to make a prepare statement for that file.
37
+
2. Make a new eslintrc file for codeclimate to use (that way it can point to the `eslint-config-frontier-react.js` file that codeclimate will prepare in Step 1.)
38
+
39
+
1. Copy your existing local eslintrc file and rename the copy to `.codeclimate.eslintrc.js` (or .json or .yml if you are using those filetypes)
40
+
2. Change the `"extends": ["frontier"]` statement to point to the prepared file from Step 1. `"extends": ["./eslint-config-frontier-react.js"]`
41
+
(only do this in `.codeclimate.eslintrc.js` file, not your normal eslintrc)
42
+
- If you also opt into the jsdoc plugin we provide, you'll also need to add that downloaded file to the extends array
43
+
44
+
3. Tweak your .codeclimate.yml eslint section to point to the .codeclimate.eslintrc file instead of your default local eslintrc file
45
+
- Your plugin section in your .codeclimate.yml may be larger and more complicated, but the `config:` part should point to the new eslintrc file you made in step 2.
46
+
```yaml
47
+
plugins:
48
+
eslint:
49
+
channel: eslint-4
50
+
config: # <- This line and the line below it are the important lines to add/tweak
51
+
config: .codeclimate.eslintrc.js # <- this line and the line above it are the important lines to add/tweak
0 commit comments