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

🐛 "Unexpected value or character. biome(parse)" can i disable biome css parser? #3107

Closed
1 task done
nevirum opened this issue Jun 7, 2024 · 3 comments
Closed
1 task done
Labels
A-Parser Area: parser L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@nevirum
Copy link

nevirum commented Jun 7, 2024

Environment information

CLI:
  Version:                      1.8.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm"
  JS_RUNTIME_VERSION:           "v20.14.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.1.4"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

Biome show error due to @media query
image

Expected result

Disable parser via biome.json

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added A-Parser Area: parser L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug labels Jun 7, 2024
@pikeas
Copy link

pikeas commented Aug 30, 2024

Similar issue here:

main {
    div:is(.other) {
        color: black;
    }
}

Biome is unable to parse this: Expected a declaration item but instead found ','.

The issue here is that Biome isn't set up for CSS files:

{
	"files": {
		"include": [
			"**/*.js",
			"**/*.json",
			"**/*.jsonc",
			"**/*.jsx",
			"**/*.ts",
			"**/*.tsx"
		]
	}
}

Biome should not report errors for ignored files. Similarly, it shouldn't report errors for files where it does no work (linting and formatting disabled). Ideally it would never parse them in the first place.

@Conaclos
Copy link
Member

@pikeas
Could you open new issues for each one?

As a workaround, I think you can completely disable CSS parsing, by disabling ll features (formatter and linter) for CSS:

{
  "css": {
    "formatter": { "enabled": false },
    "linter": { "enabled": false }
  }
}

@OliverJAsh
Copy link

As mentioned here I've been having similar problems. Interestingly this doesn't occur with the pre-release version of the extension. Not sure why that is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

6 participants