@react-pug/typescript-plugin-react-pug 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @react-pug/typescript-plugin-react-pug
2
+
3
+ TypeScript language-service plugin for `pug\`...\`` tagged template literals in React files.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm i -D @react-pug/typescript-plugin-react-pug
9
+ ```
10
+
11
+ ## tsconfig.json
12
+
13
+ ```json
14
+ {
15
+ "compilerOptions": {
16
+ "plugins": [
17
+ { "name": "@react-pug/typescript-plugin-react-pug" }
18
+ ]
19
+ }
20
+ }
21
+ ```
22
+
23
+ ## Important
24
+
25
+ This is a TypeScript language-service plugin. It is used by editor hosts such as VS Code TypeScript support. Plain `tsc` does not execute language-service plugins during a normal CLI build.
26
+
27
+ For VS Code users, the `vscode-react-pug-tsx` extension already wires this plugin into the editor host.
28
+
29
+ ## Config Options
30
+
31
+ The plugin accepts the same core options exposed by the VS Code extension:
32
+
33
+ - `enabled`
34
+ - `diagnostics.enabled`
35
+ - `tagFunction`
36
+ - `requirePugImport`: boolean
37
+ - `injectCssxjsTypes`: `never | auto | force`
38
+ - `classShorthandProperty`: `auto | className | class | styleName`
39
+ - `classShorthandMerge`: `auto | concatenate | classnames`
40
+ - `componentPathFromUppercaseClassShorthand`: boolean
41
+
42
+ When `requirePugImport` is enabled, the plugin reports an editor diagnostic if a file uses the configured tag without importing it explicitly. Used `pug` imports are removed from the shadow document to avoid false unused-import diagnostics.
43
+
44
+ Published output is in `dist/`.