trackler 2.2.1.130 → 2.2.1.131
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/crypto-square/description.md +4 -5
- data/problem-specifications/exercises/isbn-verifier/canonical-data.json +9 -1
- data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +1 -4
- data/tracks/csharp/build.ps1 +46 -130
- data/tracks/csharp/build.sh +21 -70
- data/tracks/ecmascript/exercises/simple-cipher/simple-cipher.spec.js +14 -0
- data/tracks/fsharp/build.ps1 +46 -130
- data/tracks/fsharp/build.sh +21 -70
- data/tracks/fsharp/exercises/bank-account/BankAccountTest.fs +13 -12
- data/tracks/fsharp/exercises/bank-account/Example.fs +2 -2
- data/tracks/fsharp/exercises/grade-school/.meta/hints.md +1 -0
- data/tracks/fsharp/exercises/grade-school/GradeSchool.fs +6 -4
- data/tracks/fsharp/exercises/zipper/ZipperTest.fs +79 -26
- data/tracks/fsharp/generators/Common.fs +2 -0
- data/tracks/fsharp/generators/Generators.fs +100 -0
- data/tracks/java/exercises/house/.meta/src/reference/java/House.java +2 -2
- data/tracks/java/exercises/house/.meta/version +1 -1
- data/tracks/java/exercises/house/src/test/java/HouseTest.java +157 -172
- data/tracks/java/exercises/rectangles/.meta/version +1 -1
- data/tracks/java/exercises/rectangles/src/test/java/RectangleCounterTest.java +9 -1
- data/tracks/javascript/exercises/bob/bob.spec.js +1 -1
- data/tracks/javascript/exercises/bob/example.js +3 -0
- data/tracks/javascript/exercises/simple-cipher/simple-cipher.spec.js +14 -0
- data/tracks/julia/config.json +2 -2
- data/tracks/julia/exercises/nucleotide-count/example.jl +1 -1
- data/tracks/julia/exercises/nucleotide-count/runtests.jl +1 -1
- data/tracks/perl5/.travis.yml +1 -4
- data/tracks/perl5/exercises/food-chain/.meta/solutions/FoodChainSong.pm +1 -0
- data/tracks/perl5/exercises/pascals-triangle/.meta/solutions/Triangle.pm +1 -0
- data/tracks/perl5/exercises/pig-latin/.meta/solutions/PigLatin.pm +1 -0
- data/tracks/perl5/exercises/robot-simulator/.meta/solutions/Robot.pm +1 -0
- data/tracks/python/config.json +15 -0
- data/tracks/python/exercises/bowling/bowling_test.py +1 -1
- data/tracks/python/exercises/bracket-push/bracket_push_test.py +4 -1
- data/tracks/python/exercises/isbn-verifier/isbn_verifier_test.py +5 -2
- data/tracks/python/exercises/yacht/README.md +85 -0
- data/tracks/python/exercises/yacht/example.py +65 -0
- data/tracks/python/exercises/yacht/yacht.py +18 -0
- data/tracks/python/exercises/yacht/yacht_test.py +90 -0
- data/tracks/typescript/config.json +25 -0
- data/tracks/typescript/exercises/complex-numbers/README.md +64 -0
- data/tracks/typescript/exercises/complex-numbers/complex-numbers.example.ts +45 -0
- data/tracks/typescript/exercises/complex-numbers/complex-numbers.test.ts +216 -0
- data/tracks/typescript/exercises/complex-numbers/complex-numbers.ts +0 -0
- data/tracks/typescript/exercises/complex-numbers/package.json +36 -0
- data/tracks/typescript/exercises/complex-numbers/tsconfig.json +22 -0
- data/tracks/typescript/exercises/complex-numbers/tslint.json +127 -0
- data/tracks/typescript/exercises/complex-numbers/yarn.lock +2624 -0
- data/tracks/typescript/exercises/minesweeper/README.md +55 -0
- data/tracks/typescript/exercises/minesweeper/minesweeper.example.ts +58 -0
- data/tracks/typescript/exercises/minesweeper/minesweeper.test.ts +173 -0
- data/tracks/typescript/exercises/minesweeper/minesweeper.ts +0 -0
- data/tracks/typescript/exercises/minesweeper/package.json +36 -0
- data/tracks/typescript/exercises/minesweeper/tsconfig.json +22 -0
- data/tracks/typescript/exercises/minesweeper/tslint.json +127 -0
- data/tracks/typescript/exercises/minesweeper/yarn.lock +2624 -0
- data/tracks/typescript/exercises/simple-cipher/simple-cipher.test.ts +14 -0
- metadata +22 -2
@@ -373,6 +373,19 @@
|
|
373
373
|
"unlocked_by": "bob",
|
374
374
|
"uuid": "b18876a7-f281-46e5-94b9-f805bb0d1fec"
|
375
375
|
},
|
376
|
+
{
|
377
|
+
"core": false,
|
378
|
+
"difficulty": 4,
|
379
|
+
"slug": "complex-numbers",
|
380
|
+
"topics": [
|
381
|
+
"arrays",
|
382
|
+
"control_flow_conditionals",
|
383
|
+
"control_flow_loops",
|
384
|
+
"mathematics"
|
385
|
+
],
|
386
|
+
"unlocked_by": "space-age",
|
387
|
+
"uuid": "59d842b4-a804-4cd5-a388-983a22a70c9e"
|
388
|
+
},
|
376
389
|
{
|
377
390
|
"core": false,
|
378
391
|
"difficulty": 5,
|
@@ -589,6 +602,18 @@
|
|
589
602
|
],
|
590
603
|
"uuid": "269577e5-e782-4264-9ad9-9ad4b8bc0aab"
|
591
604
|
},
|
605
|
+
{
|
606
|
+
"core": false,
|
607
|
+
"difficulty": 7,
|
608
|
+
"slug": "minesweeper",
|
609
|
+
"topics": [
|
610
|
+
"algorithms",
|
611
|
+
"arrays",
|
612
|
+
"games"
|
613
|
+
],
|
614
|
+
"unlocked_by": null,
|
615
|
+
"uuid": "f5b00e76-3015-444d-8012-9862990db08c"
|
616
|
+
},
|
592
617
|
{
|
593
618
|
"core": false,
|
594
619
|
"difficulty": 8,
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Complex Numbers
|
2
|
+
|
3
|
+
A complex number is a number in the form `a + b * i` where `a` and `b` are real and `i` satisfies `i^2 = -1`.
|
4
|
+
|
5
|
+
`a` is called the real part and `b` is called the imaginary part of `z`.
|
6
|
+
The conjugate of the number `a + b * i` is the number `a - b * i`.
|
7
|
+
The absolute value of a complex number `z = a + b * i` is a real number `|z| = sqrt(a^2 + b^2)`. The square of the absolute value `|z|^2` is the result of multiplication of `z` by its complex conjugate.
|
8
|
+
|
9
|
+
The sum/difference of two complex numbers involves adding/subtracting their real and imaginary parts separately:
|
10
|
+
`(a + i * b) + (c + i * d) = (a + c) + (b + d) * i`,
|
11
|
+
`(a + i * b) - (c + i * d) = (a - c) + (b - d) * i`.
|
12
|
+
|
13
|
+
Multiplication result is by definition
|
14
|
+
`(a + i * b) * (c + i * d) = (a * c - b * d) + (b * c + a * d) * i`.
|
15
|
+
|
16
|
+
The reciprocal of a non-zero complex number is
|
17
|
+
`1 / (a + i * b) = a/(a^2 + b^2) - b/(a^2 + b^2) * i`.
|
18
|
+
|
19
|
+
Dividing a complex number `a + i * b` by another `c + i * d` gives:
|
20
|
+
`(a + i * b) / (c + i * d) = (a * c + b * d)/(c^2 + d^2) + (b * c - a * d)/(c^2 + d^2) * i`.
|
21
|
+
|
22
|
+
Exponent of a complex number can be expressed as
|
23
|
+
`exp(a + i * b) = exp(a) * exp(i * b)`,
|
24
|
+
and the last term is given by Euler's formula `exp(i * b) = cos(b) + i * sin(b)`.
|
25
|
+
|
26
|
+
|
27
|
+
Implement the following operations:
|
28
|
+
- addition, subtraction, multiplication and division of two complex numbers,
|
29
|
+
- conjugate, absolute value, exponent of a given complex number.
|
30
|
+
|
31
|
+
|
32
|
+
Assume the programming language you are using does not have an implementation of complex numbers.
|
33
|
+
|
34
|
+
## Setup
|
35
|
+
|
36
|
+
Go through the setup instructions for TypeScript to
|
37
|
+
install the necessary dependencies:
|
38
|
+
|
39
|
+
http://exercism.io/languages/typescript
|
40
|
+
|
41
|
+
## Requirements
|
42
|
+
|
43
|
+
Install assignment dependencies:
|
44
|
+
|
45
|
+
```bash
|
46
|
+
$ yarn install
|
47
|
+
```
|
48
|
+
|
49
|
+
## Making the test suite pass
|
50
|
+
|
51
|
+
Execute the tests with:
|
52
|
+
|
53
|
+
```bash
|
54
|
+
$ yarn test
|
55
|
+
```
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
## Source
|
60
|
+
|
61
|
+
Wikipedia [https://en.wikipedia.org/wiki/Complex_number](https://en.wikipedia.org/wiki/Complex_number)
|
62
|
+
|
63
|
+
## Submitting Incomplete Solutions
|
64
|
+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.
|
@@ -0,0 +1,45 @@
|
|
1
|
+
export default class ComplexNumber {
|
2
|
+
real: number
|
3
|
+
imag: number
|
4
|
+
|
5
|
+
constructor(real: number, imag: number) {
|
6
|
+
this.real = real
|
7
|
+
this.imag = imag
|
8
|
+
}
|
9
|
+
|
10
|
+
add(other: ComplexNumber) {
|
11
|
+
return new ComplexNumber(this.real + other.real, this.imag + other.imag)
|
12
|
+
}
|
13
|
+
|
14
|
+
sub(other: ComplexNumber) {
|
15
|
+
return new ComplexNumber(this.real - other.real, this.imag - other.imag)
|
16
|
+
}
|
17
|
+
|
18
|
+
mul(other: ComplexNumber) {
|
19
|
+
return new ComplexNumber(
|
20
|
+
(this.real * other.real) - (this.imag * other.imag),
|
21
|
+
(this.imag * other.real) + (this.real * other.imag))
|
22
|
+
}
|
23
|
+
|
24
|
+
div(other: ComplexNumber) {
|
25
|
+
return new ComplexNumber(
|
26
|
+
((this.real * other.real) + (this.imag * other.imag))
|
27
|
+
/ ((other.real * other.real) + (other.imag * other.imag)),
|
28
|
+
((this.imag * other.real) - (this.real * other.imag))
|
29
|
+
/ ((other.real * other.real) + (other.imag * other.imag)))
|
30
|
+
}
|
31
|
+
|
32
|
+
get abs() {
|
33
|
+
return Math.sqrt((this.real * this.real) + (this.imag * this.imag))
|
34
|
+
}
|
35
|
+
|
36
|
+
get conj() {
|
37
|
+
return new ComplexNumber(this.real, this.imag !== 0 ? -this.imag : 0)
|
38
|
+
}
|
39
|
+
|
40
|
+
get exp() {
|
41
|
+
return new ComplexNumber(
|
42
|
+
Math.exp(this.real) * Math.cos(this.imag),
|
43
|
+
Math.exp(this.real) * Math.sin(this.imag))
|
44
|
+
}
|
45
|
+
}
|
@@ -0,0 +1,216 @@
|
|
1
|
+
import ComplexNumber from './complex-numbers'
|
2
|
+
|
3
|
+
describe('Complex numbers', () => {
|
4
|
+
it('Real part of a purely real number', () => {
|
5
|
+
const expected = 1
|
6
|
+
const actual = new ComplexNumber(1, 0).real
|
7
|
+
|
8
|
+
expect(actual).toEqual(expected)
|
9
|
+
})
|
10
|
+
|
11
|
+
xit('Real part of a purely imaginary number', () => {
|
12
|
+
const expected = 0
|
13
|
+
const actual = new ComplexNumber(0, 1).real
|
14
|
+
|
15
|
+
expect(actual).toEqual(expected)
|
16
|
+
})
|
17
|
+
|
18
|
+
xit('Real part of a number with real and imaginary part', () => {
|
19
|
+
const expected = 1
|
20
|
+
const actual = new ComplexNumber(1, 2).real
|
21
|
+
|
22
|
+
expect(actual).toEqual(expected)
|
23
|
+
})
|
24
|
+
|
25
|
+
xit('Imaginary part of a purely real number', () => {
|
26
|
+
const expected = 0
|
27
|
+
const actual = new ComplexNumber(1, 0).imag
|
28
|
+
|
29
|
+
expect(actual).toEqual(expected)
|
30
|
+
})
|
31
|
+
|
32
|
+
xit('Imaginary part of a purely imaginary number', () => {
|
33
|
+
const expected = 1
|
34
|
+
const actual = new ComplexNumber(0, 1).imag
|
35
|
+
|
36
|
+
expect(actual).toEqual(expected)
|
37
|
+
})
|
38
|
+
|
39
|
+
xit('Imaginary part of a number with real and imaginary part', () => {
|
40
|
+
const expected = 2
|
41
|
+
const actual = new ComplexNumber(1, 2).imag
|
42
|
+
|
43
|
+
expect(actual).toEqual(expected)
|
44
|
+
})
|
45
|
+
|
46
|
+
xit('Add purely real numbers', () => {
|
47
|
+
const expected = new ComplexNumber(3, 0)
|
48
|
+
const actual = new ComplexNumber(1, 0).add(new ComplexNumber(2, 0))
|
49
|
+
|
50
|
+
expect(actual).toEqual(expected)
|
51
|
+
})
|
52
|
+
|
53
|
+
xit('Add purely imaginary numbers', () => {
|
54
|
+
const expected = new ComplexNumber(0, 3)
|
55
|
+
const actual = new ComplexNumber(0, 1).add(new ComplexNumber(0, 2))
|
56
|
+
|
57
|
+
expect(actual).toEqual(expected)
|
58
|
+
})
|
59
|
+
|
60
|
+
xit('Add numbers with real and imaginary part', () => {
|
61
|
+
const expected = new ComplexNumber(4, 6)
|
62
|
+
const actual = new ComplexNumber(1, 2).add(new ComplexNumber(3, 4))
|
63
|
+
|
64
|
+
expect(actual).toEqual(expected)
|
65
|
+
})
|
66
|
+
|
67
|
+
xit('Subtract purely real numbers', () => {
|
68
|
+
const expected = new ComplexNumber(-1, 0)
|
69
|
+
const actual = new ComplexNumber(1, 0).sub(new ComplexNumber(2, 0))
|
70
|
+
|
71
|
+
expect(actual).toEqual(expected)
|
72
|
+
})
|
73
|
+
|
74
|
+
xit('Subtract purely imaginary numbers', () => {
|
75
|
+
const expected = new ComplexNumber(0, -1)
|
76
|
+
const actual = new ComplexNumber(0, 1).sub(new ComplexNumber(0, 2))
|
77
|
+
|
78
|
+
expect(actual).toEqual(expected)
|
79
|
+
})
|
80
|
+
|
81
|
+
xit('Subtract numbers with real and imaginary part', () => {
|
82
|
+
const expected = new ComplexNumber(-2, -2)
|
83
|
+
const actual = new ComplexNumber(1, 2).sub(new ComplexNumber(3, 4))
|
84
|
+
|
85
|
+
expect(actual).toEqual(expected)
|
86
|
+
})
|
87
|
+
|
88
|
+
xit('Multiply purely real numbers', () => {
|
89
|
+
const expected = new ComplexNumber(2, 0)
|
90
|
+
const actual = new ComplexNumber(1, 0).mul(new ComplexNumber(2, 0))
|
91
|
+
|
92
|
+
expect(actual).toEqual(expected)
|
93
|
+
})
|
94
|
+
|
95
|
+
xit('Multiply imaginary unit', () => {
|
96
|
+
const expected = new ComplexNumber(-1, 0)
|
97
|
+
const actual = new ComplexNumber(0, 1).mul(new ComplexNumber(0, 1))
|
98
|
+
|
99
|
+
expect(actual).toEqual(expected)
|
100
|
+
})
|
101
|
+
|
102
|
+
xit('Multiply purely imaginary numbers', () => {
|
103
|
+
const expected = new ComplexNumber(-2, 0)
|
104
|
+
const actual = new ComplexNumber(0, 1).mul(new ComplexNumber(0, 2))
|
105
|
+
|
106
|
+
expect(actual).toEqual(expected)
|
107
|
+
})
|
108
|
+
|
109
|
+
xit('Multiply numbers with real and imaginary part', () => {
|
110
|
+
const expected = new ComplexNumber(-5, 10)
|
111
|
+
const actual = new ComplexNumber(1, 2).mul(new ComplexNumber(3, 4))
|
112
|
+
|
113
|
+
expect(actual).toEqual(expected)
|
114
|
+
})
|
115
|
+
|
116
|
+
xit('Divide purely real numbers', () => {
|
117
|
+
const expected = new ComplexNumber(0.5, 0)
|
118
|
+
const actual = new ComplexNumber(1, 0).div(new ComplexNumber(2, 0))
|
119
|
+
|
120
|
+
expect(actual).toEqual(expected)
|
121
|
+
})
|
122
|
+
|
123
|
+
xit('Divide purely imaginary numbers', () => {
|
124
|
+
const expected = new ComplexNumber(0.5, 0)
|
125
|
+
const actual = new ComplexNumber(0, 1).div(new ComplexNumber(0, 2))
|
126
|
+
|
127
|
+
expect(actual).toEqual(expected)
|
128
|
+
})
|
129
|
+
|
130
|
+
xit('Divide numbers with real and imaginary part', () => {
|
131
|
+
const expected = new ComplexNumber(0.44, 0.08)
|
132
|
+
const actual = new ComplexNumber(1, 2).div(new ComplexNumber(3, 4))
|
133
|
+
|
134
|
+
expect(actual).toEqual(expected)
|
135
|
+
})
|
136
|
+
|
137
|
+
xit('Absolute value of a positive purely real number', () => {
|
138
|
+
const expected = 5
|
139
|
+
const actual = new ComplexNumber(5, 0).abs
|
140
|
+
|
141
|
+
expect(actual).toEqual(expected)
|
142
|
+
})
|
143
|
+
|
144
|
+
xit('Absolute value of a negative purely real number', () => {
|
145
|
+
const expected = 5
|
146
|
+
const actual = new ComplexNumber(-5, 0).abs
|
147
|
+
|
148
|
+
expect(actual).toEqual(expected)
|
149
|
+
})
|
150
|
+
|
151
|
+
xit('Absolute value of a purely imaginary number with positive imaginary part', () => {
|
152
|
+
const expected = 5
|
153
|
+
const actual = new ComplexNumber(0, 5).abs
|
154
|
+
|
155
|
+
expect(actual).toEqual(expected)
|
156
|
+
})
|
157
|
+
|
158
|
+
xit('Absolute value of a purely imaginary number with negative imaginary part', () => {
|
159
|
+
const expected = 5
|
160
|
+
const actual = new ComplexNumber(0, -5).abs
|
161
|
+
|
162
|
+
expect(actual).toEqual(expected)
|
163
|
+
})
|
164
|
+
|
165
|
+
xit('Absolute value of a number with real and imaginary part', () => {
|
166
|
+
const expected = 5
|
167
|
+
const actual = new ComplexNumber(3, 4).abs
|
168
|
+
|
169
|
+
expect(actual).toEqual(expected)
|
170
|
+
})
|
171
|
+
|
172
|
+
xit('Conjugate a purely real number', () => {
|
173
|
+
const expected = new ComplexNumber(5, 0)
|
174
|
+
const actual = new ComplexNumber(5, 0).conj
|
175
|
+
|
176
|
+
expect(actual).toEqual(expected)
|
177
|
+
})
|
178
|
+
|
179
|
+
xit('Conjugate a purely imaginary number', () => {
|
180
|
+
const expected = new ComplexNumber(0, -5)
|
181
|
+
const actual = new ComplexNumber(0, 5).conj
|
182
|
+
|
183
|
+
expect(actual).toEqual(expected)
|
184
|
+
})
|
185
|
+
|
186
|
+
xit('Conjugate a number with real and imaginary part', () => {
|
187
|
+
const expected = new ComplexNumber(1, -1)
|
188
|
+
const actual = new ComplexNumber(1, 1).conj
|
189
|
+
|
190
|
+
expect(actual).toEqual(expected)
|
191
|
+
})
|
192
|
+
|
193
|
+
xit('Euler\'s identity/formula', () => {
|
194
|
+
const expected = new ComplexNumber(-1, 0)
|
195
|
+
const actual = new ComplexNumber(0, Math.PI).exp
|
196
|
+
|
197
|
+
expect(actual.real).toBeCloseTo(expected.real)
|
198
|
+
expect(actual.imag).toBeCloseTo(expected.imag)
|
199
|
+
})
|
200
|
+
|
201
|
+
xit('Exponential of 0', () => {
|
202
|
+
const expected = new ComplexNumber(1, 0)
|
203
|
+
const actual = new ComplexNumber(0, 0).exp
|
204
|
+
|
205
|
+
expect(actual.real).toBeCloseTo(expected.real)
|
206
|
+
expect(actual.imag).toBeCloseTo(expected.imag)
|
207
|
+
})
|
208
|
+
|
209
|
+
xit('Exponential of a purely real number', () => {
|
210
|
+
const expected = new ComplexNumber(Math.E, 0)
|
211
|
+
const actual = new ComplexNumber(1, 0).exp
|
212
|
+
|
213
|
+
expect(actual.real).toBeCloseTo(expected.real)
|
214
|
+
expect(actual.imag).toBeCloseTo(expected.imag)
|
215
|
+
})
|
216
|
+
})
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
{
|
2
|
+
"name": "xtypescript",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Exercism exercises in Typescript.",
|
5
|
+
"author": "",
|
6
|
+
"private": true,
|
7
|
+
"repository": {
|
8
|
+
"type": "git",
|
9
|
+
"url": "https://github.com/exercism/xtypescript"
|
10
|
+
},
|
11
|
+
"devDependencies": {},
|
12
|
+
"scripts": {
|
13
|
+
"test": "tsc --noEmit -p . && jest --no-cache",
|
14
|
+
"lint": "tsc --noEmit -p . && tslint \"*.ts?(x)\"",
|
15
|
+
"lintci": "tslint \"*.ts?(x)\" --force"
|
16
|
+
},
|
17
|
+
"dependencies": {
|
18
|
+
"@types/jest": "^21.1.5",
|
19
|
+
"@types/node": "^8.0.47",
|
20
|
+
"jest": "^21.2.1",
|
21
|
+
"ts-jest": "^21.1.3",
|
22
|
+
"tslint": "^5.8.0",
|
23
|
+
"typescript": "^2.5.3"
|
24
|
+
},
|
25
|
+
"jest": {
|
26
|
+
"transform": {
|
27
|
+
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
|
28
|
+
},
|
29
|
+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
30
|
+
"moduleFileExtensions": [
|
31
|
+
"ts",
|
32
|
+
"tsx",
|
33
|
+
"js"
|
34
|
+
]
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"target": "es2017",
|
4
|
+
"module": "commonjs",
|
5
|
+
"alwaysStrict": true,
|
6
|
+
"noUnusedLocals": true,
|
7
|
+
"noUnusedParameters": true,
|
8
|
+
"noImplicitAny": true,
|
9
|
+
"strictNullChecks": true,
|
10
|
+
"preserveConstEnums": true,
|
11
|
+
"noFallthroughCasesInSwitch":true,
|
12
|
+
"noImplicitThis":true,
|
13
|
+
"noImplicitReturns":true,
|
14
|
+
"sourceMap": true,
|
15
|
+
"noEmitOnError": true,
|
16
|
+
"outDir": "./build"
|
17
|
+
},
|
18
|
+
"compileOnSave": true,
|
19
|
+
"exclude": [
|
20
|
+
"node_modules"
|
21
|
+
]
|
22
|
+
}
|
@@ -0,0 +1,127 @@
|
|
1
|
+
{
|
2
|
+
"jsRules": {
|
3
|
+
"class-name": true,
|
4
|
+
"comment-format": [
|
5
|
+
true,
|
6
|
+
"check-space"
|
7
|
+
],
|
8
|
+
"indent": [
|
9
|
+
true,
|
10
|
+
"spaces"
|
11
|
+
],
|
12
|
+
"no-duplicate-variable": true,
|
13
|
+
"no-eval": true,
|
14
|
+
"no-trailing-whitespace": true,
|
15
|
+
"no-unsafe-finally": true,
|
16
|
+
"one-line": [
|
17
|
+
true,
|
18
|
+
"check-open-brace",
|
19
|
+
"check-whitespace"
|
20
|
+
],
|
21
|
+
"quotemark": [
|
22
|
+
false,
|
23
|
+
"double"
|
24
|
+
],
|
25
|
+
"semicolon": [
|
26
|
+
true,
|
27
|
+
"never"
|
28
|
+
],
|
29
|
+
"triple-equals": [
|
30
|
+
true,
|
31
|
+
"allow-null-check"
|
32
|
+
],
|
33
|
+
"variable-name": [
|
34
|
+
true,
|
35
|
+
"ban-keywords"
|
36
|
+
],
|
37
|
+
"whitespace": [
|
38
|
+
true,
|
39
|
+
"check-branch",
|
40
|
+
"check-decl",
|
41
|
+
"check-operator",
|
42
|
+
"check-separator",
|
43
|
+
"check-type"
|
44
|
+
]
|
45
|
+
},
|
46
|
+
"rules": {
|
47
|
+
"class-name": true,
|
48
|
+
"comment-format": [
|
49
|
+
true,
|
50
|
+
"check-space"
|
51
|
+
],
|
52
|
+
"indent": [
|
53
|
+
true,
|
54
|
+
"spaces"
|
55
|
+
],
|
56
|
+
"no-eval": true,
|
57
|
+
"no-internal-module": true,
|
58
|
+
"no-trailing-whitespace": true,
|
59
|
+
"no-unsafe-finally": true,
|
60
|
+
"no-var-keyword": true,
|
61
|
+
"one-line": [
|
62
|
+
true,
|
63
|
+
"check-open-brace",
|
64
|
+
"check-whitespace"
|
65
|
+
],
|
66
|
+
"semicolon": [
|
67
|
+
true,
|
68
|
+
"never"
|
69
|
+
],
|
70
|
+
"triple-equals": [
|
71
|
+
true,
|
72
|
+
"allow-null-check"
|
73
|
+
],
|
74
|
+
"typedef-whitespace": [
|
75
|
+
true,
|
76
|
+
{
|
77
|
+
"call-signature": "nospace",
|
78
|
+
"index-signature": "nospace",
|
79
|
+
"parameter": "nospace",
|
80
|
+
"property-declaration": "nospace",
|
81
|
+
"variable-declaration": "nospace"
|
82
|
+
}
|
83
|
+
],
|
84
|
+
"variable-name": [
|
85
|
+
true,
|
86
|
+
"ban-keywords"
|
87
|
+
],
|
88
|
+
"whitespace": [
|
89
|
+
true,
|
90
|
+
"check-branch",
|
91
|
+
"check-decl",
|
92
|
+
"check-operator",
|
93
|
+
"check-separator",
|
94
|
+
"check-type"
|
95
|
+
],
|
96
|
+
"no-namespace": true,
|
97
|
+
"prefer-for-of": true,
|
98
|
+
"only-arrow-functions": [true, "allow-declarations"],
|
99
|
+
"no-var-requires": true,
|
100
|
+
"no-any": true,
|
101
|
+
"curly": true,
|
102
|
+
"forin": true,
|
103
|
+
"no-arg": true,
|
104
|
+
"label-position": true,
|
105
|
+
"no-conditional-assignment": true,
|
106
|
+
"no-console": [true, "log", "error"],
|
107
|
+
"no-construct": true,
|
108
|
+
"no-duplicate-variable": true,
|
109
|
+
"no-empty": true,
|
110
|
+
"no-invalid-this": [true, "check-function-in-method"],
|
111
|
+
"no-misused-new": true,
|
112
|
+
"no-null-keyword": true,
|
113
|
+
"no-string-literal": true,
|
114
|
+
"radix": true,
|
115
|
+
"typeof-compare": true,
|
116
|
+
"use-isnan": true,
|
117
|
+
"prefer-const": true,
|
118
|
+
"array-type": [true, "array-simple"],
|
119
|
+
"arrow-parens": true,
|
120
|
+
"new-parens": true,
|
121
|
+
"no-consecutive-blank-lines": [true,1],
|
122
|
+
"no-parameter-properties": true,
|
123
|
+
"no-unnecessary-initializer": true,
|
124
|
+
"object-literal-shorthand": true,
|
125
|
+
"object-literal-key-quotes": [true, "as-needed"]
|
126
|
+
}
|
127
|
+
}
|