You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please paste any applicable config files that you're using (e.g. .prettierrc or .stylelintrc files)
Conflict with prettier-plugin-svelte, because postcss-html extract CSS only for .svelte files, so stylelint-svelte only receives css parts but try to parse it as svelte.
What source code are you linting?
<scriptlang="ts">
let count =1// the `$:` means 're-run whenever these values change'$: doubled=count*2$: quadrupled=doubled*2function handleClick() {count+=1}
</script>
<buttonclass="test"on:click={handleClick}>Count: {count}</button>
<p>{count} * 2 = {doubled}</p>
<p>{doubled} * 2 = {quadrupled}</p>
<style>
.test {border: transparent;}
</style>
What did you expect to happen?
No error
What actually happened?
ParseError: Expected }
1 | .test {
> 2 | border: transparent;
| ^
3 | }
at error (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17805:20)
at Parser$1.error (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17881:10)
at Parser$1.eat (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17895:19)
at mustache (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17566:17)
at new Parser$1 (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17840:22)
at Object.parse$3 [as parse] (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/svelte/compiler.js:17972:21)
at Object.parse (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]_o3ioganyptcsrh6x4hnxvjkpqi/node_modules/prettier-plugin-svelte/plugin.js:1934:83)
at Object.parse (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/prettier/index.js:7334:23)
at coreFormat (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/prettier/index.js:8645:18)
at formatWithCursor2 (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/prettier/index.js:8837:18)
at /Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/prettier/index.js:37229:12
at Object.format (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/prettier/index.js:37243:12)
at /Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]_ajb4dyjcjxvkvtnz4mzu4n3pcq/node_modules/stylelint-prettier/stylelint-prettier.js:107:35
at /Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/stylelint/lib/lintPostcssResult.js:113:8
at Array.map (<anonymous>)
at lintPostcssResult (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/stylelint/lib/lintPostcssResult.js:104:18)
at lintSource (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/stylelint/lib/lintSource.js:91:8)
at async /Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/stylelint/lib/standalone.js:228:27
at async Promise.all (index 0)
at async standalone (/Users/JounQin/Workspaces/GitHub/configs/node_modules/.pnpm/[email protected]/node_modules/stylelint/lib/standalone.js:267:22)
The text was updated successfully, but these errors were encountered:
What version of
stylelint
,prettier
andstylelint-prettier
are you using?stylelint
: 14.9.1prettier
: 2.7.1stylelint-prettier
: 2.0.0Please paste any applicable config files that you're using (e.g.
.prettierrc
or.stylelintrc
files)Conflict with
prettier-plugin-svelte
, becausepostcss-html
extract CSS only for.svelte
files, sostylelint-svelte
only receivescss
parts but try to parse it assvelte
.What source code are you linting?
What did you expect to happen?
No error
What actually happened?
The text was updated successfully, but these errors were encountered: