Added linting

This commit is contained in:
watsonb8 2019-09-07 19:23:42 -04:00
parent 25ae519d3d
commit b836178356
5 changed files with 5052 additions and 5 deletions

17
.eslintrc.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['plugin:@typescript-eslint/recommended'],
parserOptions: {
"project": "./tsconfig.json"
},
rules: {
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/interface-name-prefix": ["warn", { prefixWithI: "always" }],
"@typescript-eslint/no-inferrable-types": ["warn", { ignoreParameters: true, ignoreProperties: true }],
"semi": "error"
},
env: {
"node": true
}
}

8
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,8 @@
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}

5015
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"description": "Homebridge plugin to expose and cast spotify playlists via the homekit app.",
"main": "bin/index.js",
"scripts": {
"build": "tsc",
"build": "npx eslint **/*.ts&&tsc",
"prepublishOnly": "npm run build"
},
"repository": {
@ -32,6 +32,13 @@
"inflection": "^1.12.0",
"request": "^2.88.0",
"request-promise-native": "^1.0.7",
"source-map-support": "^0.5.13"
"source-map-support": "^0.5.13",
"tsyringe": "^3.3.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.1.0",
"@typescript-eslint/parser": "^2.1.0",
"eslint": "^6.3.0",
"typescript": "^3.6.2"
}
}
}

View File

@ -49,8 +49,8 @@
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"listFiles": true
}
}