Let eslint check imports
This commit is contained in:
parent
84761dfa93
commit
d35e28e377
3 changed files with 1161 additions and 406 deletions
19
.eslintrc.js
19
.eslintrc.js
|
@ -1,7 +1,7 @@
|
|||
module.exports = {
|
||||
extends: ['eslint:recommended'],
|
||||
extends: ['eslint:recommended', 'plugin:import/recommended'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint', 'prettier'],
|
||||
plugins: ['@typescript-eslint', 'prettier', 'import'],
|
||||
root: true,
|
||||
rules: {
|
||||
'prettier/prettier': 'warn',
|
||||
|
@ -12,6 +12,13 @@ module.exports = {
|
|||
ignoreDeclarationSort: true,
|
||||
},
|
||||
],
|
||||
'import/no-unresolved': 'error',
|
||||
'import/no-extraneous-dependencies': 'error',
|
||||
'import/first': 'error',
|
||||
'import/no-duplicates': 'error',
|
||||
'import/no-default-export': 'error',
|
||||
'import/no-namespace': 'error',
|
||||
'import/no-useless-path-segments': 'error',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
|
@ -19,6 +26,7 @@ module.exports = {
|
|||
extends: [
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
||||
'plugin:import/typescript',
|
||||
],
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.json'],
|
||||
|
@ -26,6 +34,13 @@ module.exports = {
|
|||
rules: {
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'error',
|
||||
},
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
typescript: {
|
||||
project: './',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['.eslintrc.js', 'jest.config.js', 'prettier.config.js'],
|
||||
|
|
1544
package-lock.json
generated
1544
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -30,10 +30,13 @@
|
|||
"homebridge-plugin"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.3.0",
|
||||
"@types/node": "^16.10.9",
|
||||
"@typescript-eslint/eslint-plugin": "^5.42.0",
|
||||
"@typescript-eslint/parser": "^5.42.0",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"homebridge": "^1.3.5",
|
||||
"homebridge-cmdswitch2": "^0.2.10",
|
||||
|
@ -47,6 +50,7 @@
|
|||
"dependencies": {
|
||||
"fastify": "^4.9.2",
|
||||
"hap-node-client": "git+https://github.com/NorthernMan54/Hap-Node-Client.git#fe200ba",
|
||||
"hap-nodejs": "^0.10.4",
|
||||
"json-schema-to-zod": "^0.2.0",
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue