Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d82f07d

Browse files
committedJul 5, 2016
update pytest runner
1 parent 49ac659 commit d82f07d

20 files changed

+279
-231
lines changed
 

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.3.0] - WIP
6+
- change input to Object
7+
- change input to testString, write file within create-runner
8+
59
## [0.2.0] - 2016-04-04
610
- `print` to console
711

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PyTest CodeRoad
22

3-
PyTest Python test runner for [Atom-CodeRoad](https://github.com/coderoad/atom-coderoad).
3+
[PyTest](http://pytest.org/latest/) Python test runner for [Atom-CodeRoad](https://github.com/coderoad/atom-coderoad).
44

55
[Learn more about CodeRoad](https://coderoad.github.io), an interactive coding tutorial creator built inside of Atom.
66

‎examples/basic/coderoad.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"project": {
2+
"info": {
33
"title": "PyTest Demo",
44
"description": "A demo for testing Python's PyTest in CodeRoad."
55
},
@@ -45,4 +45,4 @@
4545
]
4646
}
4747
]
48-
}
48+
}

‎examples/basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"pytest-coderoad": "^0.1.0"
1616
},
1717
"config": {
18-
"testDir": "tutorial",
18+
"dir": "tutorial",
1919
"testSuffix": ".py",
20-
"testRunner": "pytest-coderoad"
20+
"runner": "pytest-coderoad"
2121
}
2222
}

