Skip to content

Commit

Permalink
Switch to filter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhorky authored Aug 29, 2024
1 parent 656ffbf commit 2e2a984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/checks/eslintConfigIsValid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export default async function eslintConfigIsValid() {
const eslintDisableOccurrences = [];

for await (const { path } of readdirp('.', {
directoryFilter: ['!.git', '!.next', '!node_modules'],
fileFilter: ['*.js', '*.jsx', '*.ts', '*.tsx'],
directoryFilter: (dir) => !['.git', '.next', 'node_modules'].includes(dir),
fileFilter: (file) => /\.(?:js|jsx|ts|tsx)/.test(file),
})) {
const fileContents = await fs.readFile(path, 'utf-8');
if (/eslint-disable|eslint [a-z0-9@/-]+: (0|off)/.test(fileContents)) {
Expand Down

0 comments on commit 2e2a984

Please sign in to comment.