Skip to content

Commit

Permalink
Ported GUI to typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jun 26, 2024
1 parent 4740163 commit 3b49a53
Show file tree
Hide file tree
Showing 43 changed files with 3,285 additions and 2,030 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@project-chip/matter-node.js": "0.9.2",
"@project-chip/matter.js": "0.9.2",
"@iobroker/type-detector": "^3.0.5",
"@iobroker/dm-utils": "^0.2.1",
"@iobroker/dm-utils": "^0.2.2",
"axios": "^1.7.2",
"jsonwebtoken": "^9.0.2"
},
Expand Down
100 changes: 100 additions & 0 deletions src-admin/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
module.exports = {
root: true,
globals: {
ioBroker: true,
},
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'airbnb',
'plugin:eqeqeq-fix/recommended',
'plugin:@typescript-eslint/recommended',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'react',
'only-warn',
'react-hooks',
],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'arrow-parens': [1, 'as-needed'],
'react/jsx-indent': 'off',
'react/jsx-indent-props': 'off',
'react/no-access-state-in-setstate': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-plusplus': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/no-render-return-value': 'off',
'max-len': 'off',
'react/destructuring-assignment': 'off',
'react/prefer-stateless-function': 'off',
'react/self-closing-comp': 'off',
'react/jsx-filename-extension': 'off',
'no-nested-ternary': 'off',
'react/no-array-index-key': 'off',
'react/jsx-props-no-spreading': 'off',
'react/sort-comp': 'off',
'react/no-did-update-set-state': 'off',
'global-require': 'off',
'import/extensions': 'off',
'operator-linebreak': 'off',
'no-unused-expressions': 'off',
'prefer-destructuring': 'off',
'no-return-assign': 'off',
'no-multi-spaces': 'off',
'key-spacing': 'off',
'no-undef': 2,
'react/forbid-prop-types': 'off',
'react/require-default-props': 'off',
'import/no-extraneous-dependencies': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-closing-tag-location': 'off',
'no-restricted-syntax': 'off',
'guard-for-in': 'off',
// 'linebreak-style': ["error", "windows"],
'linebreak-style': ['off'],
'no-param-reassign': 'off',
'no-await-in-loop': 'off',
'no-console': ['error', { allow: ['warn', 'error', 'log'] }],
'no-underscore-dangle': 'off',
'no-constant-condition': 'off',
'no-loop-func': 'off',
'no-continue': 'off',
'implicit-arrow-linebreak': 'off',
'react/function-component-definition': 'off',
radix: 'off',
indent: ['error', 4, { SwitchCase: 1 }],
'no-alert': 'off',
'class-methods-use-this': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
}],
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
},
};
71 changes: 0 additions & 71 deletions src-admin/.eslintrc.json

This file was deleted.

11 changes: 6 additions & 5 deletions src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
"version": "0.1.13",
"private": true,
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@iobroker/adapter-react-v5": "^6.0.8",
"@iobroker/dm-gui-components": "^7.0.2",
"@iobroker/type-detector": "^3.0.5",
"@mui/icons-material": "^5.15.20",
"@mui/material": "^5.15.20",
"@sentry/browser": "^8.12.0",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
"@sentry/browser": "^8.12.0",
"babel-eslint": "^10.1.0",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-prettier": "^5.1.3",
"qr-scanner": "^1.4.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down Expand Up @@ -63,4 +64,4 @@
}
]
]
}
}
Loading

0 comments on commit 3b49a53

Please sign in to comment.