Skip to content

Commit

Permalink
2.0.2: Migrate eslint 1.x config to 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
foray1010 committed Apr 15, 2016
1 parent 768e8d4 commit 6f861ec
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 17 deletions.
14 changes: 6 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ module.exports = extendConfig({
'eslint-config-airbnb/base',
'eslint-config-aftership/rules/main'
],
ecmaFeatures: {
// not stable and require harmony flag to enable
destructuring: false,

// if you want to use jsx, extends "aftership/react"
jsx: false,

parserOptions: {
ecmaFeatures: {
// if you want to use jsx, extends "aftership/react"
jsx: false
},
// we use require() instead of `import ... from ...`
modules: false
sourceType: 'script'
},
rules: {
/*++++++++++++++
Expand Down
4 changes: 0 additions & 4 deletions legacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ module.exports = extendConfig({
'eslint-config-airbnb/legacy',
'eslint-config-aftership/rules/main'
],
ecmaFeatures: {
// ES5 or below don't support `generators`
generators: false
},
rules: {
/*++++++++++++++
+ Strict Mode +
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": "2.0.1",
"version": "2.0.2",
"homepage": "https://github.com/AfterShip/eslint-config-aftership",
"author": {
"name": "AfterShip",
Expand Down
5 changes: 5 additions & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ module.exports = extendConfig({
env: {
browser: true
},
parserOptions: {
ecmaFeatures: {
jsx: 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
4 changes: 0 additions & 4 deletions rules/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ module.exports = {
// recognize the predefined variables of mocha
mocha: true
},
ecmaFeatures: {
// we use generator, a lot
generators: true
},
rules: {
/*++++++++++++++++++
+ Possible Errors +
Expand Down

0 comments on commit 6f861ec

Please sign in to comment.