fix(eslint-config): disable css/no-invalid-at-rules for Tailwind CSS …#1000
fix(eslint-config): disable css/no-invalid-at-rules for Tailwind CSS …#1000
Conversation
…files Tailwind v4 custom at-rules (@custom-variant, @source, @theme, @Utility) cause @eslint/css-tree to crash with "Bad syntax reference: <parentheses-block>" when the css/no-invalid-at-rules rule attempts to validate their preludes. Disable the rule when the tailwind option is enabled to prevent the crash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thank you for following the naming conventions! 🙏 |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (23)
📝 WalkthroughWalkthroughConditionally disables CSS at-rule validation for Tailwind, adds conditional Vitest rule toggles, tightens TypeScript typings and type assertions across many ESLint plugin configs, restructures pnpm workspace into granular catalogs with package globs and onlyBuiltDependencies, replaces several devDependency pins with Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 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)
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 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The pnpm shell emulator expands unquoted globs and throws "No matches found" when *-bench doesn't match any files. Single-quoting the value prevents expansion in both the pnpm shell emulator and bash. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… is absent prefer-describe-function-title calls getParserServices() without declaring requiresTypeChecking, crashing ESLint when typed linting is not configured. prefer-vi-mocked properly declares requiresTypeChecking but has the same runtime failure. Both are sourced from configs.all and are now disabled conditionally when no tsconfigPath is provided. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add sideEffects:false to textlint-config/package.json - Exclude textlint rule packages from packem unused-dependency check; they are loaded at runtime by textlint via the generated .textlintrc, not statically imported in bin.ts - Stage pnpm workspace reformatting (4→2 space indent) and new default catalog: section added by pnpm for @anolilab/eslint-config and @anolilab/prettier-config - Migrate all affected packages to use catalog: references for those two workspace-internal packages Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…o catalog:lint Replace the standalone default catalog: section (added by pnpm) with proper named catalog entries under catalogs.lint, and update all package.json references from "catalog:" to "catalog:lint". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
browserslist-config-anolilab
@anolilab/commitlint-config
@anolilab/eslint-config
@anolilab/lint-staged-config
@anolilab/prettier-config
@anolilab/stylelint-config
@anolilab/textlint-config
commit: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/textlint-config/packem.config.ts (1)
17-45: Consider de-duplicating the runtime rule list to avoid drift.This explicit exclude list works, but it’s easy for it to get out of sync with
package.json. Consider centralizing this list in one constant/source (or generating it) so updates happen in one place.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/textlint-config/packem.config.ts` around lines 17 - 45, The explicit rule list in dependencies.unused.exclude can drift from package.json; extract the array into a single exported constant (e.g., RUNTIME_TEXTLINT_RULES) in a shared module and import that constant where packem.config.ts currently defines dependencies.unused.exclude, and also use it when generating/updating package.json or .textlintrc so the same source-of-truth is reused; update any build/generation code that previously duplicated the list to reference RUNTIME_TEXTLINT_RULES instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/textlint-config/packem.config.ts`:
- Around line 17-45: The explicit rule list in dependencies.unused.exclude can
drift from package.json; extract the array into a single exported constant
(e.g., RUNTIME_TEXTLINT_RULES) in a shared module and import that constant where
packem.config.ts currently defines dependencies.unused.exclude, and also use it
when generating/updating package.json or .textlintrc so the same source-of-truth
is reused; update any build/generation code that previously duplicated the list
to reference RUNTIME_TEXTLINT_RULES instead.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (8)
packages/commitlint-config/package.jsonpackages/eslint-config/package.jsonpackages/eslint-config/src/config/plugins/vitest.tspackages/lint-staged-config/package.jsonpackages/stylelint-config/package.jsonpackages/textlint-config/package.jsonpackages/textlint-config/packem.config.tspnpm-workspace.yaml
… commitlint-config - commitlint-config: sort files array alphabetically to satisfy jsonc/sort-array-values - html.ts: replace indent.toString() with String(indent) to fix no-base-to-string - promise.ts: cast plugin to typed interface before .configs access - you-dont-need-lodash-underscore.ts: same — cast plugin and import Rules type - combine.ts: wrap each config in Promise.resolve() to fix await-thenable - interop-default.ts: replace (as any).default with Record<string,unknown> cast to eliminate no-unsafe-member-access and no-unsafe-return without eslint-disable - prettier-types.ts: suppress operator-linebreak on vendor type alias Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n configs - Add missing module declarations for eslint-plugin-es-x, eslint-plugin-html, eslint-plugin-no-unsanitized, and eslint-plugin-react-perf in stub.d.ts - Make mergePrettierOptions generic to propagate required parser property type - Cast indent values to compatible types in html, stylistic, toml, unicorn, yml plugins - Fix promise plugin to spread rules directly without fixupPluginRules wrapper - Fix sonarjs plugin to handle array-typed recommended config using forEach loop - Add null guards for storybook and tailwindcss plugin array access with type casts - Fix react plugin jsx-runtime access with optional chaining and remove extra parens - Fix index.ts getOverrides/getFiles with double-assertion cast to avoid TS2322 - Fix index.ts reactVersion/reactCompiler property name lookups in OptionsReact Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lab/eslint-config [22.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@22.0.1...@anolilab/eslint-config@22.0.2) (2026-02-28) ### Bug Fixes * **eslint-config:** disable css/no-invalid-at-rules for Tailwind CSS … ([#1000](#1000)) ([aa8b26b](aa8b26b)) * **eslint-config:** disable react-refresh/only-export-components for TanStack and unicorn/no-null for JSX/TSX ([2d719a1](2d719a1))
…nolilab/lint-staged-config [6.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/lint-staged-config@6.0.0...@anolilab/lint-staged-config@6.0.1) (2026-02-28) ### Bug Fixes * **eslint-config:** disable css/no-invalid-at-rules for Tailwind CSS … ([#1000](#1000)) ([aa8b26b](aa8b26b)) ### Dependencies * **@anolilab/eslint-config:** upgraded to 22.0.2
…lilab/textlint-config [12.1.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/textlint-config@12.1.1...@anolilab/textlint-config@12.1.2) (2026-02-28) ### Bug Fixes * **eslint-config:** disable css/no-invalid-at-rules for Tailwind CSS … ([#1000](#1000)) ([aa8b26b](aa8b26b))
…olilab/commitlint-config [9.1.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/commitlint-config@9.1.0...@anolilab/commitlint-config@9.1.1) (2026-02-28) ### Bug Fixes * **eslint-config:** disable css/no-invalid-at-rules for Tailwind CSS … ([#1000](#1000)) ([aa8b26b](aa8b26b)) ### Dependencies * **@anolilab/eslint-config:** upgraded to 22.0.2
…olilab/stylelint-config [10.1.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@10.1.0...@anolilab/stylelint-config@10.1.1) (2026-02-28) ### Bug Fixes * **eslint-config:** disable css/no-invalid-at-rules for Tailwind CSS … ([#1000](#1000)) ([aa8b26b](aa8b26b)) ### Dependencies * **@anolilab/eslint-config:** upgraded to 22.0.2
…files
Tailwind v4 custom at-rules (@custom-variant, @source, @theme, @Utility) cause @eslint/css-tree to crash with "Bad syntax reference: " when the css/no-invalid-at-rules rule attempts to validate their preludes. Disable the rule when the tailwind option is enabled to prevent the crash.
Summary by CodeRabbit