Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Updated for ESLint 1.0 #7

Merged
merged 1 commit into from
Aug 5, 2015
Merged
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
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,18 @@ Finally enable all the rules you like to use (remember to disable the originals
```json
{
"rules": {
"babel/block-scoped-var": 1,
"babel/object-shorthand": 1,
"babel/generator-star": 1,
"babel/generator-star-spacing": 1,
"babel/new-cap": 1,
"babel/object-curly-spacing": 1,
"babel/space-in-brackets": 1,
"babel/object-shorthand": 1,
}
}
```
### Rules

Each rule cooresponds to a core eslint rule, and has the same options.

- `babel/block-scoped-var`: doesn't complain about `export x from "mod";` or `export * as x from "mod";`
- `babel/object-shorthand`: doesn't fail when using object spread (`...obj`)
- `babel/generator-star`: Handles async/await functions correctly
- `babel/generator-star-spacing`: Handles async/await functions correctly
- `babel/new-cap`: Ignores capitalized decorators (`@Decorator`)
- `babel/object-curly-spacing`: doesn't complain about `export x from "mod";` or `export * as x from "mod";`
- `babel/space-in-brackets`: doesn't complain about `export x from "mod";` or `export * as x from "mod";`
- `babel/object-shorthand`: doesn't fail when using object spread (`...obj`)
11 changes: 3 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

module.exports = {
rules: {
'block-scoped-var': require('./rules/block-scoped-var'),
'object-shorthand': require('./rules/object-shorthand'),
'generator-star-spacing': require('./rules/generator-star-spacing'),
'generator-star': require('./rules/generator-star'),
'new-cap': require('./rules/new-cap'),
'object-curly-spacing': require('./rules/object-curly-spacing'),
'space-in-brackets': require('./rules/space-in-brackets'),
'object-shorthand': require('./rules/object-shorthand'),
},
rulesConfig: {
'block-scoped-var': 0,
'generator-star-spacing': 0,
'generator-star': 0,
'object-shorthand': 0,
'new-cap': 0,
'space-in-brackets': 0
'object-curly-spacing': 0,
'object-shorthand': 0,
}
};
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@
},
"homepage": "https://github.com/babel/eslint-plugin-babel#readme",
"peerDependencies": {
"eslint": ">=0.8.0 || >=1.0.0-rc-1"
"eslint": ">=1.0.0"
},
"devDependencies": {
"babel-eslint": "^3.1.17",
"eslint": "^0.23.0",
"eslint-tester": "^0.8.0",
"babel-eslint": "^4.0.5",
"eslint": "^1.0.0",
"is-my-json-valid": "^2.12.0",
"mocha": "^2.2.5",
"phantomjs": "^1.9.17"
Expand Down
Loading