Skip to content

Commit 64d9058

Browse files
authored
Merge pull request #16 from rubydevi/dev
Final group capstone
2 parents 899c8ce + f513b3c commit 64d9058

File tree

83 files changed

+27460
-38
lines changed

Some content is hidden

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

83 files changed

+27460
-38
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["@babel/preset-react"],
3+
"plugins": ["@babel/plugin-syntax-jsx"]
4+
}

.eslintrc.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"jest": true
6+
},
7+
"parser": "@babel/eslint-parser",
8+
"parserOptions": {
9+
"requireConfigFile": false,
10+
"babelOptions": {
11+
"presets": ["@babel/preset-react"]
12+
},
13+
"ecmaFeatures": {
14+
"jsx": true
15+
},
16+
"ecmaVersion": 2018,
17+
"sourceType": "module"
18+
},
19+
"extends": [
20+
"airbnb",
21+
"plugin:react/recommended",
22+
"plugin:react-hooks/recommended"
23+
],
24+
"plugins": ["react"],
25+
"rules": {
26+
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
27+
"react/react-in-jsx-scope": "off",
28+
"import/no-unresolved": "off",
29+
"no-shadow": "off",
30+
"jsx-a11y/label-has-associated-control": [
31+
"error",
32+
{
33+
"required": {
34+
"some": ["nesting", "id"]
35+
}
36+
}
37+
],
38+
"jsx-a11y/label-has-for": [
39+
"error",
40+
{
41+
"required": {
42+
"some": ["nesting", "id"]
43+
}
44+
}
45+
]
46+
},
47+
"overrides": [
48+
{
49+
// feel free to replace with your preferred file pattern - eg. 'src/**/*Slice.js' or 'redux/**/*Slice.js'
50+
"files": ["src/**/*Slice.js"],
51+
// avoid state param assignment
52+
"rules": { "no-param-reassign": ["error", { "props": false }] }
53+
}
54+
],
55+
"ignorePatterns": ["dist/", "build/"]
56+
}

.github/workflows/linters.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Linters
2+
3+
on: pull_request
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
eslint:
10+
name: ESLint
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: '18.x'
17+
- name: Setup ESLint
18+
run: |
19+
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
20+
[ -f .eslintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.eslintrc.json
21+
[ -f .babelrc ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.babelrc
22+
- name: ESLint Report
23+
run: npx eslint "**/*.{js,jsx}"
24+
stylelint:
25+
name: Stylelint
26+
runs-on: ubuntu-22.04
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: '18.x'
32+
- name: Setup Stylelint
33+
run: |
34+
npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x
35+
[ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/react-redux/.stylelintrc.json
36+
- name: Stylelint Report
37+
run: npx stylelint "**/*.{css,scss}"
38+
nodechecker:
39+
name: node_modules checker
40+
runs-on: ubuntu-22.04
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: Check node_modules existence
44+
run: |
45+
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

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

.stylelintrc.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"extends": ["stylelint-config-standard"],
3+
"plugins": ["stylelint-scss", "stylelint-csstree-validator"],
4+
"rules": {
5+
"at-rule-no-unknown": [
6+
true,
7+
{
8+
"ignoreAtRules": [
9+
"tailwind",
10+
"apply",
11+
"variants",
12+
"responsive",
13+
"screen"
14+
]
15+
}
16+
],
17+
"scss/at-rule-no-unknown": [
18+
true,
19+
{
20+
"ignoreAtRules": [
21+
"tailwind",
22+
"apply",
23+
"variants",
24+
"responsive",
25+
"screen"
26+
]
27+
}
28+
],
29+
"csstree/validator": true
30+
},
31+
"ignoreFiles": [
32+
"build/**",
33+
"dist/**",
34+
"**/reset*.css",
35+
"**/bootstrap*.css",
36+
"**/*.js",
37+
"**/*.jsx"
38+
]
39+
}

0 commit comments

Comments
 (0)