This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
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 #20 from JacobMGEvans/master
Structured out basic scaffolding & Forms & Routing & React-like File System
- Loading branch information
Showing
12 changed files
with
1,804 additions
and
84 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,54 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"parserOptions": { | ||
"ecmaVersion": 10 | ||
}, | ||
"plugins": ["babel", "react-hooks"], | ||
"extends": ["eslint:recommended"], | ||
"env": { "browser": true, "node": true, "es6": true }, | ||
"settings": { | ||
"polyfills": ["fetch"] | ||
}, | ||
"rules": { | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"quotes": [2, "backtick", "avoid-escape"], | ||
"semi": "error", | ||
"react/button-has-type": [0], | ||
"react/forbid-prop-types": [0], | ||
"react/no-unused-prop-types": [0], | ||
"react/jsx-filename-extension": [0], | ||
"react/jsx-one-expression-per-line": [0], | ||
"no-underscore-dangle": [0], | ||
"max-len": [0], | ||
"no-return-assign": [0], | ||
"no-param-reassign": [0], | ||
"global-require": [0], | ||
"no-useless-escape": [0], | ||
"no-unused-expressions": [0], | ||
"consistent-return": [0], | ||
"class-methods-use-this": [0], | ||
"react/prefer-stateless-function": [0], | ||
"no-nested-ternary": [0], | ||
"no-undef": [1], | ||
"react/no-array-index-key": [0], | ||
"react/prop-types": [0], | ||
"babel/new-cap": [0], | ||
"babel/object-curly-spacing": [0], | ||
"babel/no-invalid-this": [1], | ||
"no-console": [0], | ||
"import/no-extraneous-dependencies": [1], | ||
"import/prefer-default-export": [0], | ||
"react/no-unused-state": [1], | ||
"no-unexpected-multiline": [0], | ||
"function-paren-newline": [0], | ||
"react/no-string-refs": [0], | ||
"react/destructuring-assignment": [1], | ||
"react/no-access-state-in-setstate": [0], | ||
"jsx-a11y/click-events-have-key-events": [1], | ||
"jsx-a11y/no-static-element-interactions": [1], | ||
"jsx-a11y/label-has-for": [1], | ||
"jsx-a11y/alt-text": [1], | ||
"arrow-parens": [0] | ||
} | ||
} |
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
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
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,8 @@ | ||
import React from 'react'; | ||
import { render, fireEvent } from '@testing-library/react'; | ||
|
||
import App from '../App'; | ||
|
||
describe('Tests for App.js', () => { | ||
test('should test App renders with no issues', () => {}); | ||
}); |
Empty file.
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,32 @@ | ||
import React from 'react'; | ||
import { Formik } from 'formik'; | ||
|
||
const ContactUs = () => ( | ||
<div> | ||
<h1>Formik Basic Example</h1> | ||
<Formik | ||
initialValues={{ name: 'Jean Luc Picard' }} | ||
onSubmit={(values, actions) => { | ||
setTimeout(() => { | ||
alert(JSON.stringify(values, null, 2)); | ||
actions.setSubmitting(false); | ||
}, 1000); | ||
}} | ||
render={props => ( | ||
<form onSubmit={props.handleSubmit}> | ||
<input | ||
type='text' | ||
onChange={props.handleChange} | ||
onBlur={props.handleBlur} | ||
value={props.values.name} | ||
name='name' | ||
/> | ||
{props.errors.name && <div id='feedback'>{props.errors.name}</div>} | ||
<button type='submit'>Submit</button> | ||
</form> | ||
)} | ||
/> | ||
</div> | ||
); | ||
|
||
export default ContactUs; |
Empty file.
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,12 @@ | ||
import React from 'react'; | ||
import { Link } from '@reach/router'; | ||
|
||
function Home() { | ||
return ( | ||
<header> | ||
<Link to='/'>Home</Link> | ||
<Link to='contact-us'>Contact Us</Link> | ||
</header> | ||
); | ||
} | ||
export default Home; |
Empty file.
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,5 @@ | ||
import React from 'react'; | ||
|
||
const Home = () => <div>Content Home Page</div>; | ||
|
||
export default Home; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.