Skip to content

Commit bed8392

Browse files
committed
socket io chat v2
1 parent a059ef8 commit bed8392

File tree

159 files changed

+2259
-4238
lines changed

Some content is hidden

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

159 files changed

+2259
-4238
lines changed

.babelrc

Lines changed: 0 additions & 28 deletions
This file was deleted.

.eslintrc.js

Lines changed: 91 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,91 @@
1-
// 0 - Off
2-
// 1 - Warn
3-
// 2 - Error
4-
5-
module.exports = {
6-
'plugins': [
7-
'react'
8-
],
9-
'extends': [
10-
'airbnb'
11-
],
12-
env: {
13-
es6: true,
14-
node: true,
15-
browser: true
16-
},
17-
settings: {
18-
"import/resolver": "babel-plugin-root-import"
19-
},
20-
parser: 'babel-eslint',
21-
parserOptions: {
22-
ecmaVersion: 8,
23-
sourceType: 'module',
24-
ecmaFeatures: {
25-
jsx: true,
26-
},
27-
},
28-
'rules': {
29-
// General JS'
30-
"linebreak-style": 0,
31-
'no-empty': 0,
32-
'no-bitwise': 0,
33-
'dot-notation': [2, {
34-
'allowPattern': '^(START|FINISH|INIT|DONE|NOT_MODIFIED|304|FAIL)$',
35-
}],
36-
'no-console': 0,
37-
'arrow-parens': 0,
38-
'no-extra-semi': 0,
39-
'global-require': 0,
40-
'arrow-body-style': 0,
41-
'no-empty-function': 0,
42-
'no-confusing-arrow': 0,
43-
'template-curly-spacing': 0,
44-
'no-prototype-builtins': 0,
45-
'no-param-reassign': 0,
46-
'class-methods-use-this': 0,
47-
'comma-dangle': [2, 'always-multiline'],
48-
'no-use-before-define': [2, {
49-
'functions': false,
50-
}],
51-
'no-unused-expressions': [2, {
52-
allowTaggedTemplates: true,
53-
}],
54-
'no-underscore-dangle': 0,
55-
'max-len': [1, 120],
56-
'consistent-return': 0,
57-
'space-before-function-paren': 0,
58-
'func-names': 0,
59-
'no-shadow': 0,
60-
61-
// Import
62-
'import/first': 0,
63-
'import/extensions': 0,
64-
'import/no-unresolved': 0,
65-
'import/no-dynamic-require': 0,
66-
'import/newline-after-import': 0,
67-
'import/prefer-default-export': 0,
68-
'import/no-webpack-loader-syntax': 0,
69-
'import/no-extraneous-dependencies': 0,
70-
71-
// React
72-
'react/forbid-prop-types': 0,
73-
'react/jsx-filename-extension': [2, {
74-
'extensions': ['.js', '.jsx'],
75-
}],
76-
'react/prefer-stateless-function': 0,
77-
'react/jsx-boolean-value': 0,
78-
'react/prop-types': 0,
79-
'react/jsx-no-bind': 1,
80-
'react/no-unused-prop-types': 0,
81-
'react/sort-comp': [2, {
82-
order: [
83-
'static-methods',
84-
'lifecycle',
85-
'everything-else',
86-
],
87-
}],
88-
89-
'jsx-a11y/no-static-element-interactions': 0,
90-
'jsx-a11y/img-has-alt': 0,
91-
'jsx-a11y/href-no-hash': 0,
92-
"jsx-a11y/label-has-for": [ 2, {
93-
"components": [ "Label" ],
94-
"required": {
95-
"every": [ "nesting", "id" ]
96-
},
97-
"allowChildren": false
98-
}]
99-
}
100-
}
1+
// 0 - Off
2+
// 1 - Warn
3+
// 2 - Error
4+
5+
module.exports = {
6+
'plugins': [
7+
'react'
8+
],
9+
'extends': [
10+
'airbnb'
11+
],
12+
env: {
13+
es6: true,
14+
node: true,
15+
browser: true
16+
},
17+
parser: 'babel-eslint',
18+
parserOptions: {
19+
ecmaVersion: 8,
20+
sourceType: 'module',
21+
ecmaFeatures: {
22+
jsx: true,
23+
},
24+
},
25+
'rules': {
26+
// General JS'
27+
"linebreak-style": 0,
28+
'no-empty': 0,
29+
'no-bitwise': 0,
30+
'dot-notation': [2, {
31+
'allowPattern': '^(START|FINISH|INIT|DONE|NOT_MODIFIED|304|FAIL)$',
32+
}],
33+
'no-console': 0,
34+
'arrow-parens': 0,
35+
'no-extra-semi': 0,
36+
'global-require': 0,
37+
'arrow-body-style': 0,
38+
'no-empty-function': 0,
39+
'no-confusing-arrow': 0,
40+
'template-curly-spacing': 0,
41+
'no-prototype-builtins': 0,
42+
'no-param-reassign': 0,
43+
'class-methods-use-this': 0,
44+
'comma-dangle': [2, 'always-multiline'],
45+
'no-use-before-define': [2, {
46+
'functions': false,
47+
}],
48+
'no-unused-expressions': [2, {
49+
allowTaggedTemplates: true,
50+
}],
51+
'no-underscore-dangle': 0,
52+
'max-len': [1, 120],
53+
'consistent-return': 0,
54+
'space-before-function-paren': 0,
55+
'func-names': 0,
56+
'no-shadow': 0,
57+
58+
// Import
59+
'import/first': 0,
60+
'import/extensions': 0,
61+
'import/no-unresolved': 0,
62+
'import/no-dynamic-require': 0,
63+
'import/newline-after-import': 0,
64+
'import/prefer-default-export': 0,
65+
'import/no-webpack-loader-syntax': 0,
66+
'import/no-extraneous-dependencies': 0,
67+
68+
// React
69+
'react/forbid-prop-types': 0,
70+
'react/jsx-filename-extension': [2, {
71+
'extensions': ['.js', '.jsx'],
72+
}],
73+
'react/prefer-stateless-function': 0,
74+
'react/jsx-boolean-value': 0,
75+
'react/prop-types': 0,
76+
'react/jsx-no-bind': 1,
77+
'react/jsx-one-expression-per-line': 0,
78+
'react/no-unused-prop-types': 0,
79+
'react/sort-comp': [2, {
80+
order: [
81+
'static-methods',
82+
'lifecycle',
83+
'everything-else',
84+
],
85+
}],
86+
87+
'jsx-a11y/no-static-element-interactions': 0,
88+
'jsx-a11y/img-has-alt': 0,
89+
'jsx-a11y/href-no-hash': 0,
90+
}
91+
}

