Skip to content

Commit

Permalink
fix: normalize opts.filename to posix
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl committed Apr 2, 2017
1 parent eb3500f commit 96eec35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -5,6 +5,7 @@ const globby = require('globby');
const isEqual = require('lodash.isequal');
const multimatch = require('multimatch');
const arrify = require('arrify');
const slash = require('slash');
const optionsManager = require('./options-manager');

exports.lintText = (str, opts) => {
Expand All @@ -30,7 +31,7 @@ exports.lintText = (str, opts) => {
if (opts.filename) {
const filename = path.relative(opts.cwd, opts.filename);
const isIgnored = multimatch(filename, opts.ignores).length > 0;
const isGitIgnored = !optionsManager.getGitIgnoreFilter(opts)(opts.filename);
const isGitIgnored = !optionsManager.getGitIgnoreFilter(opts)(slash(opts.filename));

if (isIgnored || isGitIgnored) {
return {
Expand Down

0 comments on commit 96eec35

Please sign in to comment.