-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ITurres/project-setup
Project setup
- Loading branch information
Showing
19 changed files
with
22,386 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react", | ||
"@babel/preset-typescript" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-transform-react-jsx" // ?For JSX/TSX syntax support | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"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": ["error", { "extensions": [".jsx", ".tsx"] }], | ||
"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/"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Linters | ||
|
||
on: | ||
push: | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
eslint: | ||
name: ESLint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18.x" | ||
- name: Setup ESLint | ||
run: | | ||
npm install --save-dev eslint@7 eslint-config-airbnb@18 eslint-plugin-import@2 eslint-plugin-jsx-a11y@6 eslint-plugin-react@7 eslint-plugin-react-hooks@4 @babel/eslint-parser@7 @babel/core@7 @babel/plugin-syntax-jsx@7 @babel/preset-env@7 @babel/preset-react@7 | ||
[ -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 "**/*.{ts,tsx}" | ||
|
||
stylelint: | ||
name: Stylelint | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18.x" | ||
- name: Setup Stylelint | ||
run: | | ||
npm install --save-dev stylelint@13 stylelint-scss@3 stylelint-config-standard@21 stylelint-csstree-validator@1 | ||
[ -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/" ] || [ -f "yarn.lock" ]; then | ||
echo -e "\e[1;31mThe node_modules/ folder or yarn.lock file was pushed to the repo. Please remove them from the GitHub repository and try again." | ||
echo -e "\e[1;32mYou can set up a .gitignore file with these files included to prevent this from happening in the future." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
Oops, something went wrong.