Repository: sveltejs/prettier-plugin-svelte (ts)

Issue:
svelteAllowShorthand: false not working on bindings
Sample code
```html
<h1 bind:innerHTML={innerHTML} contenteditable="true" />
<h1 innerHTML={innerHTML}/>
```

Expected output with `svelteAllowShorthand: false`
```html
<h1 bind:innerHTML={innerHTML} contenteditable="true" />
<h1 innerHTML={innerHTML}/>
```

Real output:
```html
<h1 bind:innerHTML contenteditable="true" />
<h1 innerHTML={innerHTML}/>
```

[Reproduction](https://github.com/Indeedornot/shorthandReprod) made using starting svelte-kit project

look at `src/routes/+page.svelte` and run `npm run format`

Pull request description:
(fix) respect strict mode and shorthand options when formatting bindings
Fixes #321

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 036808b..e3f34f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 ## 2.8.1 (Unreleased)
 
 * (fix) format `{#await .. catch ..}..{/await}` correctly ([#323](https://github.com/sveltejs/prettier-plugin-svelte/issues/323)) 
+* (fix) respect strict mode and shorthand options when formatting bindings ([#321](https://github.com/sveltejs/prettier-plugin-svelte/issues/321)) 
 
 ## 2.8.0
 
diff --git a/src/print/index.ts b/src/print/index.ts
index 5728e1a..774c349 100644
--- a/src/print/index.ts
+++ b/src/print/index.ts
@@ -608,7 +608,10 @@ export function print(path: FastPath, options: ParserOptions, print: PrintFn): D
             return concat([
                 'bind:',
                 node.name,
-                node.expression.type === 'Identifier' && node.expression.name === node.name
+                node.expression.type === 'Identifier' &&
+                node.expression.name === node.name &&
+                options.svelteAllowShorthand &&
+                !options.svelteStrictMode
                     ? ''
                     : concat(['=', ...printJsExpression()]),
             ]);


Test patch:
diff --git a/test/formatting/samples/strict-mode-false/input.html b/test/formatting/samples/strict-mode-false/input.html
new file mode 100644
index 0000000..fdf53ca
--- /dev/null
+++ b/test/formatting/samples/strict-mode-false/input.html
@@ -0,0 +1,8 @@
+<input value />
+<input value="string" />
+<input {value} />
+<input value={value} />
+<input value="{value}" />
+<input bind:value />
+<input bind:value={value} />
+<input bind:value="{value}" />
diff --git a/test/formatting/samples/strict-mode-false/output.html b/test/formatting/samples/strict-mode-false/output.html
new file mode 100644
index 0000000..b7951e1
--- /dev/null
+++ b/test/formatting/samples/strict-mode-false/output.html
@@ -0,0 +1,8 @@
+<input value />
+<input value="string" />
+<input {value} />
+<input {value} />
+<input {value} />
+<input bind:value />
+<input bind:value />
+<input bind:value />
diff --git a/test/formatting/samples/strict-mode-true/input.html b/test/formatting/samples/strict-mode-true/input.html
index 620e528..fdf53ca 100644
--- a/test/formatting/samples/strict-mode-true/input.html
+++ b/test/formatting/samples/strict-mode-true/input.html
@@ -3,3 +3,6 @@
 <input {value} />
 <input value={value} />
 <input value="{value}" />
+<input bind:value />
+<input bind:value={value} />
+<input bind:value="{value}" />
diff --git a/test/formatting/samples/strict-mode-true/output.html b/test/formatting/samples/strict-mode-true/output.html
index c293a2a..e029e6f 100644
--- a/test/formatting/samples/strict-mode-true/output.html
+++ b/test/formatting/samples/strict-mode-true/output.html
@@ -3,3 +3,6 @@
 <input value="{value}" />
 <input value="{value}" />
 <input value="{value}" />
+<input bind:value="{value}" />
+<input bind:value="{value}" />
+<input bind:value="{value}" />
diff --git a/test/printer/samples/allow-shorthand-false.html b/test/printer/samples/allow-shorthand-false.html
index c39f851..37b1490 100644
--- a/test/printer/samples/allow-shorthand-false.html
+++ b/test/printer/samples/allow-shorthand-false.html
@@ -1,3 +1,5 @@
 <input type="text" value={value} />
 
 <input type="text" data={data} />
+
+<input type="text" bind:value={value} />