-
-
Notifications
You must be signed in to change notification settings - Fork 564
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a41a81b
commit 66d2a19
Showing
4 changed files
with
7 additions
and
13 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/*! eslint-config-standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
module.exports = require('./eslintrc.json') | ||
module.exports = require('./.eslintrc.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
const eslint = require('eslint') | ||
const { ESLint } = require('eslint') | ||
const test = require('tape') | ||
|
||
test('load config in eslint to validate all rule syntax is correct', function (t) { | ||
const CLIEngine = eslint.CLIEngine | ||
|
||
const cli = new CLIEngine({ | ||
useEslintrc: false, | ||
configFile: 'eslintrc.json' | ||
}) | ||
|
||
test('load config in eslint to validate all rule syntax is correct', async function (t) { | ||
const eslint = new ESLint() | ||
const code = 'const foo = 1\nconst bar = function () {}\nbar(foo)\n' | ||
|
||
t.equal(cli.executeOnText(code).errorCount, 0) | ||
const [lintResult] = await eslint.lintText(code) | ||
t.equal(lintResult.errorCount, 0) | ||
t.end() | ||
}) |