Added linting
This commit is contained in:
parent
25ae519d3d
commit
b836178356
17
.eslintrc.js
Normal file
17
.eslintrc.js
Normal 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
8
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"eslint.validate": [
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact"
|
||||
]
|
||||
}
|
5015
package-lock.json
generated
5015
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -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"
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user