This repo has a special branch called "artifactory-publish" that publishes to artifactory. Any changes to the master branch should be merged into the artifactory-publish branch as well as the version bumped so a new version will get published.
If you are looking for our eslint-config for react, that is located at eslint-config-frontier-react
- A common ESLint configuration for frontier apps to base off of. The rules were gathered and polled from many of the frontend teams, and a concensus was made for this base configuration. If your team would like to overwrite the rules as you see fit you are free to, but please use your best judgement.
- This config basically covers only eslint rules, but we also set some parserOptions:
{ ecmaVersion: 8 }, env: { es6: true }
by default. - You will still probably need to specify additional parserOptions in your eslintrc, like envs of node:true or browser:true, etc.
- Run
npm install fs-webdev/eslint-config-frontier --save-dev
- Add
"extends": ["frontier"]
to your eslint config.
We have a configuration for jsdoc rules that you can use if your team decides they want to be more consistent with jsdocs
- Add a new entry to the
extends
field of your eslint config."extends": [ "eslint-config-frontier", "eslint-config-frontier/jsdoc" ],
It is important to note that in order for CodeClimate to use this custom config, we have to work around their limitations a bit.
-
Add a prepare section to your .codeclimate.yml that will download this eslint-config file. Prepare Docs
- It should look like this
prepare: fetch: - url: 'https://raw.githubusercontent.com/fs-webdev/eslint-config-frontier/master/index.js' path: 'eslint-config-frontier.js'
- If you also opt into the jsdoc plugin we provide, you'll also need to make a prepare statement for that file.
- It should look like this
-
Make a new eslintrc file for codeclimate to use (that way it can point to the
eslint-config-frontier.js
file that codeclimate will prepare in Step 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) - Change the
"extends": ["frontier"]
statement to point to the prepared file from Step 1."extends": ["./eslint-config-frontier.js"]
(only do this in.codeclimate.eslintrc.js
file, not your normal eslintrc)- If you also opt into the jsdoc plugin we provide, you'll also need to add that downloaded file to the extends array
- Copy your existing local eslintrc file and rename the copy to
-
Tweak your .codeclimate.yml eslint section to point to the .codeclimate.eslintrc file instead of your default local eslintrc file
- 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.
plugins: eslint: channel: eslint-4 config: # <- This line and the line below it are the important lines to add/tweak config: .codeclimate.eslintrc.js # <- this line and the line above it are the important lines to add/tweak extensions: - .js - .html enabled: true
- Your plugin section in your .codeclimate.yml may be larger and more complicated, but the