Skip to content

Commit e77fbf5

Browse files
committed
Update contributing docs
1 parent 21d6af4 commit e77fbf5

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[*.yml]
11+
[*.{yml,md}]
1212
indent_size = 2

CONTRIBUTING.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,29 @@ The tests for this project can be executed using the standard `npm test`. This r
2929

3030
Due to the time required to run all tests, it is impractical to run every test while developing part of the transpiler. To speed up the test run you can:
3131

32-
- Use `npm test -- --watchAll` to start tests and rerun them on change
33-
- Use `npm test name` or interactive watching interface to run tests that match a file name pattern
34-
- Add `.only` to test definition to run a single test in the file
32+
- Use `npm test name` to run tests that match a file name pattern
33+
34+
- Use `npm test -- --watchAll [name]` to start tests and rerun them on change
35+
36+
- Check out `Watch Usage` in the watching interface to get information about filtering tests without restarting CLI
37+
38+
- Use `.only` and `.skip` to filter executed tests in the file
39+
40+
```ts
41+
// Skipped
42+
test("test", () => {});
43+
44+
// Executed
45+
test.only("test", () => {});
46+
```
3547

3648
## Testing Guidelines
3749
When submitting a pull request with new functionality, we require some functional (transpile and execute Lua) to be added, to ensure the new functionality works as expected, and will continue to work that way.
3850

3951
Translation tests are discouraged as in most cases as we do not really care about the exact Lua output, as long as executing it results in the correct result (which is tested by functional tests).
4052

4153
## Coding Conventions
42-
Most coding conventions are enforced by the TSLint and Prettier. You can check your code locally by running `npm run lint`. CI process will fail if code does not pass the linter. You also might want to get extensions for your code editor to get immediate feedback.
54+
Most coding conventions are enforced by the TSLint and Prettier. You can check your code locally by running `npm run lint`. The CI build will fail if your code does not pass the linter. For better experience, you can install extensions for your code editor for [TSLint](https://palantir.github.io/tslint/usage/third-party-tools/) and [Prettier](https://prettier.io/docs/en/editors.html).
4355

4456
Some extra conventions worth mentioning:
4557
* Do not abbreviate variable names. The exception here are inline lambda arguments, if it is obvious what the argument is you can abbreviate to the first letter, e.g: `statements.filter(s => ts.VariableStatement(s))`

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"overrides": [
4343
{
4444
"files": [
45+
"**/*.md",
4546
"**/*.yml",
4647
"**/.*.yml"
4748
],

0 commit comments

Comments
 (0)