diff --git a/.babelrc b/.babelrc index d28c37d..115747e 100644 --- a/.babelrc +++ b/.babelrc @@ -1,6 +1,6 @@ -{ - "presets": [ - "@babel/preset-react" - ], - "plugins": ["@babel/plugin-syntax-jsx"] +{ + "presets": [ + "@babel/preset-react" + ], + "plugins": ["@babel/plugin-syntax-jsx"] } \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 928f2ae..c2f1ab3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,26 +1,30 @@ -{ - "env": { - "browser": true, - "es6": true, - "jest": true - }, - "parser": "@babel/eslint-parser", - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "ecmaVersion": 2018, - "sourceType": "module" - }, - "extends": ["airbnb", "plugin:react/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", - "react/prop-types": "off", - "no-param-reassign": "off" - }, - "ignorePatterns": ["dist/", "build/"] -} +{ + "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", + "react/prop-types": "off", + "no-param-reassign": "off" + }, + "ignorePatterns": ["dist/", "build/"] +} diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 0b6a7cc..6aa771e 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -1,45 +1,45 @@ -name: Linters - -on: pull_request - -env: - FORCE_COLOR: 1 - -jobs: - eslint: - name: ESLint - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "12.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 . - stylelint: - name: Stylelint - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: "12.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-18.04 - steps: - - uses: actions/checkout@v2 - - 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 +name: Linters + +on: pull_request + +env: + FORCE_COLOR: 1 + +jobs: + eslint: + name: ESLint + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "12.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 . + stylelint: + name: Stylelint + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "12.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@v2 + - 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 diff --git a/.stylelintrc.json b/.stylelintrc.json index a5dbf04..32127b3 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,20 +1,20 @@ -{ - "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"] -} +{ + "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"] +} diff --git a/src/index.js b/src/index.js index ab7a9d5..6de5fa7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,14 +1,14 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { Provider } from 'react-redux'; -import App from './App'; -import store from './redux/configureStore'; - -const root = ReactDOM.createRoot(document.getElementById('root')); -root.render( - - - - - , -); +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { Provider } from 'react-redux'; +import App from './App'; +import store from './redux/configureStore'; + +const root = ReactDOM.createRoot(document.getElementById('root')); +root.render( + + + + + +);