Skip to content

Commit

Permalink
add linting and editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kfiku committed Sep 18, 2017
1 parent 4902712 commit 9a97f97
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"start": "node fuse",
"start:electron": "electron .",
"start:electron:watch": "nodemon --watch 'dist/main/*.*' --exec 'electron .'",
"build": "export NODE_ENV=production && node fuse dist",
"build": "npm run lint && export NODE_ENV=production && node fuse dist",
"lint": "tslint --project tslint.json",
"prod": "export NODE_ENV=production && npm run build && npm run start:electron",
"packager": "npm run build && node ./package.js",
"package": "npm run build && build --publish never",
Expand Down Expand Up @@ -79,6 +80,7 @@
"fuse-box": "^2.2.31",
"node-sass": "^4.5.2",
"nodemon": "^1.12.0",
"tslint": "^5.7.0",
"typescript": "^2.5.2",
"uglify-js": "^3.0.27"
},
Expand Down
12 changes: 12 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"rules": {
"no-unused-expression": true,
"no-duplicate-variable": true,
"no-unused-variable": true,
"no-consecutive-blank-lines": [true],
"curly": true,
"class-name": true,
"semicolon": true,
"triple-equals": true
}
}

0 comments on commit 9a97f97

Please sign in to comment.