-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from spiltcoffee/eslint-tslint
Added tslint and eslint
- Loading branch information
Showing
26 changed files
with
588 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:node/recommended", | ||
"plugin:jest/recommended", | ||
"prettier" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,13 @@ | |
"description": "Provides an API for easily transforming Delphi Forms", | ||
"scripts": { | ||
"bootstrap": "lerna bootstrap", | ||
"prettier": "prettier --ignore-path .gitignore \"**/*.{js,json,ts}\"", | ||
"lint:fix": "yarn run prettier --write", | ||
"lint:check": "yarn run prettier --check", | ||
"eslint": "eslint --ignore-path .gitignore \"**/*.js\"", | ||
"tslint": "tslint \"**/*.ts\"", | ||
"prettier": "prettier --ignore-path .gitignore \"**/*.{js,json,ts,yml}\"", | ||
"lint:fix": "yarn eslint --fix && yarn tslint --fix", | ||
"lint:check": "yarn eslint && yarn tslint", | ||
"format:fix": "yarn prettier --write", | ||
"format:check": "yarn prettier --check", | ||
"compile": "lerna run compile", | ||
"test": "jest", | ||
"release": "lerna exec --concurrency 1 -- semantic-release -e semantic-release-monorepo --tag-format='${LERNA_PACKAGE_NAME}-v\\${version}' --repositoryUrl ssh://[email protected]/spiltcoffee/postdfm.git" | ||
|
@@ -20,6 +24,10 @@ | |
"@types/nearley": "^2.11.0", | ||
"commitlint": "^7.5.2", | ||
"cz-lerna-changelog": "^2.0.2", | ||
"eslint": "^5.15.1", | ||
"eslint-config-prettier": "^4.1.0", | ||
"eslint-plugin-jest": "^22.3.0", | ||
"eslint-plugin-node": "^8.0.1", | ||
"husky": "^1.3.1", | ||
"jest": "^24.0.0", | ||
"jest-junit": "^6.3.0", | ||
|
@@ -29,6 +37,8 @@ | |
"prettier": "^1.16.4", | ||
"semantic-release": "~15.9.0", | ||
"semantic-release-monorepo": "^6.1.1", | ||
"tslint": "^5.13.1", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.3.3333" | ||
}, | ||
"greenkeeper": { | ||
|
@@ -45,7 +55,17 @@ | |
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,json,ts,yml}": [ | ||
"*.{json,yml}": [ | ||
"prettier --ignore-path .gitignore --write", | ||
"git add" | ||
], | ||
"*.js": [ | ||
"eslint --ignore-path .gitignore", | ||
"prettier --ignore-path .gitignore --write", | ||
"git add" | ||
], | ||
"*.ts": [ | ||
"tslint", | ||
"prettier --ignore-path .gitignore --write", | ||
"git add" | ||
] | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ASTType } from "./astType"; | ||
|
||
export class ASTNode { | ||
public astType: ASTType; | ||
constructor(astType: ASTType) { | ||
this.astType = astType; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export enum ASTType { | ||
String = "string", | ||
HexString = "hexString", | ||
Integer = "integer", | ||
Double = "double", | ||
Boolean = "boolean", | ||
Qualified = "qualified", | ||
Item = "item", | ||
StringList = "stringList", | ||
QualifiedList = "qualifiedList", | ||
ItemList = "itemList", | ||
Property = "property", | ||
Object = "object" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { ASTNode } from "./astNode"; | ||
import { ASTType } from "./astType"; | ||
import { ObjectKind } from "./objectKind"; | ||
import { Property } from "./property"; | ||
|
||
export class FormObject extends ASTNode { | ||
public kind: ObjectKind; | ||
public name: string; | ||
public type: string; | ||
public order: number; | ||
public properties: Property[]; | ||
public children: FormObject[]; | ||
|
||
constructor( | ||
kind: ObjectKind, | ||
name: string, | ||
type: string, | ||
order: number, | ||
properties?: Property[], | ||
children?: FormObject[] | ||
) { | ||
super(ASTType.Object); | ||
this.kind = kind; | ||
this.name = name; | ||
this.type = type; | ||
|
||
if (order) { | ||
this.order = order; | ||
} | ||
|
||
if (properties) { | ||
this.properties = properties; | ||
} | ||
|
||
if (children) { | ||
this.children = children; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export { ASTType } from "./astType"; | ||
export { ASTNode } from "./astNode"; | ||
|
||
export { Value } from "./value/value"; | ||
export { StringValue } from "./value/stringValue"; | ||
export { HexStringValue } from "./value/hexStringValue"; | ||
export { IntegerValue } from "./value/integerValue"; | ||
export { DoubleValue } from "./value/doubleValue"; | ||
export { BooleanValue } from "./value/booleanValue"; | ||
export { QualifiedValue } from "./value/qualifiedValue"; | ||
|
||
export { Item } from "./item"; | ||
|
||
export { List } from "./list/list"; | ||
export { QualifiedList } from "./list/qualifiedList"; | ||
export { StringList } from "./list/stringList"; | ||
export { ItemList } from "./list/itemList"; | ||
|
||
export { Property } from "./property"; | ||
|
||
export { ObjectKind } from "./objectKind"; | ||
|
||
export { FormObject } from "./formObject"; |
Oops, something went wrong.