Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #67 from dxdc/patch-2
Browse files Browse the repository at this point in the history
Logic and style tweaks
  • Loading branch information
hjdhjd committed Jul 5, 2020
2 parents 371d2f7 + fdf49f6 commit c51f96f
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 289 deletions.
45 changes: 45 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"ignorePatterns": ["dist"],
"rules": {
"quotes": ["warn", "double", {"avoidEscape": true}],
"indent": [
"warn",
2,
{
"SwitchCase": 1
}
],
"linebreak-style": ["warn", "unix"],
"semi": ["warn", "always"],
"comma-dangle": ["warn", "always-multiline"],
"dot-notation": "warn",
"eqeqeq": "warn",
"curly": ["warn", "all"],
"brace-style": ["warn"],
"prefer-arrow-callback": ["warn"],
"max-len": ["warn", 140],
"no-console": ["warn"],
"lines-between-class-members": [
"warn",
"always",
{
"exceptAfterSingleLine": true
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off"
}
}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.DS_Store
node_modules/
package-lock.json
dist/
node_modules/
package-lock.json
dist/
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"scripts": {
"clean": "rimraf ./dist",
"build": "rimraf ./dist && tsc",
"prepublishOnly": "npm run build",
"lint": "eslint src/**.ts",
"prepublishOnly": "npm run lint && npm run build",
"postpublish": "npm run clean",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down Expand Up @@ -41,10 +42,13 @@
},
"homepage": "https://github.com/hjdhjd/homebridge-myq2#readme",
"devDependencies": {
"@types/node": "10.17.19",
"typescript": "^3.8.3",
"@types/node": "10.17.25",
"@typescript-eslint/eslint-plugin": "^3.5.0",
"@typescript-eslint/parser": "^3.5.0",
"eslint": "^7.4.0",
"homebridge": "^1.1.1",
"rimraf": "^3.0.2",
"homebridge": "^1.0.4"
"typescript": "^3.9.6"
},
"dependencies": {
"@types/node-fetch": "^2.5.7",
Expand Down

0 comments on commit c51f96f

Please sign in to comment.