Ignore nested node_modules and delete postcss#1828
Ignore nested node_modules and delete postcss#1828sapayth merged 2 commits intoweDevsOfficial:developfrom
Conversation
Add an explicit '!**/node_modules/**' ignore pattern in Gruntfile.js so nested node_modules folders are excluded from file sets. Remove modules/user-directory/postcss.config.js (Tailwind + Autoprefixer) as the per-module PostCSS config is no longer required.
WalkthroughUpdates to build tooling: Gruntfile.js broadens the copy task's node_modules exclusion pattern; modules/user-directory/postcss.config.js has its exported PostCSS configuration removed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Simplify Gruntfile.js main.src globs by removing the duplicate '!node_modules/**' entry. The existing '!**/node_modules/**' already excludes node_modules at any depth (including top-level), so this cleans up the pattern list without changing behavior.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Gruntfile.js (1)
1-2:⚠️ Potential issue | 🟡 MinorCI workflow is bypassing PHPCS exclusion patterns for JavaScript files.
The PHPCS configuration already correctly excludes
*.jsfiles via<exclude-pattern>*.js</exclude-pattern>inphpcs.xml. However, the GitHub Actions workflow in.github/workflows/inspections.ymlbypasses this by passing changed files directly to PHPCS on the command line. When files are specified directly, PHPCS doesn't reliably apply exclude patterns.Update the workflow to filter out JavaScript files before passing to PHPCS, or allow PHPCS to scan based on its configuration without explicit file arguments.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Gruntfile.js` around lines 1 - 2, CI is passing changed files directly to PHPCS which bypasses phpcs.xml exclude-patterns (e.g., *.js); update the workflow in .github/workflows/inspections.yml to either (a) filter the changed-files list to remove *.js before calling phpcs, or (b) stop passing file arguments and invoke phpcs with no explicit paths so it uses phpcs.xml excludes; locate the job/step that collects changed files (the step that builds the file list) and add a filter for /\.js$/ removals or change that step to call phpcs without file arguments—this will ensure JavaScript files excluded by phpcs.xml (e.g., files under Gruntfile.js/module.exports) are not scanned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@Gruntfile.js`:
- Around line 1-2: CI is passing changed files directly to PHPCS which bypasses
phpcs.xml exclude-patterns (e.g., *.js); update the workflow in
.github/workflows/inspections.yml to either (a) filter the changed-files list to
remove *.js before calling phpcs, or (b) stop passing file arguments and invoke
phpcs with no explicit paths so it uses phpcs.xml excludes; locate the job/step
that collects changed files (the step that builds the file list) and add a
filter for /\.js$/ removals or change that step to call phpcs without file
arguments—this will ensure JavaScript files excluded by phpcs.xml (e.g., files
under Gruntfile.js/module.exports) are not scanned.
Add an explicit '!/node_modules/' ignore pattern in Gruntfile.js so nested node_modules folders are excluded from file sets. Remove modules/user-directory/postcss.config.js (Tailwind + Autoprefixer) as the per-module PostCSS config is no longer required.
Summary by CodeRabbit