Skip to content

Commit

Permalink
Merge pull request #28 from mansona/fix-filter
Browse files Browse the repository at this point in the history
use the right name for filter
  • Loading branch information
mansona authored Oct 1, 2024
2 parents 9143ab0 + e45eddc commit c12b9f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ function list(cwd = process.cwd()) {
return output;
}

function remove({name, glob} = {}, cwd = process.cwd()) {
function remove({name, filter} = {}, cwd = process.cwd()) {
if (!name) {
throw new Error('No rulename was passed to `remove()` in lint-to-the-future-eslint plugin');
}

const files = getFiles(cwd, glob);
const files = getFiles(cwd, filter);

files.forEach((relativeFilePath) => {
removeIgnore(join(cwd, relativeFilePath), name);
Expand Down
2 changes: 1 addition & 1 deletion test/remove.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ console.log('hello bananananana!');`,
console.log('hello world');`,
});

remove({ name: 'face-lint', glob: 't*.js' }, project.baseDir);
remove({ name: 'face-lint', filter: 't*.js' }, project.baseDir);

expect(readFileSync(join(project.baseDir, 'test.js'), 'utf-8')).to
.equal(`/* eslint-disable other-lint */
Expand Down

0 comments on commit c12b9f2

Please sign in to comment.