Skip to content

Commit

Permalink
add test to validate eslintrc.json rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Flet committed Aug 3, 2015
1 parent 1e4165b commit f9280e5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -15,6 +15,8 @@
"eslint-plugin-standard": "^1.1.0"
},
"devDependencies": {
"eslint": "^1.0.0",
"eslint-plugin-standard": "^1.1.0",
"tape": "^4.0.0"
},
"homepage": "https://github.com/feross/eslint-config-standard",
Expand Down
13 changes: 13 additions & 0 deletions test/validate-config.js
@@ -0,0 +1,13 @@
var test = require('tape')

test('load config in eslint to validate all rule syntax is correct', function (t) {
var CLIEngine = require('eslint').CLIEngine

var cli = new CLIEngine({
useEslintrc: false,
configFile: 'eslintrc.json'
})

t.ok(cli.executeOnText('var foo\n'))
t.end()
})

0 comments on commit f9280e5

Please sign in to comment.