Lint test files too (#14791)

This commit is contained in:
Andy
2017-02-23 07:15:16 -08:00
committed by GitHub
parent 89328a754d
commit 555ea54770
829 changed files with 17225 additions and 18162 deletions

View File

@@ -1,8 +1,8 @@
import * as ps from 'python-shell';
let PythonShell = ps.PythonShell;
const PythonShell = ps.PythonShell;
ps.run('my_script.py', function (err) {
ps.run('my_script.py', err => {
if (err) throw err;
console.log('finished');
});
@@ -14,25 +14,25 @@ var options = {
scriptPath: 'path/to/my/scripts',
args: ['value1', 'value2', 'value3']
};
ps.run('my_script.py', options, function (err, results) {
ps.run('my_script.py', options, (err, results) => {
if (err) throw err;
// results is an array consisting of messages collected during execution
// results is an array consisting of messages collected during execution
console.log('results: %j', results);
});
var pyshell = new PythonShell('my_script.py');
// sends a message to the Python script via stdin
// sends a message to the Python script via stdin
pyshell.send('hello');
pyshell.on('message', function (message) {
// received a message sent from the Python script (a simple "print" statement)
pyshell.on('message', message => {
// received a message sent from the Python script (a simple "print" statement)
console.log(message);
});
// end the input stream and allow the process to exit
pyshell.end(function (err) {
// end the input stream and allow the process to exit
pyshell.end(err => {
if (err) throw err;
console.log('finished');
});

View File

@@ -1 +1 @@
{ "extends": "../tslint.json" }
{ "extends": "../tslint.json" }