Repository navigation
feat: fixing deprecation messages in sass - #3203
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughNext.js Sass config now uses sass.NodePackageImporter and silences specific deprecations; the repo-wide SCSS files migrate from legacy Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI command
participant Utils as getPreferredPackageManager()
participant FS as Filesystem
participant NI as `@antfu/ni` (bin)
CLI->>Utils: call getPreferredPackageManager()
Utils->>FS: getPackageRootDir('@antfu/ni')
FS-->>Utils: path or not found
alt package root found
Utils->>FS: loadPackageJsonAt(pkgRoot + '/package.json')
FS-->>Utils: package.json (with bin)
alt NI bin exists
Utils->>NI: run node <ni-bin> --version
NI-->>Utils: agent string (yarn/npm/pnpm)
Utils-->>CLI: resolved agent
else no ni bin
Utils-->>CLI: fallback agent ('yarn')
end
else not found
Utils-->>CLI: fallback agent ('yarn')
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)
120-124:⚠️ Potential issue | 🔴 CriticalMissing
utilities.namespace prefix — this will fail to compile.Line 121 uses
@include media("<tablet")but every other breakpoint mixin in this file correctly uses@include utilities.media(...). Since the old global@importis removed, baremediais undefined here.🐛 Proposed fix
[data-fs-reorder-button] { - `@include` media("<tablet") { + `@include` utilities.media("<tablet") { display: none; } }packages/ui/src/components/molecules/SearchDropdown/styles.scss (1)
46-55:⚠️ Potential issue | 🟡 Minor
overflow: hiddenon the search dropdown at>=notebookmay clip content.The dropdown is absolutely positioned and likely has dynamic content (search suggestions).
overflow: hidden(line 50) will clip any content that exceeds the container's bounds. If the dropdown list grows beyond the visible area, items will be cut off with no scroll. Was this intentional? If you want rounded corners without clipping scrollable content, consideroverflow: autoor applyingborder-radiusvia a wrapper/pseudo-element instead.packages/ui/src/components/molecules/SkuSelector/styles.scss (1)
160-168:⚠️ Potential issue | 🟡 MinorRename to
--fs-sku-selector-option-color-bkg-colorfor consistency.The property
--data-fs-sku-selector-option-color-bkg-coloris set dynamically in the React component (packages/components/src/molecules/SkuSelector/SkuSelector.tsx) via inline styles, so it's functional. However, the--data-fs-prefix is inconsistent with the project's convention; all other design tokens in this component use--fs-*. Renaming to--fs-sku-selector-option-color-bkg-colorwould align with the codebase standards.
🤖 Fix all issues with AI agents
In `@packages/core/src/components/account/MyAccountMenu/styles.scss`:
- Line 1: Remove the unused `@use` import for utilities: delete the line that
reads `@use` "@faststore/ui/src/styles/base/utilities"; and ensure there are no
other active references to the utilities symbol (you may also remove the
entirely commented-out `@include` utilities.media(...) block if you want to avoid
keeping dead code).
- Around line 95-130: The commented-out responsive notebook breakpoint using
utilities.media(">=notebook") is dead code that either needs to be
restored/migrated or removed; decide which: if you want to keep desktop/tablet
styles, migrate that block to the current `@use-based` utilities.media() syntax
and re-enable it so .menu, .nav, .navItem and .avatar receive their desktop
grid, column direction and avatar sizing; ensure the corresponding `@use` import
for utilities.media is present at the top; otherwise delete the entire commented
block and also remove the unused `@use` import to avoid dead imports and a layout
regression for MyAccountMenu.
In `@packages/core/src/components/account/security/styles.module.scss`:
- Around line 6-11: Multiple shared component styles are being inlined
repeatedly via meta.load-css (e.g., meta.load-css(".../Button/styles.scss"),
Input, Overlay, SlideOver), causing duplication; create a single consolidated
base stylesheet (e.g., base-shared-components.scss) that `@use/`@forward or
meta.load-css all shared atom/organism styles once, update this module
(styles.module.scss) and other files to load only that consolidated entry
instead of per-component meta.load-css calls, and ensure selectors remain
correct (watch .section scoping and data-fs-button / [data-fs-button] selectors)
so shared styles are not duplicated across the 28+ files.
In `@packages/core/src/components/common/Alert/section.module.scss`:
- Around line 8-11: Update the project's Sass config to allow resolving pkg:
URLs by adding the NodePackageImporter to the Sass importers and setting the
recommended deprecation silencing: configure sassOptions to include importers
with new NodePackageImporter() (from require('sass')) and silenceDeprecations
for 'if-function' and 'legacy-js-api'; also review the .section selector in
section.module.scss where the four meta.load-css includes (meta.load-css calls
for Icon, Button, Link, Alert) are nested—confirm that emitting rules under
.section (e.g., resulting selectors like .section [data-fs-icon]) is intentional
and won't break downstream overrides.
In `@packages/core/src/components/sections/Navbar/section.module.scss`:
- Around line 10-38: Remove the two unused style import lines in
section.module.scss that reference "@include
meta.load-css('pkg:`@faststore/ui/src/components/molecules/SkuSelector/styles.scss`');"
and "@include
meta.load-css('pkg:`@faststore/ui/src/components/molecules/Table/styles.scss`');"—delete
those include statements from the Navbar section.module.scss, verify no
remaining references to SkuSelector or Table styles in Navbar-related components
(e.g., SearchDropdown, SKUMatrix, QuantitySelector), and run the style
build/linter to ensure no import errors remain.
In `@packages/core/src/components/sections/ProductGallery/section.module.scss`:
- Around line 42-75: The meta.load-css calls for Skeleton, ProductCardSkeleton,
ProductComparison, and SlideOver in section.module.scss are missing the .scss
extension; update the four include statements (the `@include` meta.load-css(...)
lines referencing "atoms/Skeleton/styles",
"molecules/ProductCardSkeleton/styles", "organisms/ProductComparison/styles",
and "organisms/SlideOver/styles") to use the consistent "styles.scss" filename
so they match the other imports.
In `@packages/core/src/components/sections/ProductShelf/section.module.scss`:
- Around line 22-35: The Sass build is failing because section.module.scss uses
meta.load-css() with pkg: URLs which require Dart Sass >=1.71.0 and the
NodePackageImporter; update the Sass dependency in packages/core/package.json to
a version >=1.71.0 (or compatible caret range) and add the importer to your
Next.js config by configuring sassOptions.importers with new
(require('sass')).NodePackageImporter() in next.config.js so the pkg: scheme
resolves; target the meta.load-css usages in ProductShelf/section.module.scss
when validating the fix.
In `@packages/core/src/styles/global/index.scss`:
- Around line 1-14: The `@layer` ordering declaration ("@layer base, components,
theme;") appears after several `@use` imports that may already emit their own
`@layer` blocks, so the explicit ordering may be ineffective; fix by moving the
"@layer base, components, theme;" declaration to the very top of this stylesheet
(before any `@use`) or by creating/including a tiny module that declares the
layers first and then `@use` the other modules; update the file so the "@layer
base, components, theme;" declaration precedes the "@use" lines (e.g., the `@use`
of global.scss and the other component styles) to guarantee the intended layer
priority.
🧹 Nitpick comments (23)
packages/core/src/styles/main.scss (1)
1-5: Clean migration to@use— one small nit on the comment.The
@import→@useswitch is correct and preserves load order. Since these are entry-point stylesheets whose side-effect CSS output matters (not namespace member access), theasaliases work fine even if unused directly.Line 2: the comment still says "should be import before" — consider updating to "should be loaded before" to stay consistent with the new
@usesyntax.✏️ Suggested comment tweak
// The import order of these stylesheets does affect in the layers override -// global/index.scss should be import before themes/index.scss +// global/index.scss should be loaded before themes/index.scss `@use` "./global/index.scss" as global;packages/ui/src/components/atoms/Input/styles.scss (1)
1-1: Inconsistent:.scssextension included in@usepath.Other files in this PR (e.g.,
FilterSkeleton/styles.scss,Modal/styles.scss) omit the extension:@use "../../../styles/base/utilities". This file includes it. While both work, dropping the extension keeps the migration consistent.Proposed fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Checkbox/styles.scss (1)
1-2: Inconsistent file extension in@usedirective.This file uses
@use "../../../styles/base/utilities.scss"with the.scssextension, while other files in this PR (e.g., Toast'sstyles.scss, MyAccountTable'sstyles.scss) omit it. Sass resolves both, but consistency across the codebase is preferred.Suggested diff
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/molecules/ProductCard/styles.scss (1)
1-2: Same.scssextension inconsistency as noted in Checkbox.Consider dropping the extension for consistency with other files in this PR.
Suggested diff
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/molecules/SearchProducts/styles.scss (1)
1-1: Minor inconsistency: explicit.scssextension in@usepath.Other files in this PR (e.g.,
MyAccountLayout/styles.scss) use the extensionless form@use "@faststore/ui/src/styles/base/utilities". This works but is inconsistent — consider dropping the extension for uniformity.Suggested change
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/core/next.config.js (1)
23-25: Silencinglegacy-js-apiis a stopgap — track the Next.js migration to the modern Sass API.
if-functionis fine since it comes frominclude-media. However,legacy-js-apiis silenced because Next.js still uses the old Sass JS API internally. When Next.js ships support for the modernsasscompiler API, this suppression should be removed to avoid masking real deprecation issues in your own code.Consider adding a
// TODO:comment here so this doesn't get lost.packages/ui/src/styles/base/tokens.scss (1)
228-232: Breakpoint CSS custom properties now usemap.get(utilities.$breakpoints, ...).This is consistent and correct. One thing to watch: if a breakpoint key is ever misspelled or removed from
$breakpoints,map.getreturnsnullsilently (no compile error). If Sassmap.getwith a missing key is a concern, consider usingmap-getwith error handling or a helper that throws on missing keys — though this is low risk given these are stable, well-known keys.packages/core/src/components/sections/ProductTiles/section.module.scss (1)
5-17: Inconsistent file extensions vs.ProductDetails/section.module.scss.This file omits
.scssextensions inmeta.load-csspaths (e.g.,"pkg:...Badge/styles"), whileProductDetails/section.module.scssincludes them (e.g.,"pkg:...Badge/styles.scss"). Both approaches work, but the inconsistency across sibling section files could cause confusion. Pick one convention and apply it uniformly.packages/ui/src/styles/base/utilities.scss (1)
120-136: Orphaned comment infocus-ring-visible.Line 129 (
// due to Safari's lack of support) is dangling after the&:focusblock closes but before@supportscloses. It reads as if it should be part of the comment block starting at line 122–124. Consider moving it inline with the other Safari comments or removing the duplication.Suggested cleanup
`@mixin` focus-ring-visible { `@media` not all and (min-resolution: .001dpcm) { // Target only Safari browsers `@supports` (-webkit-appearance:none) { - // Use `focus` instead of `focus-visible` + // Use `focus` instead of `focus-visible` due to Safari's lack of support &:focus { `@include` focus-ring; } - - // due to Safari's lack of support } } &:focus-visible { `@include` focus-ring; } }packages/ui/src/components/molecules/Toggle/styles.scss (1)
1-1: Unnecessary.scssextension in@usepath.Other files in this PR import utilities without the extension (
@use "../../../styles/base/utilities"). This file includes it. Sass resolves either form, but for consistency drop the extension.Suggested fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Radio/styles.scss (1)
1-1: Nit: Drop the.scssextension from@use.Sass recommends omitting file extensions in
@userules. Other files in this same PR (e.g.,CartItem/styles.scss,Footer/styles.scss) already use@use "../../../styles/base/utilities"without the extension. Keep it consistent.-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/molecules/BuyButton/styles.scss (1)
1-1: Nit: Drop the.scssextension for consistency.Same as
Radio/styles.scss— other files in this PR omit the extension.-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Textarea/styles.scss (1)
1-1: Nit: Drop the.scssextension for consistency.Same pattern as the other two files — prefer
@use "../../../styles/base/utilities".-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Link/styles.scss (1)
1-1: Inconsistent.scssextension in@useimport.All other files in this PR use
@use "../../../styles/base/utilities"without the.scssextension. This one includes it. While Sass resolves both, keeping it consistent avoids confusion.Suggested fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/organisms/EmptyState/styles.scss (1)
35-37: Redundantalign-items: centerinside media query.Line 28 already sets
align-items: centerunconditionally on the base selector, so the>=notebookoverride on line 36 is a no-op. Consider removing the entire media block if this was the only property inside it.Suggested fix
- `@include` utilities.media(">=notebook") { - align-items: center; - }packages/ui/src/components/molecules/InputField/styles.scss (2)
1-1: Inconsistent@usepath — includes.scssextension unlike all other files.Every other file in this PR omits the extension (e.g.,
@use "../../../styles/base/utilities"). Keeping it consistent avoids confusion.Suggested fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";
54-57: Consider documenting the intentional CSS variable exposure.The
--fs-input-paddingvariable on line 55 is declared but unused within the InputField component itself (line 57 uses--fs-input-field-paddingdirectly). This pattern appears intentional—exposing the variable as a CSS custom property for external override—but adding a brief comment clarifying this design choice would improve maintainability.packages/ui/src/styles/base/typography.scss (1)
5-5: Inconsistent@useimport style:.scssextension included here but omitted elsewhere.Other files in this PR (e.g.,
ProductGallery/styles.scss,BannerText/styles.scss,Tiles/styles.scss) use@use "..."without the.scssextension. This file andButton/styles.scssinclude it. Pick one convention for consistency.Suggested fix
-@use "./utilities.scss"; +@use "./utilities";packages/ui/src/components/molecules/TextareaField/styles.scss (1)
1-1: Same.scssextension inconsistency as noted intypography.scss.For consistency with the majority of files in this PR, drop the extension.
Suggested fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Button/styles.scss (1)
1-1: Same.scssextension inconsistency — drop it for uniformity.Suggested fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/atoms/Select/styles.scss (1)
1-2: Inconsistent.scssextension in@useimport.This file uses
@use "../../../styles/base/utilities.scss"with the explicit.scssextension, while other files in this PR (e.g.,Hero/styles.scss,Newsletter/styles.scss,SKUMatrix/styles.scss) use@use "../../../styles/base/utilities"without the extension. Both work, but pick one convention for consistency across the codebase.Proposed fix for consistency
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/molecules/SearchInputField/styles.scss (1)
1-2: Same.scssextension inconsistency as noted inSelect/styles.scss.Consider dropping the extension for consistency with other files in this PR.
Proposed fix
-@use "../../../styles/base/utilities.scss"; +@use "../../../styles/base/utilities";packages/ui/src/components/organisms/Newsletter/styles.scss (1)
72-76: Consider logical properties for multilanguage/RTL support.Lines 74 and 123 use
text-align: leftandmargin-left: auto— physical direction properties. Since the target branch isfeat/multilanguage, consider usingtext-align: startandmargin-inline-start: autofor proper RTL support. This may be pre-existing, but since these lines are touched, it's a good opportunity.Proposed logical property migration
`@include` utilities.media(">=notebook") { align-content: flex-start; - text-align: left; + text-align: start; }[data-fs-button] { width: auto; min-width: 40%; - margin-left: auto; + margin-inline-start: auto; }Also applies to: 123-124
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/core/src/components/account/MyAccountMenu/styles.scss`:
- Line 36: Fix the possessive typo in the comment text: locate the comment
containing "While it's use case is not implemented" in MyAccountMenu styles (the
SCSS comment shown in the diff) and change "it's" to the possessive "its" so the
comment reads "While its use case is not implemented".
🧹 Nitpick comments (2)
packages/core/src/components/account/MyAccountMenu/styles.scss (1)
72-72: Nit: missing spaces around child combinator>
> a,is more readable and consistent with common SCSS formatting conventions than>a,. Minor readability nit.- >a, + > a,packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)
48-48: Minor formatting inconsistency in mixin calls.Some calls have a space before the parenthesis (
utilities.media (">=notebook")on lines 48, 60, 66, 127) while others don't (utilities.media(">=notebook")on lines 82, 93, 115). Pick one style for consistency within the file.Also applies to: 82-82
There was a problem hiding this comment.
Actionable comments posted: 16
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/cli/src/utils/generate.ts (1)
471-490:⚠️ Potential issue | 🔴 Critical
forEachwithasynccallback silently drops promises — dependencies may not be installed before build starts.
Array.prototype.forEachignores the return value of its callback, so thePromisefrom eachasynciteration is discarded.await installDependencies(...)only awaits within the callback scope, butforEachitself returnsvoidsynchronously. This meansvalidateAndInstallMissingDependenciesresolves before any installation finishes, and the spinner stops prematurely.Use
for...of(sequential) orPromise.all+.map(parallel):Fix (sequential — preserves current intent)
- missingDependencies.forEach(async ({ feature, dependencies }) => { + for (const { feature, dependencies } of missingDependencies) { const dependenciesToInstall = dependencies.filter((dependency) => { const dependencyName = dependency.split('@')[0] return !userPackageJson.dependencies[dependencyName] }) if (dependenciesToInstall.length > 0) { const spinner = ora( `Installing ${feature} missing dependencies\n` ).start() await installDependencies({ dependencies: dependenciesToInstall, cwd: userDir, errorMessage: `failed to install ${feature} dependencies`, }) spinner.stop() } - }) + }packages/cli/src/commands/test.ts (1)
79-79:⚠️ Potential issue | 🟡 Minor
storeTest(tmpDir)is not awaited — unhandled rejection risk.If
getPreferredPackageManager()(or any other async call insidestoreTest) throws, the resulting promise rejection will be unhandled. Consider awaiting or attaching a.catch().Proposed fix
- storeTest(tmpDir) + storeTest(tmpDir).catch((err) => { + testAbortController.abort() + this.error(err) + })
🤖 Fix all issues with AI agents
In `@packages/cli/src/utils/commands.ts`:
- Around line 44-52: The return type of loadPackageJsonAt currently requires a
non-optional bin field which is incorrect; make bin optional by changing its
type to bin?: Record<string, string> in the function's declared return type so
callers no longer have a required bin property to guard against—update the type
definition inside the Promise<...> union in loadPackageJsonAt accordingly.
- Around line 23-42: In getPackageRootDir, fix the infinite-loop and off-by-one
path bug: inside the while loop decrement depth each iteration and ensure
pkgJson is loaded from the same directory assigned to pkgPath (don't call
loadPackageJsonAt(join(pkgPath, '..')) after already moving pkgPath up); update
pkgPath to its parent, load pkgJson from that parent, and continue until depth
expires so the returned pkgPath corresponds to the directory that contains the
matching package.json (referencing getPackageRootDir, pkgPath, pkgJson, and
depth).
- Around line 9-18: The function getPreferredPackageManager builds binNA using
getPackageRootDir and getDepPackageJSON but falls back to an empty string so
binNA can point at the package directory; before calling fsExtra.existsSync and
spawnSync, guard against an empty/missing bin path by checking that the resolved
bin segment (from (await getDepPackageJSON('@antfu/ni'))?.bin?.['na']) is a
non-empty string (trimmed) and only then construct binNA and proceed; if the bin
is empty or falsy, return the default agent immediately to avoid running node on
a directory. Ensure you reference getPreferredPackageManager, binNA,
getPackageRootDir, getDepPackageJSON, fsExtra.existsSync and spawnSync when
locating the change.
In `@packages/cli/src/utils/runCommandSync.ts`:
- Around line 20-22: The log currently uses JSON.stringify(cmd, null, 2) which
wraps the command string in quotes; update the logger.log call in runCommandSync
(the line using `${chalk.magenta('DEBUG')} - $ ${JSON.stringify(cmd, null, 2)}
error root ↓`) to log the raw cmd value (or a clearer template like `"${cmd}"`)
instead of JSON.stringify so the command prints without literal JSON quotes;
keep the rest of the message intact.
- Around line 41-43: In runCommandSync, the logger.log call is using
JSON.stringify on a plain string command (same issue fixed in showError); update
the log in the runCommandSync function (the line calling logger.log with
chalk.magenta('DEBUG') and cmd) to avoid JSON.stringify and instead interpolate
or pass cmd directly (e.g., `${chalk.magenta('DEBUG')} - $ ${cmd} warn root ↓`)
so the command prints cleanly without extra quotes/escaping.
In `@packages/core/package.json`:
- Around line 85-86: The package.json currently lists "@lhci/cli" under
"dependencies" which should be a development-only tool; move the "@lhci/cli"
entry from the "dependencies" object into the "devDependencies" object in
packages/core/package.json so it is installed only for development/CI. Ensure
you remove the entry from "dependencies" and add the same version string (e.g.
"^0.15.1") under "devDependencies", keeping formatting and any trailing commas
consistent.
In `@packages/core/src/components/account/MyAccountLayout/styles.scss`:
- Around line 19-26: The grid definition inside the `@include`
utilities.media(">=notebook") block uses "grid-template-columns: max(300px) 80%"
which can overflow; change it to allocate remaining space with a flexible column
instead — e.g. "grid-template-columns: max(300px) 1fr" or
"grid-template-columns: max(300px) minmax(0, 1fr)"; if you need to cap the
content width, use a minmax with a max cap like "max(300px) minmax(0, min(900px,
1fr))" so the content column never forces horizontal overflow.
In
`@packages/core/src/components/account/orders/MyAccountListOrders/MyAccountFilterSlider/section.module.scss`:
- Around line 4-22: The meta.load-css(...) calls include ".scss" extensions
which violate the scss/load-partial-extension rule; edit every meta.load-css
invocation in this module (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Button/styles.scss"),
meta.load-css("./MyAccountFilterFacetDateRange/styles.scss"), etc.) to remove
the ".scss" suffix (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Button/styles")), do the same
for all 19 entries here (and apply the same pattern across other files flagged),
then run the stylelint/CI check to confirm the scss/load-partial-extension
warning is resolved.
In `@packages/core/src/components/common/PreviewTag/section.module.scss`:
- Around line 5-7: The three meta.load-css imports in section.module.scss
include explicit “.scss” extensions which triggers Stylelint
scss/load-partial-extension; remove the “.scss” extension from the calls to
meta.load-css (the three lines referencing
"~@faststore/ui/src/components/atoms/Badge/styles",
"~@faststore/ui/src/components/atoms/Icon/styles", and
"~@faststore/ui/src/components/molecules/Tag/styles") so they rely on Sass
partial resolution without extensions.
In `@packages/core/src/components/sections/Footer/section.module.scss`:
- Around line 7-14: The meta.load-css calls in section.module.scss include
explicit .scss extensions which violate stylelint's scss/load-partial-extension
rule; update every meta.load-css invocation (e.g., the calls to meta.load-css
for Button, Link, List, Logo, Accordion, PaymentMethods, Incentives, Footer) to
remove the ".scss" extension from the path strings so they match the project's
other modules and satisfy the linter.
In `@packages/core/src/components/sections/Incentives/section.module.scss`:
- Around line 7-9: Stylelint flags the three meta.load-css calls because they
include the .scss extension; remove the file extensions in the meta.load-css
invocations so Sass module resolution uses partials without extensions (update
the three calls that reference
"~@faststore/ui/src/components/atoms/Icon/styles.scss",
"~@faststore/ui/src/components/atoms/List/styles.scss", and
"~@faststore/ui/src/components/organisms/Incentives/styles.scss" to omit
".scss"). Ensure you only change the string literals passed to meta.load-css and
keep the rest of the line unchanged.
In `@packages/core/src/components/sections/Newsletter/section.module.scss`:
- Around line 5-12: Remove the explicit ".scss" extensions from all
meta.load-css calls in the section.module.scss for Newsletter (and the other
affected section.module.scss files such as BannerNewsletter, ProductDetails,
ProductGallery, Navbar, Footer) so Sass partial resolution is used; update each
`@include` meta.load-css("~@faststore/ui/src/components/.../styles.scss") to
`@include` meta.load-css("~@faststore/ui/src/components/.../styles") for the
listed imports (notably the uses in Newsletter for Button, Icon, Input, Link,
List, RichText, InputField, and Newsletter organism) to satisfy the
scss/load-partial-extension lint rule.
In `@packages/core/src/components/sections/ProductGallery/section.module.scss`:
- Around line 42-75: The meta.load-css calls are inconsistent: some include the
".scss" extension while others omit it, causing stylelint rules to flag the ones
that include the extension; update every meta.load-css(...) argument in this
file (and other SCSS files in the PR) to remove the ".scss" extension so all
imports are extensionless (e.g., change
"~@faststore/ui/src/components/atoms/Badge/styles.scss" to
"~@faststore/ui/src/components/atoms/Badge/styles"), leaving the same module
paths and only removing the ".scss" suffix in calls like meta.load-css used
throughout (e.g., for Skeleton/styles, ProductCardSkeleton/styles,
ProductComparison/styles, SlideOver/styles and all others), then re-run
stylelint to confirm the rule scss/load-partial-extension is satisfied.
In `@packages/core/src/components/sections/RegionBar/section.module.scss`:
- Around line 5-7: The meta.load-css calls include explicit ".scss" extensions
which should be removed to follow Dart Sass/@use conventions and satisfy the
scss/load-partial-extension lint rule; update each meta.load-css invocation
(e.g., meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss")) to
remove the ".scss" suffix
(meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles")) while keeping
the surrounding quotes and import string intact, and apply the same change to
the Button and RegionBar load-css calls (and any other meta.load-css occurrences
in the file).
In `@packages/core/src/components/sections/ScrollToTopButton/section.module.scss`:
- Around line 9-10: The two `@include` meta.load-css calls in section.module.scss
are using explicit “.scss” extensions which triggers the
scss/load-partial-extension Stylelint rule; remove the “.scss” extension from
the import paths in the `@include` meta.load-css calls (i.e., change
"~@faststore/ui/src/components/atoms/Icon/styles.scss" and
"~@faststore/ui/src/components/atoms/Button/styles.scss" to the same paths
without the .scss extension) so meta.load-css is called with extension-free
partial paths.
In `@packages/core/src/styles/global/index.scss`:
- Around line 7-16: The meta.load-css calls currently include the .scss
extension which triggers the scss/load-partial-extension Stylelint rule; update
each meta.load-css invocation (e.g.,
meta.load-css("~@faststore/ui/src/styles/global.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/Skeleton/styles.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/Overlay/styles.scss"),
meta.load-css("~@faststore/ui/src/components/atoms/SROnly/styles.scss"),
meta.load-css("src/components/sections/Section/section.scss"),
meta.load-css("~@faststore/ui/src/components/molecules/Dropdown/styles.scss"))
to remove the .scss suffix (use the same paths without the extension) so
Stylelint no longer flags them and auto-fixes will match the rest of the
codebase.
🧹 Nitpick comments (6)
packages/ui/src/styles/base/reset.scss (1)
6-9: The~prefix pattern is established throughout the codebase.While
pkg:modern-normalizewould align better with Dart Sass conventions, the entire codebase consistently uses~withmeta.load-css()across hundreds of imports—both local paths (~@faststore/ui/...) and npm packages. Changing this single instance topkg:would create inconsistency unless done as part of a broader migration. If a codebase-wide migration topkg:is planned, coordinate it separately to maintain pattern consistency.packages/core/src/components/sections/Navbar/section.module.scss (1)
1-2: Nit:@useorder.Convention is typically to place built-in Sass modules (
sass:meta) before third-party imports. Not a functional issue — just consistency with most other files in this PR wheresass:metacomes first.Suggested order
-@use "@faststore/ui/src/styles/base/utilities"; -@use "sass:meta"; +@use "sass:meta"; +@use "@faststore/ui/src/styles/base/utilities";packages/core/src/components/common/Alert/section.module.scss (1)
2-2: Inconsistent path prefix:@useomits~butmeta.load-cssincludes it.Line 2 uses
@use "@faststore/ui/..."(no tilde), while Lines 10–13 usemeta.load-css("~@faststore/ui/...")(with tilde). The~prefix is a webpack/sass-loader convention for resolvingnode_modules. Mixing the two styles works only if both the Sass importer and sass-loader are configured to handle both forms, but it's fragile and confusing.Pick one convention and stick with it—preferably drop
~everywhere ifNodePackageImporteris configured.Also applies to: 10-13
packages/core/src/components/sections/ProductDetails/section.module.scss (1)
72-72: Nit: missing space after>combinator.
>[data-fs-button]is valid but harder to scan. Prefer> [data-fs-button]for readability.packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)
48-48: Inconsistent spacing inutilities.mediacalls.Lines 48, 60, 66, and 126 have a space before the parenthesis (
utilities.media (">=notebook")), while lines 81, 92, 103, and 114 do not (utilities.media(">=notebook")). While Sass tolerates both forms, pick one for consistency — the no-space form is conventional.Example fix
- `@include` utilities.media (">=notebook") { + `@include` utilities.media(">=notebook") {Apply to lines 48, 60, 66, and 126.
packages/core/src/components/account/orders/MyAccountListOrders/styles.module.scss (1)
17-32: Stylelint flags empty lines before custom properties (lines 27, 30).
custom-property-empty-line-beforefires on the blank lines separating custom property groups. If the project enforces this rule, remove the blank lines or add a comment between groups. If the grouping is intentional, consider disabling the rule for this block or updating the Stylelint config.
| @include meta.load-css("~@faststore/ui/src/components/atoms/Badge/styles.scss"); | ||
| @include meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss"); | ||
| @include meta.load-css("~@faststore/ui/src/components/molecules/Tag/styles.scss"); |
| "use-sync-external-store": "^1.6.0", | ||
| "@lhci/cli": "^0.15.1" |
…ils/section.module.scss Co-authored-by: Larícia Mota <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In
`@packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss`:
- Around line 5-25: The meta.load-css calls include explicit “.scss” extensions
which triggers the stylelint scss/load-partial-extension rule; update every
meta.load-css invocation (e.g.,
meta.load-css("~@faststore/ui/src/components/atoms/Icon/styles.scss"),
meta.load-css("./MyAccountReorderButton/styles.scss"),
meta.load-css("../../components/MyAccountAccordion/styles.scss"), etc.) to
remove the “.scss” suffix so they read meta.load-css(".../styles") for all 21
entries; keep paths otherwise unchanged and run the linter to confirm the rule
is satisfied.
🧹 Nitpick comments (3)
packages/cli/src/utils/commands.ts (2)
6-6: InconsistentexistsSyncusage.Line 6 destructures
existsSyncfromfsExtra, but line 16 callsfsExtra.existsSync(binNA)directly. Also uses== falseinstead of the more idiomatic!. Pick one style.- if (!binNA || fsExtra.existsSync(binNA) == false) return agent + if (!existsSync(binNA)) return agentAlso applies to: 16-16
53-54: Compact ternary chain forlocationis hard to scan.The boolean-expression-as-value pattern
(at?.endsWith(file) && at) || (at && join(at, file)) || falsemixes truthy coercion and explicitfalse. A simpleif/elseor early return would be clearer and avoid the subtlefalsesentinel.♻️ Suggested simplification
- const file = 'package.json', - location = (at?.endsWith(file) && at) || (at && join(at, file)) || false - - if (location === false) - throw new Error(`Invalid searching of ${file} at ${at}`) + if (!at) throw new Error(`Invalid searching of package.json at ${at}`) + + const location = at.endsWith('package.json') ? at : join(at, 'package.json')packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss (1)
60-60: Inconsistent spacing onutilities.mediacalls.Lines 60, 66, and 126 have a space before the parenthesis (
utilities.media (">=...")), while lines 48, 81, 92, 103, and 114 omit it. Pick one style for consistency.Suggested fix
- `@include` utilities.media (">=tablet") { + `@include` utilities.media(">=tablet") {Apply the same to lines 66 and 126.
…ils/section.module.scss Co-authored-by: Larícia Mota <[email protected]>
…ils/section.module.scss Co-authored-by: Larícia Mota <[email protected]>
…ils/section.module.scss Co-authored-by: Larícia Mota <[email protected]>
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In
`@packages/core/src/components/account/orders/MyAccountOrderDetails/section.module.scss`:
- Around line 5-25: The meta.load-css calls include explicit ".scss" extensions
which violate the scss/load-partial-extension rule; remove the ".scss" suffix
from every meta.load-css argument (e.g., calls referencing
"./MyAccountSummaryCard/styles.scss",
"~@faststore/ui/src/components/atoms/Icon/styles.scss", etc.) so each path ends
without the extension while keeping the same relative/module paths and quotes.
Fixing sass dart deprecations usage.
This Fix deprecations warnings from sass on the new dart version.
Caveats:
if-functionlegacy-js-apiBEFORE vs AFTER
Summary by CodeRabbit
Chores
Dependencies