textlint-plugin-typst 1.0.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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -0
  3. package/lib/index.js +8075 -0
  4. package/package.json +45 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 3w36zj6
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,106 @@
1
+ # textlint-plugin-typst
2
+
3
+ [![NPM Version](https://img.shields.io/npm/v/textlint-plugin-typst)](https://www.npmjs.com/package/textlint-plugin-typst?activeTab=versions)
4
+ [![NPM Downloads](https://img.shields.io/npm/d18m/textlint-plugin-typst)](https://www.npmjs.com/package/textlint-plugin-typst)
5
+ [![NPM License](https://img.shields.io/npm/l/textlint-plugin-typst)](https://github.com/3w36zj6/textlint-plugin-typst/blob/HEAD/LICENSE)
6
+ [![CI](https://github.com/3w36zj6/textlint-plugin-typst/actions/workflows/ci.yaml/badge.svg?branch=main&event=push)](https://github.com/3w36zj6/textlint-plugin-typst/actions/workflows/ci.yaml)
7
+
8
+ [textlint](https://github.com/textlint/textlint) plugin to lint [Typst](https://typst.app/)
9
+
10
+ ## Installation
11
+
12
+ ```sh
13
+ # npm
14
+ npm install textlint-plugin-typst
15
+
16
+ # Yarn
17
+ yarn add textlint-plugin-typst
18
+
19
+ # pnpm
20
+ pnpm add textlint-plugin-typst
21
+
22
+ # Bun
23
+ bun add textlint-plugin-typst
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ```json
29
+ {
30
+ "plugins": {
31
+ "typst": true
32
+ }
33
+ }
34
+ ```
35
+
36
+ ## Options
37
+
38
+ - `extensions`: `string[]`
39
+ - Additional file extensions for Typst
40
+
41
+ ## Syntax support
42
+
43
+ Legend for syntax support:
44
+
45
+ - ✅: Supported
46
+ - 🚫: Not in progress
47
+ - ⌛️: In progress
48
+ - ⚠️: Partially supported (with some caveats)
49
+
50
+ | Typst | textlint | Markup | Function |
51
+ | --- | --- | --- | --- |
52
+ | Paragraph break | Paragraph | ✅ | 🚫 |
53
+ | Strong emphasis | Strong | ✅ | 🚫 |
54
+ | Emphasis | Emphasis | ✅ | 🚫 |
55
+ | Raw text | Code / CodeBlock | ✅ | 🚫 |
56
+ | Link | Link | ✅ | 🚫 |
57
+ | Label | | 🚫 | 🚫 |
58
+ | Reference | | 🚫 | 🚫 |
59
+ | Heading | Header | ✅ | 🚫 |
60
+ | Bullet list | List / ListItem | 🚫 | 🚫 |
61
+ | Numbered list | List / ListItem | 🚫 | 🚫 |
62
+ | Term list | | 🚫 | 🚫 |
63
+ | Math | | 🚫 | 🚫 |
64
+ | Line break | Break | ✅ | 🚫 |
65
+ | Smart quote | | 🚫 | 🚫 |
66
+ | Symbol shorthand | | 🚫 | 🚫 |
67
+ | Code expression | | 🚫 | 🚫 |
68
+ | Character escape | | 🚫 | 🚫 |
69
+ | Comment | Comment | ✅ | 🚫 |
70
+
71
+ ## Examples
72
+
73
+ ### textlint-filter-rule-comments
74
+
75
+ Example of how to use [textlint-filter-rule-comments](https://www.npmjs.com/package/textlint-filter-rule-comments) is shown below.
76
+
77
+ ```typst
78
+ This is error text.
79
+
80
+ /* textlint-disable */
81
+
82
+ This is ignored text by rule.
83
+ Disables all rules between comments
84
+
85
+ /* textlint-enable */
86
+
87
+ This is error text.
88
+ ```
89
+
90
+ ## Contributing
91
+
92
+ This project is still under development, so please feel free to contribute!
93
+
94
+ 1. Fork it!
95
+ 2. Create your feature branch: `git checkout -b my-new-feature`
96
+ 3. Commit your changes: `git commit -am 'Add some feature'`
97
+ 4. Push to the branch: `git push origin my-new-feature`
98
+ 5. Submit a pull request :D
99
+
100
+ ## Maintainers
101
+
102
+ - [@3w36zj6](https://github.com/3w36zj6)
103
+
104
+ ## License
105
+
106
+ [MIT License](LICENSE)