Skip to content

Commit 2afe022

Browse files
bsekachevChris Lee-Messer
authored and
Chris Lee-Messer
committed
UI eslint fixes (cvat-ai#908)
* Installed airbnb fullsettings * Fixed actions menu * Create model/task page * File manager, header * Labels editor * Login, register * Models page & model runner * Tasks page * Feedback and base app * Tasks page * Containers * Reducers * Fixed additional issues * Small pagination fix
1 parent ccb16b0 commit 2afe022

File tree

76 files changed

+2620
-1896
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2620
-1896
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"eslint.enable": true,
44
"eslint.validate": [
55
"javascript",
6-
"typescript"
6+
"typescript",
7+
"typescriptreact",
78
],
89
"eslint.workingDirectories": [
910
{

cvat-ui/.eslintrc.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,23 @@ module.exports = {
1919
],
2020
'extends': [
2121
'plugin:@typescript-eslint/recommended',
22-
'airbnb-typescript/base',
22+
'airbnb-typescript',
2323
'plugin:import/errors',
2424
'plugin:import/warnings',
2525
'plugin:import/typescript',
2626
],
2727
'rules': {
2828
'@typescript-eslint/indent': ['warn', 4],
29+
'react/jsx-indent': ['warn', 4],
30+
'react/jsx-indent-props': ['warn', 4],
31+
'react/jsx-props-no-spreading': 0,
32+
'jsx-quotes': ['error', 'prefer-single'],
33+
'arrow-parens': ['error', 'always'],
2934
'@typescript-eslint/no-explicit-any': [0],
3035
'no-restricted-syntax': [0, {'selector': 'ForOfStatement'}],
3136
'no-plusplus': [0],
37+
'lines-between-class-members': 0,
38+
'react/no-did-update-set-state': 0, // https://github.com/airbnb/javascript/issues/1875
3239
},
3340
'settings': {
3441
'import/resolver': {

cvat-ui/package-lock.json

+159-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cvat-ui/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@
1414
"@babel/preset-env": "^7.6.0",
1515
"@babel/preset-react": "^7.0.0",
1616
"@babel/preset-typescript": "^7.6.0",
17-
"@typescript-eslint/eslint-plugin": "^1.13.0",
17+
"@typescript-eslint/eslint-plugin": "^2.10.0",
1818
"babel": "^6.23.0",
1919
"babel-loader": "^8.0.6",
2020
"babel-plugin-import": "^1.12.2",
2121
"css-loader": "^3.2.0",
2222
"eslint-config-airbnb-typescript": "^4.0.1",
2323
"eslint-plugin-import": "^2.18.2",
2424
"eslint-plugin-jsx-a11y": "^6.2.3",
25-
"eslint-plugin-react": "^7.14.3",
25+
"eslint-plugin-react": "^7.17.0",
26+
"eslint-plugin-react-hooks": "^1.7.0",
2627
"html-webpack-plugin": "^3.2.0",
2728
"nodemon": "^1.19.2",
2829
"style-loader": "^1.0.0",
29-
"typescript": "^3.6.3",
30+
"typescript": "^3.7.3",
3031
"webpack": "^4.41.2",
3132
"webpack-cli": "^3.3.8",
3233
"webpack-dev-server": "^3.8.0"

cvat-ui/src/actions/models-actions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ async function timeoutCallback(
431431
dispatch(getInferenceStatusSuccess(taskID, activeInference));
432432
} catch (error) {
433433
dispatch(getInferenceStatusFailed(taskID, new Error(
434-
`Server request for the task ${taskID} was failed`
434+
`Server request for the task ${taskID} was failed`,
435435
)));
436436
}
437437
}

0 commit comments

Comments
 (0)