Skip to content

Commit d79c42b

Browse files
nzakasfasttime
andauthored
feat: Add Markdown languages (#268)
* chore: Add type checking * feat: Add type checking * feat: Add language * feat: Add Markdown language * Update prepare script * Update src/language/markdown-source-code.js Co-authored-by: Francesco Trotta <[email protected]> * Update src/rules/fenced-code-language.js Co-authored-by: Francesco Trotta <[email protected]> * Update src/rules/no-html.js Co-authored-by: Francesco Trotta <[email protected]> * Update docs/processors/markdown.md Co-authored-by: Francesco Trotta <[email protected]> * Update docs/processors/markdown.md Co-authored-by: Francesco Trotta <[email protected]> * Update docs/processors/markdown.md Co-authored-by: Francesco Trotta <[email protected]> * Fix link * fix no-html * Fix no-missing-label-refs * Add no-invalid-label-ref; add util * Fix linting error * Fix no-invalid-label-ref * Fix bugs in no-invalid-label-refs * fix no-missing-label-refs locations * Update comment --------- Co-authored-by: Francesco Trotta <[email protected]>
1 parent 0503748 commit d79c42b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2951
-203
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: "\U0001F41E Report a problem"
2+
description: "Report something that isn't working the way you expected."
3+
title: "Bug: (fill in)"
4+
labels:
5+
- bug
6+
- "repro:needed"
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: By opening an issue, you agree to abide by the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
11+
- type: textarea
12+
attributes:
13+
label: Environment
14+
description: |
15+
Please tell us about how you're running ESLint (Run `npx eslint --env-info`.)
16+
value: |
17+
ESLint version:
18+
@eslint/markdown version:
19+
Node version:
20+
npm version:
21+
Operating System:
22+
validations:
23+
required: true
24+
- type: dropdown
25+
attributes:
26+
label: Which language are you using?
27+
description: |
28+
Just tell us which language mode you're using.
29+
options:
30+
- commonmark
31+
- gfm
32+
validations:
33+
required: true
34+
- type: textarea
35+
attributes:
36+
label: What did you do?
37+
description: |
38+
Please include a *minimal* reproduction case.
39+
value: |
40+
<details>
41+
<summary>Configuration</summary>
42+
43+
```
44+
<!-- Paste your configuration here -->
45+
```
46+
</details>
47+
48+
```js
49+
<!-- Paste your code here -->
50+
```
51+
validations:
52+
required: true
53+
- type: textarea
54+
attributes:
55+
label: What did you expect to happen?
56+
validations:
57+
required: true
58+
- type: textarea
59+
attributes:
60+
label: What actually happened?
61+
description: |
62+
Please copy-paste the actual ESLint output.
63+
validations:
64+
required: true
65+
- type: input
66+
attributes:
67+
label: Link to Minimal Reproducible Example
68+
description: "Link to a [StackBlitz](https://stackblitz.com) or GitHub repo with a minimal reproduction of the problem. **A minimal reproduction is required** so that others can help debug your issue. If a report is vague (e.g. just a generic error message) and has no reproduction, it may be auto-closed."
69+
placeholder: "https://stackblitz.com/abcd1234"
70+
validations:
71+
required: true
72+
- type: checkboxes
73+
attributes:
74+
label: Participation
75+
options:
76+
- label: I am willing to submit a pull request for this issue.
77+
required: false
78+
- type: textarea
79+
attributes:
80+
label: Additional comments
81+
description: Is there anything else that's important for the team to know?

.github/ISSUE_TEMPLATE/change.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "\U0001F680 Request a change (not rule-related)"
2+
description: "Request a change that is not a bug fix, rule change, or new rule"
3+
title: "Change Request: (fill in)"
4+
labels:
5+
- enhancement
6+
- core
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: By opening an issue, you agree to abide by the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
11+
- type: textarea
12+
attributes:
13+
label: Environment
14+
description: |
15+
Please tell us about how you're running ESLint (Run `npx eslint --env-info`.)
16+
value: |
17+
ESLint version:
18+
@eslint/markdown version:
19+
Node version:
20+
npm version:
21+
Operating System:
22+
validations:
23+
required: true
24+
- type: textarea
25+
attributes:
26+
label: What problem do you want to solve?
27+
description: |
28+
Please explain your use case in as much detail as possible.
29+
placeholder: |
30+
The Markdown plugin currently...
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: What do you think is the correct solution?
36+
description: |
37+
Please explain how you'd like to change the Markdown plugin to address the problem.
38+
placeholder: |
39+
I'd like the Markdown plugin to...
40+
validations:
41+
required: true
42+
- type: checkboxes
43+
attributes:
44+
label: Participation
45+
options:
46+
- label: I am willing to submit a pull request for this change.
47+
required: false
48+
- type: textarea
49+
attributes:
50+
label: Additional comments
51+
description: Is there anything else that's important for the team to know?

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 🐛 Report a Parsing Error
4+
url: https://github.com/syntax-tree/mdast-util-from-markdown/issues/new/choose
5+
about: File an issue with the parser that this plugin uses
6+
- name: 🗣 Ask a Question, Discuss
7+
url: https://github.com/eslint/markdown/discussions
8+
about: Get help using this plugin
9+
- name: Discord Server
10+
url: https://eslint.org/chat
11+
about: Talk with the team

.github/ISSUE_TEMPLATE/docs.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "\U0001F4DD Docs"
2+
description: "Request an improvement to documentation"
3+
title: "Docs: (fill in)"
4+
labels:
5+
- documentation
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: By opening an issue, you agree to abide by the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
10+
- type: textarea
11+
attributes:
12+
label: Docs page(s)
13+
description: |
14+
What page(s) are you suggesting be changed or created?
15+
placeholder: |
16+
e.g. https://eslint.org/docs/latest/use/getting-started
17+
validations:
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: What documentation issue do you want to solve?
22+
description: |
23+
Please explain your issue in as much detail as possible.
24+
placeholder: |
25+
The docs currently...
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: What do you think is the correct solution?
31+
description: |
32+
Please explain how you'd like to change the docs to address the problem.
33+
placeholder: |
34+
I'd like the docs to...
35+
validations:
36+
required: true
37+
- type: checkboxes
38+
attributes:
39+
label: Participation
40+
options:
41+
- label: I am willing to submit a pull request for this change.
42+
required: false
43+
- type: textarea
44+
attributes:
45+
label: Additional comments
46+
description: Is there anything else that's important for the team to know?

.github/ISSUE_TEMPLATE/new-rule.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "\U0001F680 Propose a new rule"
2+
description: "Propose a new rule to be added to the plugin"
3+
title: "New Rule: (fill in)"
4+
labels:
5+
- rule
6+
- feature
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: By opening an issue, you agree to abide by the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
11+
- type: input
12+
attributes:
13+
label: Rule details
14+
description: What should the new rule do?
15+
validations:
16+
required: true
17+
- type: dropdown
18+
attributes:
19+
label: What type of rule is this?
20+
options:
21+
- Warns about a potential problem
22+
- Suggests an alternate way of doing something
23+
validations:
24+
required: true
25+
- type: textarea
26+
attributes:
27+
label: Example code
28+
description: Please provide some example code that this rule will warn about.
29+
render: markdown
30+
validations:
31+
required: true
32+
- type: checkboxes
33+
attributes:
34+
label: Participation
35+
options:
36+
- label: I am willing to submit a pull request to implement this rule.
37+
required: false
38+
- type: textarea
39+
attributes:
40+
label: Additional comments
41+
description: Is there anything else that's important for the team to know?
+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: "\U0001F4DD Request a rule change"
2+
description: "Request a change to an existing rule"
3+
title: "Rule Change: (fill in)"
4+
labels:
5+
- enhancement
6+
- rule
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: By opening an issue, you agree to abide by the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
11+
- type: input
12+
attributes:
13+
label: What rule do you want to change?
14+
validations:
15+
required: true
16+
- type: dropdown
17+
attributes:
18+
label: What change do you want to make?
19+
options:
20+
- Generate more warnings
21+
- Generate fewer warnings
22+
- Implement autofix
23+
- Implement suggestions
24+
validations:
25+
required: true
26+
- type: dropdown
27+
attributes:
28+
label: How do you think the change should be implemented?
29+
options:
30+
- A new option
31+
- A new default behavior
32+
- Other
33+
validations:
34+
required: true
35+
- type: textarea
36+
attributes:
37+
label: Example code
38+
description: Please provide some example code that this change will affect.
39+
render: markdown
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: What does the rule currently do for this code?
45+
validations:
46+
required: true
47+
- type: textarea
48+
attributes:
49+
label: What will the rule do after it's changed?
50+
validations:
51+
required: true
52+
- type: checkboxes
53+
attributes:
54+
label: Participation
55+
options:
56+
- label: I am willing to submit a pull request to implement this change.
57+
required: false
58+
- type: textarea
59+
attributes:
60+
label: Additional comments
61+
description: Is there anything else that's important for the team to know?

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ yarn.lock
99
package-lock.json
1010
pnpm-lock.yaml
1111
dist
12+
src/build

0 commit comments

Comments
 (0)