@@ -26,4 +27,6 @@ export default function MessageHeader({ filter }) {
);
-}
+};
+
+export default MessageHeader;
diff --git a/frontend/src/index.js b/frontend/src/index.js
index 7303e15..c166ceb 100644
--- a/frontend/src/index.js
+++ b/frontend/src/index.js
@@ -4,7 +4,7 @@ import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux';
import { I18nextProvider } from 'react-i18next';
import App from './Components/App';
-import { store } from './store';
+import store from './store';
import i18n from './localization/i18next';
import 'bootstrap/dist/css/bootstrap.min.css';
diff --git a/frontend/src/slices/authSlice.js b/frontend/src/slices/authSlice.js
index 0aefef7..a22e36c 100644
--- a/frontend/src/slices/authSlice.js
+++ b/frontend/src/slices/authSlice.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-param-reassign */
import { createSlice } from '@reduxjs/toolkit';
const getStateFromLocalStorage = () => {
diff --git a/frontend/src/slices/channelsSlice.js b/frontend/src/slices/channelsSlice.js
index 9dfe3fc..131b472 100644
--- a/frontend/src/slices/channelsSlice.js
+++ b/frontend/src/slices/channelsSlice.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-param-reassign */
import { createSlice } from '@reduxjs/toolkit';
const initialState = {
@@ -26,7 +27,9 @@ const slice = createSlice({
}
},
renameChannel: (state, { payload }) => {
- state.channelsList = state.channelsList.map((channel) => (channel.id === payload.id ? payload : channel));
+ const updatedChannels = state
+ .channelsList.map((channel) => (channel.id === payload.id ? payload : channel));
+ state.channelsList = updatedChannels;
},
setCurrentChannelId: (state, { payload }) => {
state.currentChannelId = payload;
diff --git a/frontend/src/socket.js b/frontend/src/socket.js
index 4de0790..2832734 100644
--- a/frontend/src/socket.js
+++ b/frontend/src/socket.js
@@ -1,7 +1,8 @@
+/* eslint-disable functional/no-let */
import { io } from 'socket.io-client';
import { addChannel, removeChannel, renameChannel } from './slices/channelsSlice';
import { addMessage, editMessage, removeMessage } from './slices/messagesSlice';
-import { store } from './store';
+import store from './store';
let socket;
let isSubscribed = false;
diff --git a/frontend/src/store.js b/frontend/src/store.js
index 8457e7b..b6d4677 100644
--- a/frontend/src/store.js
+++ b/frontend/src/store.js
@@ -13,7 +13,7 @@ const saveAuthToLocalStorageMiddleware = (store) => (next) => (action) => {
return result;
};
-const store = configureStore({
+export default configureStore({
reducer: {
auth: authReducer,
channels: channelsReducer,
@@ -23,5 +23,3 @@ const store = configureStore({
middleware: (getDefaultMiddleware) => (
getDefaultMiddleware().concat(saveAuthToLocalStorageMiddleware)),
});
-
-export { store };
diff --git a/package-lock.json b/package-lock.json
index 359fc73..b3e6865 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -49,15 +49,7 @@
"web-vitals": "^2.1.4",
"yup": "^0.32.11"
},
- "devDependencies": {
- "eslint": "^8.57.0",
- "eslint-config-airbnb": "^19.0.4",
- "eslint-plugin-functional": "^4.4.1",
- "eslint-plugin-import": "^2.26.0",
- "eslint-plugin-jsx-a11y": "^6.6.1",
- "eslint-plugin-react": "^7.35.0",
- "eslint-plugin-react-hooks": "^4.6.2"
- }
+ "devDependencies": {}
},
"frontend/node_modules/emittery": {
"version": "0.6.0",
@@ -6732,15 +6724,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/deepmerge-ts": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-4.3.0.tgz",
- "integrity": "sha512-if3ZYdkD2dClhnXR5reKtG98cwyaRT1NeugQoAPTTfsOpV9kqyeiBF9Qa5RHjemb3KzD5ulqygv6ED3t5j9eJw==",
- "dev": true,
- "engines": {
- "node": ">=12.4.0"
- }
- },
"node_modules/default-gateway": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
@@ -7661,46 +7644,6 @@
"eslint": "^8.1.0"
}
},
- "node_modules/eslint-plugin-functional": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-functional/-/eslint-plugin-functional-4.4.1.tgz",
- "integrity": "sha512-YhSfHS52Si62Sn126g9wGx+XnWMoWhwEt6ctVXfcJj+xMUiggjOqUVMca7fuLNzX8jYiNBIeU1Y0teHGePZ3NA==",
- "dev": true,
- "dependencies": {
- "@typescript-eslint/utils": "^5.10.2",
- "deepmerge-ts": "^4.0.3",
- "escape-string-regexp": "^4.0.0",
- "semver": "^7.3.7"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "peerDependencies": {
- "eslint": "^8.0.0",
- "tsutils": "^3.0.0",
- "typescript": "^3.4.1 || ^4.0.0"
- },
- "peerDependenciesMeta": {
- "tsutils": {
- "optional": true
- },
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/eslint-plugin-functional/node_modules/semver": {
- "version": "7.6.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
- "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
- "dev": true,
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/eslint-plugin-import": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",