Skip to content

Commit

Permalink
Merge pull request #12 from AfterShip/master
Browse files Browse the repository at this point in the history
Only enable env browser for front-end project
  • Loading branch information
foray1010 committed Jan 8, 2016
2 parents 0fe51ea + a3d642e commit 0fc3923
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Z for removing rules/options (more loose)
}
```

If your repo use `React`, you should extends `aftership/react` instead, you also need to `npm install --save-dev eslint-plugin-react`
If your repo is a front-end project using babel.js, you should extends `aftership/react` instead, you also need to `npm install --save-dev eslint-plugin-react`

```json
{
Expand Down
3 changes: 3 additions & 0 deletions aftership.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

module.exports = {
env: {
// most of our project is back-end project
browser: false,

// recognize the predefined variables of mocha
mocha: true
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-config-aftership",
"description": "AfterShip ESLint config (modified from Airbnb)",
"version": "1.10.0",
"version": "1.10.1",
"homepage": "https://github.com/AfterShip/eslint-config-aftership",
"author": {
"name": "AfterShip",
Expand Down
3 changes: 3 additions & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module.exports = extendConfig({
'eslint-config-airbnb',
'eslint-config-aftership/aftership'
],
env: {
browser: true
},
rules: {
// Use tab instead of 2 space when indenting jsx properties
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
Expand Down

0 comments on commit 0fc3923

Please sign in to comment.