Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added eslint config #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 99 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,100 @@
module.exports = {
"extends": "airbnb-base",
rules:{
"linebreak-style": 0
}
};
"extends": [
"airbnb",
"prettier",
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the package.json, we should additionally enforce the JS version with an engines key. That way it's clear why we are parsing at version 8.

"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"experimentalDecorators": true,
"jsx": true,
"impliedStrict": true,
"classes": true
}
},
"env": {
"browser": true,
"node": true,
},
"rules": {
"no-unused-vars": [
1,
{
"argsIgnorePattern": "res|next|^err"
}
],
"arrow-body-style": [
2,
"as-needed"
],
"no-param-reassign": [
2,
{
"props": false
}
],
"comma-dangle": 0,
"func-names": [0],
"import": 0,
"import/extensions": [1, "never"],
"import/first": 0,
"import/no-absolute-path": 0,
"import/no-named-as-default": 0,
"import/prefer-default-export": 0,
"indent": 0,
"linebreak-style": ["error", "unix"],
"no-bitwise": ["error", {
"allow": ["~"]
}],
"no-console": "off",
"no-return-assign": [0],
"no-underscore-dangle": [2, {
"allow": ["_id"]
}],
"no-use-before-define": 0,
"object-curly-newline": 0,
"space-before-function-paren": 0,
"semi": ["error", "always"],
"max-len": 0,
"radix": 0,
"no-shadow": [2, {
"hoist": "all",
"allow": [
"resolve",
"reject",
"done",
"next",
"err",
"error"
]
}],
"quotes": [2, "single", {
"avoidEscape": true,
"allowTemplateLiterals": true
}],
"prettier/prettier": ["error", {
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 120
}],
"jsx-a11y/href-no-hash": "off",
"jsx-a11y/anchor-is-valid": ["warn", {
"aspects": [
"invalidHref"
]
}]
},
"globals": {
"jest": true,
"test": true,
"expect": true,
"describe": true,
"beforeEach": true,
"afterEach": true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to add in beforeEach and describe?

},
"plugins": [
"prettier"
]
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
## Interested in Contributing?

We'd love to have you! See [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to get started. As a bonus, all active contributors (1 commit per month) receive any of our [fit.Start](https://devlifts.io/join/fitStart) plans for free. 💪


## API Start up

`npm install` && `npm start`

API runs on PORT 3000
Loading