Skip to content

Commit

Permalink
Fix seydx#79 and seydx#80 and some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
seydx committed May 16, 2021
1 parent f7854f9 commit 4be34b3
Show file tree
Hide file tree
Showing 30 changed files with 8,795 additions and 3,356 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
requireConfigFile: false,
},
ignorePatterns: ['homebridge-ui', 'node_modules', 'demo'],
plugins: ['@babel', 'prettier'],
extends: ['eslint:recommended', 'plugin:prettier/recommended'],
root: true,
env: {
es2021: true,
node: true,
},
rules: {
quotes: ['error', 'single'],
'comma-dangle': ['error', 'only-multiline'],
'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 0 }],
'eol-last': ['error', 'always'],
'space-before-function-paren': ['error', { named: 'never' }],
'prettier/prettier': [
'warn',
{
singleQuote: true,
arrowParens: 'always',
printWidth: 120,
},
],
},
};
35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

17 changes: 1 addition & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,4 @@ typings/
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
.github/
images/
demo/
docs/
example/
CHANGELOG.md
CONTRIBUTING.md
FAQ.md
README.md
LICENSE
.eslintrc.json
example-config.json
.env
70 changes: 63 additions & 7 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,64 @@
.eslintrc.json
CHANGELOG.md
example-config.json
LICENSE
README.md
images
demo
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Optional npm cache directory
.npm
package-lock.json
yarn.lock

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.envtest/
.github
.vscode
demo
images
eslintrc.js
example-config.json
prettierrc.json
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"arrowParens": "always",
"printWidth": 120
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"git.ignoreLimitWarning": true,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"eslint.workingDirectories": ["./"]
}
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
* @url https://github.com/SeydX/homebridge-tado-platform
* @author SeydX <[email protected]>
*
**/
**/

'use strict';

module.exports = function (homebridge) {

let TadoPlatform = require('./src/platform.js')(homebridge);
homebridge.registerPlatform('homebridge-tado-platform', 'TadoPlatform', TadoPlatform, true);

};
Loading

0 comments on commit 4be34b3

Please sign in to comment.