Skip to content

Commit

Permalink
use the right name for filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Oct 1, 2024
1 parent 9143ab0 commit e45eddc
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 e45eddc

Please sign in to comment.