.gitignore

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
1-
# See https://help.github.com/ignore-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
6-
# testing
7-
/coverage
8-
9-
# production
10-
/build
11-
yarn.lock
12-
/yarn.lock/
13-
log.txt
14-
public
15-
16-
# misc
17-
.DS_Store
18-
.env.local
19-
.env.development.local
20-
.env.test.local
21-
.env.production.local
22-
23-
npm-debug.log*
24-
yarn-debug.log*
25-
yarn-error.log*
26-
27-
# mockups
28-
/psd/
1+
/node_modules
2+
node_modules
3+
/dist/
4+
psd
5+
package-lock.json

README.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
# React-redux socket.io Chat
1+
# ~ React-redux socket.io Chat ~
22

33
This is my PET Chat project that I'd like to share with you.
44

5+
# [Webpack 4, babel 7, styled-components, redux, redux-thunk, socket.io]
6+
7+
58
# Installation
69

710
1) Open your console and type:
811

912
2) Install dependencies via npm `npm i` or yarn `yarn install`.
1013

11-
3) Build ui application `npm run dev || prod`.
12-
13-
4) Start web server `npm run server`.
14+
3) Start web server `npm run server`.
1415

15-
4.1) For fast start use `npm run start`
16-
17-
5) Open 2 Browser tabs and enter 2 different nicknames. Navigate to [http://localhost:5001](http://localhost:5001)
16+
4) Open 2 Browser tabs and enter 2 different nicknames. Navigate to [http://localhost:5001](http://localhost:5001)
1817

1918
6) Type anything in a chat.
2019

@@ -26,15 +25,6 @@ This is my PET Chat project that I'd like to share with you.
2625
- My [base styles](https://github.com/AlexLasagna/React-redux-socket.io-Chat/tree/master/src/styles)
2726
- My [components](https://github.com/AlexLasagna/React-redux-socket.io-Chat/tree/master/src/pages)
2827

29-
# What I used in this PET project
30-
31-
- [React.js](https://reactjs.org/)
32-
- [Redux](https://redux.js.org/)
33-
- [styled-components](https://www.styled-components.com/)
34-
- [Webpack](https://webpack.js.org/) to compile jsx and stuff
35-
- [socket.io](https://socket.io/)
36-
- Linted my project with [my-eslint-config](https://github.com/AlexLasagna/React-redux-socket.io-Chat/blob/master/.eslintrc.js)
37-
3828
# Build production
3929

40-
If you want to build a production version of my app you need to type `npm run prod` || `yarn prod` in a console. This will create public folder where everything will be compressed and minified.
30+
If you want to build a production version of my app you need to type `npm run build` || `yarn build` in a console. This will create dist folder where everything will be compressed and minified.

0 commit comments

Comments
 (0)