Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-react"],
"plugins": ["@babel/plugin-syntax-jsx"]
}
39 changes: 39 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"extends": [
"airbnb",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"plugins": ["react"],
"rules": {
"react/jsx-filename-extension": [
"warn",
{ "extensions": [".js", ".jsx"] }
],
"react/react-in-jsx-scope": "off",
"import/no-unresolved": "off",
"no-shadow": "off"
},
"overrides": [
{
// feel free to replace with your preferred file pattern - eg. 'src/**/*Slice.js' or 'redux/**/*Slice.js'
"files": ["src/**/*Slice.js"],
// avoid state param assignment
"rules": { "no-param-reassign": ["error", { "props": false }] }
}
],
"ignorePatterns": ["dist/", "build/"]
}
45 changes: 45 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Linters

on: pull_request

env:
FORCE_COLOR: 1

jobs:
eslint:
name: ESLint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup ESLint
run: |
npm install --save-dev eslint@7.x eslint-config-airbnb@18.x eslint-plugin-import@2.x eslint-plugin-jsx-a11y@6.x eslint-plugin-react@7.x eslint-plugin-react-hooks@4.x @babel/eslint-parser@7.x @babel/core@7.x @babel/plugin-syntax-jsx@7.x @babel/preset-env@7.x @babel/preset-react@7.x
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.eslintrc.json
[ -f .babelrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.babelrc
- name: ESLint Report
run: npx eslint "**/*.{js,jsx}"
stylelint:
name: Stylelint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Setup Stylelint
run: |
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.stylelintrc.json
- name: Stylelint Report
run: npx stylelint "**/*.{css,scss}"
nodechecker:
name: node_modules checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check node_modules existence
run: |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi
39 changes: 39 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"extends": ["stylelint-config-standard"],
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
"rules": {
"at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"scss/at-rule-no-unknown": [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
],
"csstree/validator": true
},
"ignoreFiles": [
"build/**",
"dist/**",
"**/reset*.css",
"**/bootstrap*.css",
"**/*.js",
"**/*.jsx"
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Hassan Shakur

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
156 changes: 118 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,150 @@
# Getting Started with Create React App
<a name="readme-top"></a>

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
<div align="center">
<br/>

## Available Scripts
<h3><b>Hello React Frontend</b></h3>

In the project directory, you can run:
</div>

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
# 📗 Table of Contents

The page will reload when you make changes.\
You may also see any lint errors in the console.
- [📗 Table of Contents](#-table-of-contents)
- [📖 Hello React Frontend](#-hello-react-frontend)
- [🛠 Built With ](#-built-with-)
- [Tech Stack ](#tech-stack-)
- [Key Features ](#key-features-)
- [💻 Getting Started ](#-getting-started-)
- [Install](#install)
- [Run tests](#run-tests)
- [👥 Authors ](#-authors-)
- [🤝 Contributing ](#-contributing-)
- [⭐️ Show your support ](#️-show-your-support-)
- [🙏 Acknowledgments ](#-acknowledgments-)
- [📝 License ](#-license-)

### `npm test`
<!-- PROJECT DESCRIPTION -->

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
# 📖 Hello React Frontend<a name="about-project"></a>

### `npm run build`
**This is a simple frontend fetchng data from its rails backend.**

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
Here is the [Backend URL](https://github.com/microhass/hello-rails-back-end)

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
## 🛠 Built With <a name="built-with"></a>

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### Tech Stack <a name="tech-stack"></a>

### `npm run eject`
> This project was built using the following technologies:

**Note: this is a one-way operation. Once you `eject`, you can't go back!**
- React
- Redux
- CSS

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
<!-- Features -->

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
### Key Features <a name="key-features"></a>

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
- **Fetch random messages.**

## Learn More
<p align="right">(<a href="#readme-top">back to top</a>)</p>

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
<!-- GETTING STARTED -->

### Code Splitting
## 💻 Getting Started <a name="getting-started"></a>

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
> In order to start with this project do as follows:

### Analyzing the Bundle Size
To get get a local copy up and running, you can follow these simple steps:

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Install

### Making a Progressive Web App
Clone the repository to your local machine using the following command:

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
```sh
git clone https://github.com/microhass/hello-react-front-end.git
```

### Advanced Configuration
Navigate to the project directory:

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
```sh
cd hello-react-front-end
```

### Deployment
Install the necessary dependencies by running:

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
```sh
npm install
```

### `npm run build` fails to minify
Start the local dev server using the command:

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
```sh
npm start
```

The website will be live at `localhost:3000/`. You can now make changes to the project as desired and push them back to the repository using Git.

### Run tests

To run tests, run the following command: -->



```sh
npm test
```


<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- AUTHORS -->

## 👥 Authors <a name="authors"></a>

<!-- > Mention all of the collaborators of this project. -->

👤 **Hassan Shakur**

- GitHub: [@hassanShakur](https://github.com/hassanShakur)
- Twitter: [@hassShakur](https://twitter.com/hassShakur)
- LinkedIn: [hassanShakur](https://www.linkedin.com/in/hassanShakur)

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- CONTRIBUTING -->

## 🤝 Contributing <a name="contributing"></a>

If you'd like to contribute to this project, feel free to fork the repository and make changes as you see fit. Please submit a pull request with your changes and We'll review them as soon as possible.

Feel free to check the [issues page](../../issues/).

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- SUPPORT -->

## ⭐️ Show your support <a name="support"></a>

> We are excited to share with you my latest project on Github. As you know, Github is an essential tool for developers to showcase their skills, collaborate with others, and contribute to open-source projects. By supporting my project, you can help me improve us Github workflow skills and learn how to set up HTML & CSS linters.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- ACKNOWLEDGEMENTS -->

## 🙏 Acknowledgments <a name="acknowledgements"></a>

> We would like to thank the Microverse community for their support and guidance throughout this project. Special thanks to our peers and mentors for their constructive feedback and advice.

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- FAQ (optional) -->

## 📝 License <a name="license"></a>

This project is [MIT](./LICENSE) licensed.

<p align="right">(<a href="#readme-top">back to top</a>)</p>
Loading