‎lib/create-runner.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22
var exists_1 = require('./exists');
33
var child_process_1 = require('child_process');
4+
var fs_1 = require('fs');
45
var python = 'python';
56
var localPath = '/usr/local/bin/python';
67
var globalPath = '/usr/bin/python';
@@ -15,7 +16,9 @@ if (process.platform === 'darwin' && process.resourcesPath) {
1516
throw 'Python not found. Python may not be installed';
1617
}
1718
}
18-
function createRunner(config, testFile) {
19+
var testFile = 'tmp-pytest.py';
20+
function createRunner(config, testString) {
21+
fs_1.writeFileSync(testFile, testString, 'utf8');
1922
return child_process_1.exec([
2023
python,
2124
'-m pytest',

‎lib/exists.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use strict";
2-
var fs = require('fs');
2+
var fs_1 = require('fs');
33
function fileExists(path) {
44
try {
5-
fs.accessSync(path, fs.F_OK);
5+
fs_1.accessSync(path, fs_1.F_OK);
66
}
77
catch (e) {
88
if (e) {

‎lib/parse-tap.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var regex = {
33
isTap: /^# TAP results/m,
44
test: /^[not ]?ok [0-9]+ -/m,
55
finalTest: /^1..([0-9+])$/m,
6-
error: /^# E\s+(.+)$/m
6+
error: /^# E\s+(.+)$/m,
77
};
88
function formatFeedback(message) {
99
return message.split('_').join(' ');
@@ -38,7 +38,7 @@ function parseTap(data) {
3838
completed: false,
3939
msg: formatFeedback(message),
4040
taskPosition: taskPosition - 1,
41-
timedOut: false
41+
timedOut: false,
4242
};
4343
}
4444
else {
@@ -48,7 +48,7 @@ function parseTap(data) {
4848
final = {
4949
completed: true,
5050
msg: "Task " + taskPosition + " Complete",
51-
taskPosition: taskPosition
51+
taskPosition: taskPosition,
5252
};
5353
}
5454
return final;

‎lib/runner.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
var create_runner_1 = require('./create-runner');
33
var parse_tap_1 = require('./parse-tap');
44
var logger_1 = require('./logger');
5-
function runner(testFile, config, handleResult) {
6-
var runner = create_runner_1.default(config, testFile);
5+
function runner(_a) {
6+
var testString = _a.testString, config = _a.config, handleResult = _a.handleResult;
7+
var runner = create_runner_1.default(config, testString);
78
var final = null;
8-
return new Promise(function (resolve, reject) {
9-
runner.stdout.on('data', function (data) {
9+
return new Promise(function run(resolve, reject) {
10+
runner.stdout.on('data', function testData(data) {
1011
data = data.toString();
1112
if (!data || !data.length) {
1213
return;
@@ -20,12 +21,12 @@ function runner(testFile, config, handleResult) {
2021
final.pass = final.change > 0;
2122
handleResult(final);
2223
});
23-
runner.stderr.on('data', function (data) {
24+
runner.stderr.on('data', function testError(data) {
2425
if (data.length) {
2526
console.log('Test runner error:', data.toString());
2627
}
2728
});
28-
runner.on('end', function (code) {
29+
runner.on('end', function testEnd(code) {
2930
if (code === 0) {
3031
resolve(final);
3132
}

‎package.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,5 @@
2525
"bugs": {
2626
"url": "https://github.com/coderoad/pytest-coderoad/issues"
2727
},
28-
"homepage": "https://github.com/coderoad/pytest-coderoad#readme",
29-
"devDependencies": {
30-
"ava": "^0.13.0"
31-
},
32-
"ava": {
33-
"files": [
34-
"test/*.spec.js",
35-
"!node_modules"
36-
],
37-
"source": [
38-
"test/*.spec.js"
39-
],
40-
"failFast": false,
41-
"serial": true,
42-
"noCache": true
43-
}
28+
"homepage": "https://github.com/coderoad/pytest-coderoad#readme"
4429
}

‎src/create-runner.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import exists from './exists';
22
import {exec} from 'child_process';
3+
import {writeFileSync} from 'fs';
34

45
let python = 'python';
56
let localPath = '/usr/local/bin/python';
@@ -16,7 +17,14 @@ if (process.platform === 'darwin' && process.resourcesPath) {
1617
}
1718
}
1819

19-
export default function createRunner(config: CR.Config, testFile: string) {
20+
21+
const testFile = 'tmp-pytest.py';
22+
23+
export default function createRunner(
24+
config: CR.Config, testString: string
25+
) {
26+
// write file and run test
27+
writeFileSync(testFile, testString, 'utf8');
2028
// see pytest options: https://pytest.org/latest/usage.html
2129
return exec([
2230
python,

‎src/exists.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as fs from 'fs';
1+
import {accessSync, F_OK} from 'fs';
22

33
export default function fileExists(path: string): boolean {
44
try {
5-
fs.accessSync(path, fs.F_OK);
5+
accessSync(path, F_OK);
66
} catch (e) {
77
if (e) {
88
if (e.code !== 'ENOENT') {

‎src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const unexpectedOutput: RegExp = /^(?!# TAP)(?!(not )?ok [0-9]+ -)(?!1..[0-9]+)(
22

33
// capture any unexpected output to the log
44
export default function logger(data: string): void {
5-
var logs: string[] = data.match(unexpectedOutput);
5+
let logs: string[] = data.match(unexpectedOutput);
66
if (!logs && logs.length < 1) {
77
return;
88
}

‎src/parse-tap.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ const regex = {
22
isTap: /^# TAP results/m,
33
test: /^[not ]?ok [0-9]+ -/m,
44
finalTest: /^1..([0-9+])$/m,
5-
error: /^# E\s+(.+)$/m
5+
error: /^# E\s+(.+)$/m,
66
};
77

8+
// format test titles into feedback messages
89
function formatFeedback(message: string): string {
910
return message.split('_').join(' ');
1011
}
1112

1213
export default function parseTap(data: string): ParseFinal {
13-
1414
// Output as TAP?
1515
if (!data || !data.match(regex.isTap)) {
1616
console.log('No TAP output: ', data);
@@ -51,7 +51,7 @@ export default function parseTap(data: string): ParseFinal {
5151
completed: false,
5252
msg: formatFeedback(message),
5353
taskPosition: taskPosition - 1,
54-
timedOut: false // TODO
54+
timedOut: false, // TODO
5555
};
5656
} else {
5757

@@ -64,7 +64,7 @@ export default function parseTap(data: string): ParseFinal {
6464
final = {
6565
completed: true,
6666
msg: `Task ${taskPosition} Complete`,
67-
taskPosition
67+
taskPosition,
6868
};
6969
}
7070

‎src/runner.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import parseTap from './parse-tap';
33
import logger from './logger';
44

55

6-
export default function runner(testFile: string, config: CR.Config,
7-
handleResult: (result) => CR.TestResult): Promise<CR.TestResult> {
6+
export default function runner({
7+
testString, config, handleResult
8+
}): Promise<CR.TestResult> {
89

910
// cleanup .json file
10-
let runner = createRunner(config, testFile);
11-
var final = null;
11+
let runner = createRunner(config, testString);
12+
let final = null;
1213

13-
return new Promise((resolve, reject) => {
14-
runner.stdout.on('data', function(data): void {
14+
return new Promise(function run(resolve, reject) {
15+
runner.stdout.on('data', function testData(data): void {
1516

1617
data = data.toString();
1718

@@ -39,13 +40,13 @@ export default function runner(testFile: string, config: CR.Config,
3940
handleResult(final);
4041
});
4142

42-
runner.stderr.on('data', function(data) {
43+
runner.stderr.on('data', function testError(data) {
4344
if (data.length) {
4445
console.log('Test runner error:', data.toString());
4546
}
4647
});
4748

48-
runner.on('end', function(code: number) {
49+
runner.on('end', function testEnd(code: number) {
4950
if (code === 0) {
5051
resolve(final);
5152
} else {

‎test/create-runner.spec.js

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
import test from 'ava';
2-
import * as path from 'path';
3-
import {getCreateRunner} from './runner-setup';
4-
5-
test('creates a test runner', t => {
6-
let testFile = path.join(__dirname, 'demos', 'single-test.py');
7-
let createRunner = getCreateRunner(testFile);
8-
t.ok(createRunner);
9-
});
1+
// import test from 'ava';
2+
// import {getCreateRunner} from './runner-setup';
3+
//
4+
// test('creates a test runner', t => {
5+
// let testString = `
6+
// a = 1;
7+
//
8+
// class Test01Class:
9+
// def test_single_test(self):
10+
// assert a == 1
11+
// `
12+
// let createRunner = getCreateRunner(testString);
13+
// t.ok(createRunner);
14+
// });

‎test/logger.spec.js

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1-
import test from 'ava';
2-
import * as path from 'path';
3-
import {
4-
getCreateRunner
5-
} from './runner-setup';
6-
7-
test('should log to the console', t => {
8-
let testFile = path.join(__dirname, 'demos', 'pass-log.py');
9-
let createRunner = getCreateRunner(testFile);
10-
t.ok(createRunner);
11-
});
1+
// import test from 'ava';
2+
// import {
3+
// getCreateRunner
4+
// } from './runner-setup';
5+
//
6+
// test('should log to the console', t => {
7+
// let testString = `
8+
// a = 1;
9+
//
10+
// class Test01Class:
11+
// def test_passing_one(self):
12+
// assert a == 1
13+
//
14+
// print('Log');
15+
//
16+
// def test_passing_test(self):
17+
// assert a < 2
18+
//
19+
// class Test02Class:
20+
// def test_passing_two(self):
21+
// assert a == 1
22+
//
23+
// print('LOG2')
24+
//
25+
// def test_passing_test(self):
26+
// assert a < 2
27+
//
28+
// class Test03Class:
29+
// def test_passing_three(self):
30+
// print('INNER LOG 3')
31+
// assert a == 1
32+
//
33+
// print('LOG3');
34+
//
35+
// def test_passing_test(self):
36+
// assert a < 2
37+
// `;
38+
// let createRunner = getCreateRunner(testString);
39+
// t.ok(createRunner);
40+
// });

‎test/parse-tap.spec.js

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
1-
import test from 'ava';
2-
import parseTap from '../lib/parse-tap';
3-
4-
test('will pass all', t => {
5-
const tap = `
6-
# TAP results for Test01Class
7-
ok 1 - Test01Class.test_passing_one
8-
ok 2 - Test01Class.test_passing_test
9-
# TAP results for Test02Class
10-
ok 3 - Test02Class.test_passing_two
11-
ok 4 - Test02Class.test_passing_test
12-
# TAP results for Test03Class
13-
ok 5 - Test03Class.test_passing_three
14-
ok 6 - Test03Class.test_passing_test
15-
1..6
16-
`;
17-
const result = parseTap(tap);
18-
19-
const expected = {
20-
completed: true,
21-
msg: 'Task 3 Complete',
22-
taskPosition: 3
23-
};
24-
t.same(result, expected);
25-
});
26-
27-
test('will fail on first', t => {
28-
const tap = `
29-
# TAP results for Test01Class
30-
ok 1 - Test01Class.test_passing_one
31-
not ok 2 - Test01Class.test_failing_test
32-
# E assert 1 > 2
33-
1..2
34-
`;
35-
const result = parseTap(tap);
36-
37-
const expected = {
38-
completed: false,
39-
msg: 'failing test',
40-
taskPosition: 0,
41-
timedOut: false
42-
};
43-
t.same(result, expected);
44-
});
45-
46-
test('will fail on third', t => {
47-
const tap = `
48-
# TAP results for Test01Class
49-
ok 1 - Test01Class.test_passing_one
50-
ok 2 - Test01Class.test_passing_test
51-
# TAP results for Test02Class
52-
ok 3 - Test02Class.test_passing_two
53-
ok 4 - Test02Class.test_passing_test
54-
# TAP results for Test03Class
55-
ok 5 - Test03Class.test_passing_three
56-
not ok 6 - Test03Class.test_failing_test
57-
# E assert 1 > 2
58-
1..6
59-
`;
60-
const result = parseTap(tap);
61-
62-
const expected = {
63-
completed: false,
64-
msg: 'failing test',
65-
taskPosition: 2,
66-
timedOut: false
67-
};
68-
t.same(result, expected);
69-
});
1+
// import test from 'ava';
2+
// import parseTap from '../lib/parse-tap';
3+
//
4+
// test('will pass all', t => {
5+
// const tap = `
6+
// # TAP results for Test01Class
7+
// ok 1 - Test01Class.test_passing_one
8+
// ok 2 - Test01Class.test_passing_test
9+
// # TAP results for Test02Class
10+
// ok 3 - Test02Class.test_passing_two
11+
// ok 4 - Test02Class.test_passing_test
12+
// # TAP results for Test03Class
13+
// ok 5 - Test03Class.test_passing_three
14+
// ok 6 - Test03Class.test_passing_test
15+
// 1..6
16+
// `;
17+
// const result = parseTap(tap);
18+
//
19+
// const expected = {
20+
// completed: true,
21+
// msg: 'Task 3 Complete',
22+
// taskPosition: 3
23+
// };
24+
// t.same(result, expected);
25+
// });
26+
//
27+
// test('will fail on first', t => {
28+
// const tap = `
29+
// # TAP results for Test01Class
30+
// ok 1 - Test01Class.test_passing_one
31+
// not ok 2 - Test01Class.test_failing_test
32+
// # E assert 1 > 2
33+
// 1..2
34+
// `;
35+
// const result = parseTap(tap);
36+
//
37+
// const expected = {
38+
// completed: false,
39+
// msg: 'failing test',
40+
// taskPosition: 0,
41+
// timedOut: false
42+
// };
43+
// t.same(result, expected);
44+
// });
45+
//
46+
// test('will fail on third', t => {
47+
// const tap = `
48+
// # TAP results for Test01Class
49+
// ok 1 - Test01Class.test_passing_one
50+
// ok 2 - Test01Class.test_passing_test
51+
// # TAP results for Test02Class
52+
// ok 3 - Test02Class.test_passing_two
53+
// ok 4 - Test02Class.test_passing_test
54+
// # TAP results for Test03Class
55+
// ok 5 - Test03Class.test_passing_three
56+
// not ok 6 - Test03Class.test_failing_test
57+
// # E assert 1 > 2
58+
// 1..6
59+
// `;
60+
// const result = parseTap(tap);
61+
//
62+
// const expected = {
63+
// completed: false,
64+
// msg: 'failing test',
65+
// taskPosition: 2,
66+
// timedOut: false
67+
// };
68+
// t.same(result, expected);
69+
// });

‎test/runner-setup.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
'use strict';
2-
Object.defineProperty(exports, '__esModule', {
3-
value: true
4-
});
5-
6-
var path = require('path');
7-
var runner = require('../lib/runner').default;
8-
var createRunner = require('../lib/create-runner').default;
9-
10-
var config = {
11-
dir: path.resolve(__dirname, '..'),
12-
tutorialDir: path.join(__dirname, 'tutorial'),
13-
taskPosition: 0
14-
};
15-
16-
function handleResult(result) {
17-
return result;
18-
};
19-
20-
exports.getRunner = getRunner;
21-
function getRunner(file) {
22-
return runner(file, config, handleResult);
23-
}
24-
25-
exports.getCreateRunner = getCreateRunner;
26-
function getCreateRunner(testFile) {
27-
return createRunner(config, testFile);
28-
}
1+
// 'use strict';
2+
// Object.defineProperty(exports, '__esModule', {
3+
// value: true
4+
// });
5+
//
6+
// var path = require('path');
7+
// var runner = require('../lib/runner').default;
8+
// var createRunner = require('../lib/create-runner').default;
9+
//
10+
// var config = {
11+
// dir: path.resolve(__dirname, '..'),
12+
// tutorialDir: path.join(__dirname, 'tutorial'),
13+
// taskPosition: 0
14+
// };
15+
//
16+
// function handleResult(result) {
17+
// return result;
18+
// };
19+
//
20+
// exports.getRunner = getRunner;
21+
// function getRunner(file) {
22+
// return runner(file, config, handleResult);
23+
// }
24+
//
25+
// exports.getCreateRunner = getCreateRunner;
26+
// function getCreateRunner(testString) {
27+
// return createRunner({testString, config});
28+
// }

‎test/runner.spec.js

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
import test from 'ava';
2-
import * as path from 'path';
3-
import * as fs from 'fs';
4-
import exists from '../lib/exists';
5-
import {getRunner} from './runner-setup';
6-
7-
// test('runner runs a single test to completion', async t => {
8-
// let file = path.join(__dirname, 'demos', 'single-test.py');
9-
// let run = await getRunner(file);
10-
// let expected = {
11-
// change: 1,
12-
// pass: true,
13-
// taskPosition: 1,
14-
// msg: 'Task 1 Complete',
15-
// completed: true
16-
// };
17-
// t.same(run, expected);
18-
// });
19-
20-
// test('runner runs three tests to completion', async t => {
21-
// let file = path.join(__dirname, 'demos', 'pass-three.py');
22-
// let run = await getRunner(file);
23-
// let expected = {
24-
// change: 3,
25-
// pass: true,
26-
// taskPosition: 3,
27-
// msg: 'Task 3 Complete',
28-
// completed: true
29-
// };
30-
// t.same(run, expected);
31-
// });
32-
33-
// test('runner fails early at first failure', async t => {
34-
// let file = path.join(__dirname, 'demos', 'fail-at-one.py');
35-
// let run = await getRunner(file);
36-
// let expected = {
37-
// change: 0,
38-
// pass: false,
39-
// taskPosition: 0,
40-
// msg: 'failing test',
41-
// completed: false,
42-
// timedOut: false
43-
// };
44-
// t.same(run, expected);
45-
// });
46-
// //
47-
// test('runner fails at final test', async t => {
48-
// let file = path.join(__dirname, 'demos', 'fail-at-three.py');
49-
// let run = await getRunner(file);
50-
// let expected = {
51-
// change: 2,
52-
// pass: true,
53-
// taskPosition: 2,
54-
// msg: 'failing test',
55-
// completed: false,
56-
// timedOut: false
57-
// };
58-
// t.same(run, expected);
59-
// });
1+
// import test from 'ava';
2+
// import * as path from 'path';
3+
// import * as fs from 'fs';
4+
// import exists from '../lib/exists';
5+
// import {getRunner} from './runner-setup';
6+
//
7+
// // test('runner runs a single test to completion', async t => {
8+
// // let file = path.join(__dirname, 'demos', 'single-test.py');
9+
// // let run = await getRunner(file);
10+
// // let expected = {
11+
// // change: 1,
12+
// // pass: true,
13+
// // taskPosition: 1,
14+
// // msg: 'Task 1 Complete',
15+
// // completed: true
16+
// // };
17+
// // t.same(run, expected);
18+
// // });
19+
//
20+
// // test('runner runs three tests to completion', async t => {
21+
// // let file = path.join(__dirname, 'demos', 'pass-three.py');
22+
// // let run = await getRunner(file);
23+
// // let expected = {
24+
// // change: 3,
25+
// // pass: true,
26+
// // taskPosition: 3,
27+
// // msg: 'Task 3 Complete',
28+
// // completed: true
29+
// // };
30+
// // t.same(run, expected);
31+
// // });
32+
//
33+
// // test('runner fails early at first failure', async t => {
34+
// // let file = path.join(__dirname, 'demos', 'fail-at-one.py');
35+
// // let run = await getRunner(file);
36+
// // let expected = {
37+
// // change: 0,
38+
// // pass: false,
39+
// // taskPosition: 0,
40+
// // msg: 'failing test',
41+
// // completed: false,
42+
// // timedOut: false
43+
// // };
44+
// // t.same(run, expected);
45+
// // });
46+
// // //
47+
// // test('runner fails at final test', async t => {
48+
// // let file = path.join(__dirname, 'demos', 'fail-at-three.py');
49+
// // let run = await getRunner(file);
50+
// // let expected = {
51+
// // change: 2,
52+
// // pass: true,
53+
// // taskPosition: 2,
54+
// // msg: 'failing test',
55+
// // completed: false,
56+
// // timedOut: false
57+
// // };
58+
// // t.same(run, expected);
59+
// // });

‎tslint.json

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,43 @@
2525
],
2626
"no-construct": true,
2727
"no-debugger": true,
28-
"no-duplicate-key": false,
28+
"no-duplicate-key": true,
2929
"no-duplicate-variable": true,
3030
"no-empty": true,
3131
"no-eval": true,
32+
"no-inferrable-types": true,
3233
"no-shadowed-variable": true,
3334
"no-string-literal": true,
3435
"no-switch-case-fall-through": true,
3536
"no-trailing-whitespace": true,
3637
"no-unused-expression": true,
37-
"no-unused-variable": true,
38+
"no-unused-variable": "react",
3839
"no-unreachable": true,
3940
"no-use-before-declare": true,
40-
"no-var-keyword": false,
41+
"no-var-keyword": true,
42+
"object-literal-sort-keys": false,
4143
"one-line": [true,
4244
"check-open-brace",
4345
"check-catch",
4446
"check-else",
4547
"check-finally",
4648
"check-whitespace"
4749
],
48-
"quotemark": [true, "single"],
50+
"quotemark": [true, "single", "avoid-escape"],
4951
"radix": true,
50-
"semicolon": true,
52+
"semicolon": [true, "always"],
53+
"trailing-comma": [true, {
54+
"singleline": "never"
55+
}],
5156
"triple-equals": [true, "allow-null-check"],
52-
"variable-name": false,
57+
"typedef-whitespace": [true, {
58+
"call-signature": "nospace",
59+
"index-signature": "nospace",
60+
"parameter": "nospace",
61+
"property-declaration": "nospace",
62+
"variable-declaration": "nospace"
63+
}],
64+
"variable-name": [true, "ban-keywords"],
5365
"whitespace": [true,
5466
"check-branch",
5567
"check-decl",

0 commit comments

Comments
 (0)
Please sign in to comment.