Skip to content

Commit 053f2e9

Browse files
author
Luc Marchaud
committed
Add TypeScript immplementation…ç
1 parent a27e0e7 commit 053f2e9

File tree

6 files changed

+2137
-0
lines changed

6 files changed

+2137
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ A [Go](https://golang.org/) version can be found in the [golang](golang) folder;
3131

3232
go run main.go
3333

34+
A [Typescript](https://www.typescriptlang.org/) version can be found in the [typescript](typescript) folder; produce the song with:
35+
36+
ts-node song.ts
3437

3538
You can find out more about the London Code Dojo at our [homepage](http://www.meetup.com/London-Code-Dojo/).
3639

typescript/.eslintrc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"env": {
3+
"es6": true,
4+
"browser": false,
5+
"node": true,
6+
"mocha": true
7+
},
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": 2020
15+
},
16+
"plugins": [ "@typescript-eslint" ],
17+
"globals": {
18+
"Logger": true
19+
},
20+
"rules": {
21+
"@typescript-eslint/indent": [
22+
"error",
23+
2,
24+
{ "SwitchCase": 1 }
25+
],
26+
"@typescript-eslint/naming-convention": [
27+
"warn",
28+
{ "selector": "variableLike", "format": ["camelCase"] }
29+
],
30+
"@typescript-eslint/no-var-requires": "warn",
31+
"@typescript-eslint/no-use-before-define": 0,
32+
"@typescript-eslint/explicit-function-return-type": [
33+
"warn",
34+
{
35+
"allowExpressions": true
36+
}
37+
],
38+
"linebreak-style": [ "error", "unix" ],
39+
"quotes": [ "error", "single" ],
40+
"semi": [ "error", "always" ],
41+
"eqeqeq": [ 1, "smart" ],
42+
"no-console": 1,
43+
"no-var": "error",
44+
"prefer-const": "warn",
45+
"@typescript-eslint/no-empty-function": ["error", { "allow": ["arrowFunctions"] }],
46+
"@typescript-eslint/ban-ts-comment": "warn",
47+
"eol-last": [ "error", "always" ],
48+
"space-infix-ops": "error",
49+
"arrow-spacing": "error",
50+
"no-trailing-spaces": "error",
51+
"@typescript-eslint/no-inferrable-types": "off",
52+
"no-undef": "off"
53+
}
54+
}

0 commit comments

Comments
 (0)