From ccff4b9ee5a37c13f0973b52e8f90a8be8359fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Tue, 4 Aug 2020 22:39:02 +0200 Subject: Add new eslint rules (#2121) The largest changes here are: - enforcing single quotes for strings - enforcing trailing commas where possible In addition to those we have enabled several eslint plugins: - plugin:requirejs/recommended, to enforce some conventions in require statements - plugin:node/recommended, to enforce correct usage of various node.js APIs - plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules This PR attempts to not change code behavior when possible. In cases where fixing existing code would change semantics, a linting exclusion has been placed in the code base to silence the error. You can find these by searching for `eslint-disable-next-line`. Co-authored-by: Austin Morton --- lib/compilers/python.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/compilers/python.js') diff --git a/lib/compilers/python.js b/lib/compilers/python.js index 09f1053f6..a35b34b5e 100644 --- a/lib/compilers/python.js +++ b/lib/compilers/python.js @@ -23,7 +23,7 @@ // POSSIBILITY OF SUCH DAMAGE. const BaseCompiler = require('../base-compiler'), - argumentParsers = require("./argument-parsers"), + argumentParsers = require('./argument-parsers'), path = require('path'); class PythonCompiler extends BaseCompiler { @@ -36,9 +36,9 @@ class PythonCompiler extends BaseCompiler { // eslint-disable-next-line no-unused-vars processAsm(result, filters) { - const lineRe = /^\s{0,4}([0-9]+)(.*)/; + const lineRe = /^\s{0,4}(\d+)(.*)/; - const bytecodeLines = result.asm.split("\n"); + const bytecodeLines = result.asm.split('\n'); const bytecodeResult = []; let lastLineNo = null; -- cgit v1.2.3