Skip to content

Commit

Permalink
Update dependency readdirp to v4 (#570)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Karl Horky <[email protected]>
  • Loading branch information
renovate[bot] and karlhorky authored Aug 29, 2024
1 parent 09cddd4 commit ac3f8ae
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"listr2": "8.2.4",
"node-fetch": "3.3.2",
"p-reduce": "3.0.0",
"readdirp": "3.6.0",
"readdirp": "4.0.1",
"semver": "7.6.3",
"top-user-agents": "2.1.22"
},
Expand Down
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/checks/eslintConfigIsValid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ 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.basename),
fileFilter: (file) => /\.(?:js|jsx|ts|tsx)$/.test(file.basename),
})) {
const fileContents = await fs.readFile(path, 'utf-8');
if (/eslint-disable|eslint [a-z0-9@/-]+: (0|off)/.test(fileContents)) {
Expand Down
10 changes: 6 additions & 4 deletions src/checks/stylelintConfigIsValid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export default config;`;
const stylelintDisableOccurrences = [];

for await (const { path } of readdirp('.', {
directoryFilter: ['!.git', '!.next', '!node_modules'],
fileFilter: supportedStylelintFileExtensions.map(
(fileExtension) => `*.${fileExtension}`,
),
directoryFilter: (dir) =>
!['.git', '.next', 'node_modules'].includes(dir.basename),
fileFilter: (file) =>
new RegExp(`\\.(?:${supportedStylelintFileExtensions.join('|')})$`).test(
file.basename,
),
})) {
const fileContents = await fs.readFile(path, 'utf-8');
if (fileContents.includes('stylelint-disable')) {
Expand Down

0 comments on commit ac3f8ae

Please sign in to comment.