Skip to content

Commit 099610e

Browse files
committed
add CONTRIBUTING.md
1 parent db46347 commit 099610e

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ tsconfig.json
88
tslint.json
99
.prettierrc
1010
.editorconfig
11+
CONTRIBUTING.md

CONTRIBUTING.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Contributing guidelines
2+
3+
Anyone is welcome to contribute to this project. Filing issues with detected bugs or false positives
4+
is appreciated, as is opening pull requests with fixes to those.
5+
6+
Before opening a pull request, make sure that all the tests pass by running
7+
8+
```sh
9+
npm run test
10+
```
11+
12+
It would be great if you added new test cases that cover the functionality you added/fixed in the
13+
pull request.
14+
15+
## Information for developers
16+
17+
Creating TSLint rules may seem complex in the beginning, but it is actually pretty easy once you
18+
understand the underlying concepts.
19+
20+
Each Typescript file is parsed into an Abstract Syntax Tree (AST). It is a tree structure that
21+
contains nodes like statements, expressions, identifier that appear in the file being linted. The
22+
rule can then analyze the AST and report rule violations.
23+
24+
Check the [TSLint documentation for developing TSLint rules](https://palantir.github.io/tslint/develop/custom-rules/)
25+
for more information on the subject.
26+
27+
[AST Explorer](https://astexplorer.net/) is an extremely useful tool when working with and exploring ASTs. It
28+
supports different parsers, so when developing TSLint rules make sure to pick the _typescript_
29+
parser from the settings bar at the top.

0 commit comments

Comments
 (0)