Skip to content

Commit 3e9eadc

Browse files
committed
chore: update manifests, actions and docs
1 parent 8ea2f2e commit 3e9eadc

18 files changed

+361
-187
lines changed

.eslintrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
'env': {
3+
'commonjs': true,
4+
'es2021': true,
5+
},
6+
'extends': 'google',
7+
'overrides': [
8+
],
9+
'parserOptions': {
10+
'ecmaVersion': 'latest',
11+
'sourceType': 'module',
12+
},
13+
'rules': {
14+
'indent': ['error', 2, {'SwitchCase': 1}],
15+
'max-len': [
16+
'error',
17+
{'code': 120, 'ignoreComments': true, 'ignoreUrls': true, 'ignoreStrings': true},
18+
],
19+
},
20+
};

.gitattributes

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
1-
parser.c linguist-vendored
2-
parser.h linguist-vendored
3-
grammar.json linguist-vendored
4-
tsx/examples/* linguist-vendored
5-
typescript/examples/* linguist-vendored
1+
typescript/src/** linguist-vendored
2+
tsx/src/** linguist-vendored
3+
4+
/examples/* linguist-vendored
5+
6+
typescript/src/grammar.json linguist-generated
7+
typescript/src/node-types.json linguist-generated
8+
typescript/src/parser.c linguist-generated
9+
10+
tsx/src/grammar.json linguist-generated
11+
tsx/src/node-types.json linguist-generated
12+
tsx/src/parser.c linguist-generated
13+
14+
typescript/src/grammar.json -diff
15+
typescript/src/node-types.json -diff
16+
typescript/src/parser.c -diff
17+
18+
tsx/src/grammar.json -diff
19+
tsx/src/node-types.json -diff
20+
tsx/src/parser.c -diff

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Bug Report
2+
description: File a bug or issue
3+
title: "bug: "
4+
labels: [bug]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
**Before** reporting an issue, make sure to search [existing issues](https://github.com/tree-sitter/tree-sitter-typescript/issues). Usage questions such as ***"How do I...?"*** either belong in [Discussions](https://github.com/tree-sitter/tree-sitter/discussions) upstream or in our [Discord server](https://discord.gg/w7nTvsVJhm) and will be closed.
10+
If your issue is related to a bug in your editor-experience because your editor *leverages* tree-sitter and this parser, then it is likely your issue does *NOT* belong here and belongs in the relevant editor's repository.
11+
- type: checkboxes
12+
attributes:
13+
label: Did you check existing issues?
14+
description: Make sure you've checked all of the below before submitting an issue
15+
options:
16+
- label: I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser
17+
required: false
18+
- label: I have searched the existing issues of tree-sitter-typescript
19+
required: true
20+
- type: input
21+
attributes:
22+
label: "Tree-Sitter CLI Version, if relevant (output of `tree-sitter --version`)"
23+
placeholder: "tree-sitter 0.20.8 (6bbb50bef8249e6460e7d69e42cc8146622fa4fd)"
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Describe the bug
29+
description: A clear and concise description of what the bug is. Please include any related errors you see such as parsing errors or tree-sitter cli errors.
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: Steps To Reproduce/Bad Parse Tree
35+
description: Steps to reproduce the behavior. If you have a bad parse tree, please include it here. You can get this by running `tree-sitter parse <path-to-file>` and copying the output.
36+
placeholder: |
37+
1.
38+
2.
39+
3.
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: Expected Behavior/Parse Tree
45+
description: A concise description of what you expected to happen, or in the case of a bad parse tree, the expected parse tree.
46+
validations:
47+
required: true
48+
- type: textarea
49+
attributes:
50+
label: Repro
51+
description: Minimal code to reproduce this issue. Ideally this should be reproducible with the C library or the tree-sitter cli, do not suggest an editor or external tool. Also, a link to the TypeScript Playground showing that the snippet below is valid JavaScript or TypeScript would be great (https://www.typescriptlang.org/play)
52+
value: |
53+
// Example code that causes the issue
54+
function foo() {
55+
// Code that fails to parse, or causes an error
56+
}
57+
render: TypeScript
58+
validations:
59+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Feature Request
2+
description: Suggest a new feature
3+
title: "feature: "
4+
labels: [enhancement]
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Did you check the tree-sitter docs?
9+
description: Make sure you read all the docs before submitting a feature request
10+
options:
11+
- label: I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser
12+
required: false
13+
- type: textarea
14+
validations:
15+
required: true
16+
attributes:
17+
label: Is your feature request related to a problem? Please describe.
18+
description: A clear and concise description of what the problem is. Ex. I think the grammar models this rule incorrectly and can be improved, or the TypeScript spec has officially added a new feature that should be added to the grammar.
19+
- type: textarea
20+
validations:
21+
required: true
22+
attributes:
23+
label: Describe the solution you'd like
24+
description: A clear and concise description of what you want to happen.
25+
- type: textarea
26+
validations:
27+
required: true
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: A clear and concise description of any alternative solutions or features you've considered.
31+
- type: textarea
32+
validations:
33+
required: false
34+
attributes:
35+
label: Additional context
36+
description: Add any other context or screenshots about the feature request here. If your feature request is related to a new TypeScript feature, please include a link to the relevant **official** TypeScript documentation.

.github/pull_request_template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1+
# Checklist
12

2-
3-
Checklist:
43
- [ ] All tests pass in CI.
54
- [ ] There are sufficient tests for the new fix/feature.
65
- [ ] Grammar rules have not been renamed unless absolutely necessary.

.github/workflows/build.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
fail-fast: true
12+
matrix:
13+
os: [macos-latest, ubuntu-latest]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
- run: npm install
20+
- run: npm test
21+
22+
test_windows:
23+
runs-on: windows-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 18
29+
- run: npm install
30+
- run: npm run test-windows

0 commit comments

Comments
 (0)