Skip to content

Commit

Permalink
fix(rule): use node.lang for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Jul 19, 2016
1 parent 35a89da commit 3833d55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/textlint-rule-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const reporter = (context, options) => {
const filePath = context.getFilePath();
const textlintRcFilePath = context.config ? context.config.configFile : null;
const textlintRCDir = textlintRcFilePath ? path.dirname(textlintRcFilePath) : process.cwd();
const extname = filePath ? path.extname(filePath) : undefined;
const ESLintOptions = {
configFile: path.resolve(textlintRCDir, options.configFile)
};
Expand All @@ -29,7 +28,7 @@ const reporter = (context, options) => {
}
const raw = getSource(node);
const code = node.value;
const resultLinting = engine.executeOnText(code, extname);
const resultLinting = engine.executeOnText(code, node.lang);
if (resultLinting.errorCount === 0) {
return;
}
Expand Down

0 comments on commit 3833d55

Please sign in to comment.