Skip to content

Commit

Permalink
chore: format using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mldangelo committed Jul 8, 2024
1 parent ea55de3 commit 55da4fd
Show file tree
Hide file tree
Showing 66 changed files with 3,781 additions and 3,230 deletions.
54 changes: 33 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,50 @@ module.exports = {
node: true,
},
extends: 'airbnb',
ignorePatterns: [
'node_modules/',
'build/',
],
ignorePatterns: ['node_modules/', 'build/'],
parser: '@babel/eslint-parser',
plugins: ['react'],
rules: {
'jsx-a11y/anchor-is-valid': ['error', {
aspects: ['noHref', 'invalidHref', 'preferButton'],
components: ['Link'],
specialLink: ['to', 'hrefLeft', 'hrefRight'],
}],
'jsx-a11y/anchor-is-valid': [
'error',
{
aspects: ['noHref', 'invalidHref', 'preferButton'],
components: ['Link'],
specialLink: ['to', 'hrefLeft', 'hrefRight'],
},
],
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/href-no-hash': 'off',
'jsx-a11y/no-static-element-interactions': 0,
'linebreak-style': ['error', os.EOL === '\r\n' ? 'windows' : 'unix'],
'no-console': ['error', {
allow: ['warn', 'error', 'info'],
}],
'no-console': [
'error',
{
allow: ['warn', 'error', 'info'],
},
],
'no-underscore-dangle': 0,
'react/destructuring-assignment': 0,
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
'react/jsx-filename-extension': [1, {
extensions: ['.js', '.jsx'],
}],
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx'],
},
],
'react/jsx-no-useless-fragment': 0,
'react/jsx-one-expression-per-line': 0,
'react/jsx-props-no-spreading': 0,
'react/jsx-wrap-multilines': [1, {
assignment: true,
declaration: true,
return: true,
}],
'react/jsx-wrap-multilines': [
1,
{
assignment: true,
declaration: true,
return: true,
},
],
},
};
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ Ensure you have [node](https://nodejs.org/) >= v16. Optionally, use [nvm](https:

1. Clone the repository:

```bash
git clone git://github.com/mldangelo/personal-site.git
cd personal-site
```
```bash
git clone git://github.com/mldangelo/personal-site.git
cd personal-site
```

2. (Optional) Ensure you're on Node v16 or higher:

```bash
nvm install
node --version
```
```bash
nvm install
node --version
```

3. Install dependencies:

```bash
npm install
```
```bash
npm install
```

4. Start the application:

```bash
npm start
```
```bash
npm start
```

By default, the application should be available at [http://localhost:3000/](http://localhost:3000/).

Expand All @@ -67,9 +67,9 @@ For a static export without deploying to GitHub Pages:
- Remove or disable `.github/workflows/github-pages.yml`.
- Execute:

```bash
npm run predeploy
```
```bash
npm run predeploy
```

This will generate a static version in `personal-site/build/` which you can host or deploy to a CDN.

Expand Down
24 changes: 12 additions & 12 deletions docs/adapting-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ You may wish to fork this repository or remove my remote origin and add your own
1. Change `homepage` in `package.json` to reflect where you plan to host the site. This is important for static exporting via react-snap. This also changes your path when developing locally. For example, a homepage of `mldangelo.com` places the site at `localhost:3000` and a homepage of `https://mldangelo.github.io/personal-site/` places the site at `localhost:3000/personal-site/`. If you plan to host at on a path such as `https://[your-github-username].github.io/[your-repo-name]`, you should set this now so that your development environment mirrors your production environment.
1. Create a `.env` file. To do this, run:

```bash
cp sample.env .env
```
```bash
cp sample.env .env
```

and set values as appropriate. Most people will not need to modify this file.
and set values as appropriate. Most people will not need to modify this file.

### Adapt Content

Expand Down Expand Up @@ -59,32 +59,32 @@ Here are answers to questions I've been asked at least twice. I've attempted to

1. My CSS isn't rendering, or I see a 404 instead of my site:

Make sure the `homepage` field of `package.json` points to where you plan to host your site index. Also, double check that you created a `CNAME` file (see deployment instructions above). If neither of these work, please open an issue or send me an [email](mailto:[email protected]).
Make sure the `homepage` field of `package.json` points to where you plan to host your site index. Also, double check that you created a `CNAME` file (see deployment instructions above). If neither of these work, please open an issue or send me an [email](mailto:[email protected]).

2. LF / CRLF issues with eslint.

This is a common Windows development pitfall. See @[FrozenFury](https://github.com/FrozenFury)'s [comment](https://github.com/mldangelo/personal-site/issues/263#issuecomment-759216299) for how to update your eslint config to resolve this issue.
This is a common Windows development pitfall. See @[FrozenFury](https://github.com/FrozenFury)'s [comment](https://github.com/mldangelo/personal-site/issues/263#issuecomment-759216299) for how to update your eslint config to resolve this issue.

3. master / main

Github decided to rename the default branch of all of their repositories from master to main, and so did I. See their reasoning [here](https://github.com/github/renaming). If you're trying to pull in recent changes, consider renaming your own branch, or just create a merge commit from my main.
Github decided to rename the default branch of all of their repositories from master to main, and so did I. See their reasoning [here](https://github.com/github/renaming). If you're trying to pull in recent changes, consider renaming your own branch, or just create a merge commit from my main.

4. Google Analytics Warnings when exporting.

Either set up Google Analytics or disable the `Analytics.js` component. Read more about [react-ga](https://github.com/react-ga/react-ga).
Either set up Google Analytics or disable the `Analytics.js` component. Read more about [react-ga](https://github.com/react-ga/react-ga).

5. How do I configure git? What is nano?

Read through [git-scm](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)'s excellent documentation. I recommend setting your default text editor to something you're comfortable with.I like to use vim for writing commit messages.
Read through [git-scm](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup)'s excellent documentation. I recommend setting your default text editor to something you're comfortable with.I like to use vim for writing commit messages.

6. Can I host at [username.github.io]?

Sure, see github's documentation [here](https://pages.github.com/).
Sure, see github's documentation [here](https://pages.github.com/).

7. How do I disable eslint?

`echo "*\n" > .eslintignore` Although I really don't recommend it. Linters are good. They help prevent errors, enforce uniform style so that you can spend less time thinking about formatting and more time reading code, and eliminate easy nits for code reviews. If the rules aren't working for you, you should change them. See eslint's documentation [here](https://eslint.org/docs/about/) for more information.
`echo "*\n" > .eslintignore` Although I really don't recommend it. Linters are good. They help prevent errors, enforce uniform style so that you can spend less time thinking about formatting and more time reading code, and eliminate easy nits for code reviews. If the rules aren't working for you, you should change them. See eslint's documentation [here](https://eslint.org/docs/about/) for more information.

8. Why is my website rendering the readme file?

See 1. above and make sure that `.nojekyll` still exists in `public`. This file directs github to not attempt to render the website with Jekyll.
See 1. above and make sure that `.nojekyll` still exists in `public`. This file directs github to not attempt to render the website with Jekyll.
6 changes: 3 additions & 3 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Here are a few recommendations to land PRs quickly.
## Preparing a Pull Request

1. Write a good summary in your PR description.
- Concisely explain your changes.
- Justify why your changes are important.
- Explain how to test your change (if not obvious).
- Concisely explain your changes.
- Justify why your changes are important.
- Explain how to test your change (if not obvious).
1. Make sure everything runs.
1. Write tests (if appropriate).
1. Self review your branch.
Expand Down
40 changes: 20 additions & 20 deletions docs/design-goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,33 @@ This projects attempts to follow these design principles. Feedback and discussio
## Good Developer Experience

1. Modular
- It should be relatively straight forward to replace the content in this repository or to add a new feature.
- Good separation of concerns. Components keep track of their own state. Props are not over-utilized.
- Limited vertical depth (changes should be relatively self encapsulated).
- Correct abstractions. - Webpack is complex, but developers don't need to understand how exactly webpack works to use this project.
- It should be relatively straight forward to replace the content in this repository or to add a new feature.
- Good separation of concerns. Components keep track of their own state. Props are not over-utilized.
- Limited vertical depth (changes should be relatively self encapsulated).
- Correct abstractions. - Webpack is complex, but developers don't need to understand how exactly webpack works to use this project.
1. Good Documentation
- Comments exist and have an appropriate level of detail.
- Code should be readable.
- Comments exist and have an appropriate level of detail.
- Code should be readable.
1. Lean
- Projects bloat over time. Actively prune for old and dead code.
- New features that affect the entire project should be carefully considered.
- Buy, don't build. Don't reinvent the wheel. Use popular npm libraries when possible.
- Projects bloat over time. Actively prune for old and dead code.
- New features that affect the entire project should be carefully considered.
- Buy, don't build. Don't reinvent the wheel. Use popular npm libraries when possible.
1. Limited horizontal fragmentation
- Linter to prevent easy PR nits & to prevent developers from wasting time thinking about code style.
- Preferred React Style - ie (functional components & proptypes).
- Consistent file structure based on current best practices.
- Similar features are built similarly. Code reads like an assembly line, not a layer cake.
- Linter to prevent easy PR nits & to prevent developers from wasting time thinking about code style.
- Preferred React Style - ie (functional components & proptypes).
- Consistent file structure based on current best practices.
- Similar features are built similarly. Code reads like an assembly line, not a layer cake.

## Stable

1. Use *Boring* technologies
- Javascript over reason or typescript. Limited ecmascript experimental features.
- Prefer popular and well maintained npm packages.
1. Use _Boring_ technologies
- Javascript over reason or typescript. Limited ecmascript experimental features.
- Prefer popular and well maintained npm packages.
1. Maintainable
- Easy setup.
- It should be easy to deploy any version of this site.
- Limited external dependencies (ie no missing headers for external libraries).
- Dependencies are kept up to date (currently uses dependabot).
- Easy setup.
- It should be easy to deploy any version of this site.
- Limited external dependencies (ie no missing headers for external libraries).
- Dependencies are kept up to date (currently uses dependabot).
1. Good tests.
1. Stable API - This project has been forked > 100 times. It should be easy for those forks adopt changes in main.

Expand Down
78 changes: 39 additions & 39 deletions public/images/favicon/manifest.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"name": "mldangelo.com",
"icons": [
{
"src": "/images/favicon/android-icon-36x36.png",
"sizes": "36x36",
"type": "image/png",
"density": "0.75"
},
{
"src": "/images/favicon/android-icon-48x48.png",
"sizes": "48x48",
"type": "image/png",
"density": "1.0"
},
{
"src": "/images/favicon/android-icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"density": "1.5"
},
{
"src": "/images/favicon/android-icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.0"
},
{
"src": "/images/favicon/android-icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"density": "3.0"
},
{
"src": "/images/favicon/android-icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}
]
"name": "mldangelo.com",
"icons": [
{
"src": "/images/favicon/android-icon-36x36.png",
"sizes": "36x36",
"type": "image/png",
"density": "0.75"
},
{
"src": "/images/favicon/android-icon-48x48.png",
"sizes": "48x48",
"type": "image/png",
"density": "1.0"
},
{
"src": "/images/favicon/android-icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"density": "1.5"
},
{
"src": "/images/favicon/android-icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"density": "2.0"
},
{
"src": "/images/favicon/android-icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"density": "3.0"
},
{
"src": "/images/favicon/android-icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"density": "4.0"
}
]
}
Loading

0 comments on commit 55da4fd

Please sign in to comment.