File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ tsconfig.json
88tslint.json
99.prettierrc
1010.editorconfig
11+ CONTRIBUTING.md
Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments