Skip to content

Commit

Permalink
lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
menduz committed Sep 3, 2020
1 parent d426ff5 commit d811e94
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"preversion": "npm run build && npm test",
"coverage": "(`npm bin`/istanbul cover `npm bin`/_mocha || true)",
"lint": "tslint -t msbuild src/**/*.ts",
"build": "rm -rf dist && tsc -p tsconfig.json && tsc -p tsconfig-test.json && chmod +x dist/bin.js",
"lint-fix": "tslint -t msbuild src/**/*.ts --fix",
"build": "npm run lint-fix && rm -rf dist && tsc -p tsconfig.json && tsc -p tsconfig-test.json && chmod +x dist/bin.js",
"watch": "npm run build && chmod +x dist/bin.js && (tsc -p tsconfig.json --watch & tsc -p tsconfig-test.json --watch)"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/Grammars/BNF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ namespace BNF {

let rules = findChildrenByType(ast, 'rule');

let ret = rules.map((rule) : IRule => {
let ret = rules.map((rule): IRule => {
let name = findChildrenByType(rule, 'rule-name')[0].text;

let expressions = findChildrenByType(rule, 'firstExpression').concat(findChildrenByType(rule, 'otherExpression'));
Expand Down
6 changes: 3 additions & 3 deletions src/Grammars/Custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ namespace BNF {
);
}

function getSubItems(tmpRules : IRule[], seq: IToken, parentName: string, parentAttributes: any) {
function getSubItems(tmpRules: IRule[], seq: IToken, parentName: string, parentAttributes: any) {
let anterior = null;
let bnfSeq = [];

Expand Down Expand Up @@ -324,7 +324,7 @@ namespace BNF {
case 'CharCode':
case 'CharClass':
if (decoration || preDecoration) {
let newRule : IRule = {
let newRule: IRule = {
name: '%' + (parentName + subitems++),
bnf: [[convertRegex(x.text)]],
pinned
Expand Down Expand Up @@ -430,7 +430,7 @@ namespace BNF {

implicitWs = attributes['ws'] == 'implicit';

let tmpRules : IRule[] = [];
let tmpRules: IRule[] = [];

ast.children.filter(x => x.type == 'Production').map((x: any) => {
let name = x.children.filter(x => x.type == 'NCName')[0].text;
Expand Down
2 changes: 1 addition & 1 deletion src/Grammars/W3CEBNF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ namespace BNF {
throw ast.errors[0];
}

let tmpRules : IRule[] = [];
let tmpRules: IRule[] = [];

ast.children.filter(x => x.type == 'Production').map((x: any) => {
let name = x.children.filter(x => x.type == 'NCName')[0].text;
Expand Down

0 comments on commit d811e94

Please sign in to comment.