Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 ESLint collision range parsing error #374

Open
0Joy0 opened this issue Jan 3, 2025 · 0 comments
Open

🐞 ESLint collision range parsing error #374

0Joy0 opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working eslint

Comments

@0Joy0
Copy link
Contributor

0Joy0 commented Jan 3, 2025

Description

Input:

<Modal className={`fixed z:1001 top:0 left:0 flex ai:center jc:center w:full h:$(visual-viewport-height) bg:#00181833 z-index:100 @fade|200ms {h:calc($(visual-viewport-height)-60px);top:${(headerRef?.current?.offsetTop ?? 0) + (headerRef?.current?.clientHeight ?? 0)};ai:end}@<md`} isKeyboardDismissDisabled></Modal>
Oops! Something went wrong! :(

ESLint: 9.17.0

Error: Fix has invalid range: {
  "range": [
    null,
    null
  ],
  "text": "fixed z:1001 top:0 left:0 flex ai:center jc:center w:full h:$(visual-viewport-height) bg:#00181833 @fade|200ms {h:calc($(visual-viewport-height)-60px);top:${(headerRef?.current?.offsetTop ?? 0) + (headerRef?.current?.clientHeight ?? 0)};ai:end}@<md"
}
Occurred while linting /Users/aron/storeberry/projects/store/components/RepayModal.tsx:74
Rule: "@master/css/class-collision"
    at ok (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/shared/assert.js:17:15)
    at assertValidFix (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/report-translator.js:123:9)
    at normalizeFixes (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/report-translator.js:200:5)
    at /Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/report-translator.js:371:49
    at FileContext.report (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1062:41)
    at file:///Users/aron/storeberry/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@master/eslint-plugin-css/dist/rules/class-collision.mjs:43:29
    at parseNodeRecursive (file:///Users/aron/storeberry/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@master/eslint-plugin-css/dist/utils/parse-node-recursive.mjs:123:9)
    at visitNode (file:///Users/aron/storeberry/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@master/eslint-plugin-css/dist/rules/class-collision.mjs:28:13)
    at JSXAttribute (file:///Users/aron/storeberry/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@master/eslint-plugin-css/dist/utils/define-visitors.mjs:31:17)
    at ruleErrorHandler (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1098:48)
    at /Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/node-event-generator.js:337:14)
    at runRules (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1142:40)
    at #flatVerifyWithoutProcessors (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1911:31)
    at Linter._verifyWithFlatConfigArrayAndWithoutProcessors (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1993:49)
    at Linter._verifyWithFlatConfigArray (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2082:21)
    at Linter.verify (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:1543:61)
    at Linter.verifyAndFix (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/linter/linter.js:2320:29)
    at verifyText (/Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint.js:329:48)
    at /Users/aron/storeberry/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint.js:810:40

Reproduction

No response

System Informations

No response

@0Joy0 0Joy0 added bug Something isn't working eslint labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working eslint
Projects
None yet
Development

No branches or pull requests

1 participant