Skip to content

Commit

Permalink
Merge pull request #19 from dustinspecker/greenkeeper-eslint-2.0.0
Browse files Browse the repository at this point in the history
Update eslint to version 2.0.0 🚀
  • Loading branch information
dustinspecker committed Feb 13, 2016
2 parents deb13e9 + 34db3ed commit 23e4ffe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"babel-preset-es2015": "^6.0.12",
"babel-register": "^6.3.13",
"coveralls": "^2.11.2",
"eslint": "^1.10.3",
"eslint": "^2.0.0",
"eslint-plugin-new-with-error": "^1.1.0",
"eslint-plugin-no-use-extend-native": "^0.3.1",
"is-plain-obj": "^1.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/esnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ const config = require('./')

config.env.es6 = true

config.parserOptions = {
ecmaVersion: 6,
sourceType: 'module'
}

config.ecmaFeatures = {
arrowFunctions: true,
binaryLiterals: false,
Expand All @@ -13,7 +18,6 @@ config.ecmaFeatures = {
forOf: true,
generators: true,
globalReturn: false,
modules: true,
objectLiteralComputedProperties: true,
objectLiteralDuplicateProperties: false,
objectLiteralShorthandMethods: true,
Expand Down
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
afterColon: true,
beforeColon: false
}],
'keyword-spacing': [2, {"after": true, "before": true}],
'linebreak-style': [2, 'unix'],
'lines-around-comment': 0,
'max-depth': 2,
Expand Down Expand Up @@ -72,7 +73,6 @@ module.exports = {
'no-else-return': 2,
'no-empty': 2,
'no-empty-character-class': 2,
'no-empty-label': 2,
'no-empty-pattern': 2,
'no-eq-null': 2,
'no-eval': 2,
Expand Down Expand Up @@ -175,15 +175,13 @@ module.exports = {
before: false
}],
'sort-vars': 0,
'space-after-keywords': [2, 'always'],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, {
anonymous: 'always',
named: 'never'
}],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-return-throw-case': 2,
'space-unary-ops': [2, {
nonwords: false,
words: true
Expand Down
4 changes: 3 additions & 1 deletion src/jsx.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const config = require('./esnext')

config.ecmaFeatures.jsx = true
config.parserOptions.ecmaFeatures = {
jsx: true
}

config.env.browser = true

Expand Down
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ test('index should have rules', t => {

test('esnext should es6 env', t => {
t.ok(esnext.env.es6)
t.ok(esnext.parserOptions.ecmaVersion, 6)
})

test('esnext should have ecmaFeatures', t => {
Expand All @@ -25,5 +26,5 @@ test('jsx should have browser env', t => {
})

test('jsx should have jsx ecmaFeature', t => {
t.ok(jsx.ecmaFeatures.jsx)
t.ok(jsx.parserOptions.ecmaFeatures.jsx)
})

0 comments on commit 23e4ffe

Please sign in to comment.