Skip to content

Commit

Permalink
Move config to lib
Browse files Browse the repository at this point in the history
Add ember.js config at lib/ember fixes #3
Update README
  • Loading branch information
tribou committed Jul 9, 2016
1 parent 55a03bd commit 3bd9750
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 29 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ Then add the following to your `.eslintrc`:
]
}
```

#### EmberJS

Use this `.eslintrc`:

```json
{
"extends": [
"tribou/lib/ember"
]
}
```
29 changes: 1 addition & 28 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1 @@
module.exports = {
"extends": [
"eslint-config-airbnb",
"eslint-config-standard"
],
"parser": "babel-eslint",
"plugins": [
"flow-vars"
],
"rules": {
"strict": 0,
"arrow-body-style": [2, "always"],
"arrow-parens": [2, "always"],
"brace-style": [2, "stroustrup"],
"comma-dangle": [2, "always-multiline"],
"flow-vars/define-flow-type": 1,
"flow-vars/use-flow-type": 1,
"max-len": [2, {
"code": 80,
"tabWidth": 2,
"ignoreUrls": true
}],
"operator-linebreak": [2, "before"],
"no-multiple-empty-lines": [2, { "max": 2, "maxEOF": 0 }],
"no-underscore-dangle": [0],
"padded-blocks": [2, "always"]
}
}
module.exports = require('./lib/defaults.js')
28 changes: 28 additions & 0 deletions lib/defaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
extends: [
'eslint-config-airbnb',
'eslint-config-standard'
],
parser: 'babel-eslint',
plugins: [
'flow-vars'
],
rules: {
strict: 0,
'arrow-body-style': [2, 'always'],
'arrow-parens': [2, 'always'],
'brace-style': [2, 'stroustrup'],
'comma-dangle': [2, 'always-multiline'],
'flow-vars/define-flow-type': 1,
'flow-vars/use-flow-type': 1,
'max-len': [2, {
code: 80,
tabWidth: 2,
ignoreUrls: true
}],
'operator-linebreak': [2, 'before'],
'no-multiple-empty-lines': [2, { max: 2, maxEOF: 0 }],
'no-underscore-dangle': [0],
'padded-blocks': [2, 'always']
}
}
11 changes: 11 additions & 0 deletions lib/ember.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict'
const config = require('./defaults.js')

config.env = {
browser: true,
jquery: true,
}
config.rules['import/no-unresolved'] = [0]
config.rules['no-underscore-dangle'] = [2, { allowAfterThis: true }]

module.exports = config
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "eslint-config-tribou",
"version": "1.7.1",
"description": "Start with JS Standard Style but push towards better readability, git-awareness, and React and ES6 best practices",
"main": "index.js",
"main": "src/index.js",
"scripts": {
"postpublish": "git push && git push --tags",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit 3bd9750

Please sign in to comment.