Skip to content

Commit

Permalink
refactor: reformat all files with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpatiiuk committed Dec 16, 2023
1 parent a96066a commit d728fc5
Show file tree
Hide file tree
Showing 76 changed files with 486 additions and 447 deletions.
15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

title: ""
labels: "bug"
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,8 +24,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop:**
- OS: [e.g. Windows 10]
- Browser: [e.g. Chrome, Safari]

- OS: [e.g. Windows 10]
- Browser: [e.g. Chrome, Safari]

**Additional context**
Any other context about the problem.
Any other context about the problem.
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

title: ""
labels: "enhancement"
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1560,4 +1560,4 @@ All notable changes to this project will be documented in this file.
</td>
</tr>
</tbody>
</table>
</table>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ npm run unitTests:watch
```sh
cd src
npm run docs
```
```
2 changes: 1 addition & 1 deletion docs/privacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ Limited Use requirements.

If you have any questions or concerns about this Privacy Policy or our data
handling practices, please contact us at [[email protected]](mailto:[email protected]) or
open a [GitHub issue](https://github.com/maxpatiiuk/calendar-plus/issues/new)
open a [GitHub issue](https://github.com/maxpatiiuk/calendar-plus/issues/new)
8 changes: 4 additions & 4 deletions docs/spreadsheet-to-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const group = (entries) =>
.reduce(
(grouped, [key, value]) =>
grouped.set(key, [...(grouped.get(key) ?? []), value]),
new Map()
new Map(),
)
.entries()
.entries(),
);

const assignees = new Set(parsed.map((data) => data["Assignee"]));
Expand Down Expand Up @@ -64,7 +64,7 @@ const githubLink = (type) => (value) =>
.map((value) => value.slice(value.lastIndexOf("/") + 1))
.map(
(number) =>
`<a href="https://github.com/maxpatiiuk/calendar-plus/${type}/${number}">#${number}</a>`
`<a href="https://github.com/maxpatiiuk/calendar-plus/${type}/${number}">#${number}</a>`,
)
.join(" and ");

Expand Down Expand Up @@ -104,7 +104,7 @@ function formatItem(item) {
.filter(Boolean)
.join("<br>\n\t\t\t\t")}\n\t\t\t`
: value ?? ""
}</td>`
}</td>`,
)
.join("\n")}\n\t\t</tr>`;
}
Expand Down
79 changes: 55 additions & 24 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calendar Plus</title>
<link rel="icon" type="image/png" sizes="16x16" href="/src/public/images/extension_icon_16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/src/public/images/extension_icon_32x32.png">
<link rel="icon" type="image/png" sizes="48x48" href="/src/public/images/extension_icon_48x48.png">
<link rel="icon" type="image/png" sizes="128x128" href="/src/public/images/extension_icon_128x128.png">
<link rel="icon" type="image/png" sizes="1024x1024" href="/src/public/images/extension_icon_1024x1024.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.2.0/github-markdown.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
</head>
<body class="markdown-body" style="padding: 2rem; display: flex; justify-content: center;">
<div id="content" style="max-width: 1000px"></div>
<script>
fetch('./README.md')
.then(response => response.text())
.then(text => {
document.getElementById('content').innerHTML = marked.parse(text);
})
</script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Calendar Plus</title>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/src/public/images/extension_icon_16x16.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/src/public/images/extension_icon_32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="48x48"
href="/src/public/images/extension_icon_48x48.png"
/>
<link
rel="icon"
type="image/png"
sizes="128x128"
href="/src/public/images/extension_icon_128x128.png"
/>
<link
rel="icon"
type="image/png"
sizes="1024x1024"
href="/src/public/images/extension_icon_1024x1024.png"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.2.0/github-markdown.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
</head>
<body
class="markdown-body"
style="padding: 2rem; display: flex; justify-content: center"
>
<div id="content" style="max-width: 1000px"></div>
<script>
fetch("./README.md")
.then((response) => response.text())
.then((text) => {
document.getElementById("content").innerHTML = marked.parse(text);
});
</script>
</body>
</html>
25 changes: 9 additions & 16 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,26 @@
},
"web_accessible_resources": [
{
"resources": ["/src/public/images/[email protected]"],
"resources": [
"/src/public/images/[email protected]"
],
"matches": ["https://calendar.google.com/*"]
}
],
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuldA6s8qQKAdu33VanYX4yhBYnTbMwARskX7rcwvuIKgRPbY41X1mcIDUHKV7pC5sWQ2QuL0EN5U6M57dJhe+veTDDktpWNXeGJtwvPM6HFbwICgD93TkzwBl4Fs+67eFlsmpoHIdWeryyEfIUAgUwsb8DxvQ8OYhVKet1xkqJRRo112iLZ1bn/ZI8P39jT4cc9pMIXSvEKmtzyqNb9l/5WS8F6reqsRGIwZqmr/9fb7CEhyKPzEtXokcfaTygMwF6rJ6530cLUegofpJed4wZfFCCRtok63aqCwQgfypOKWlXCrExTdD6QKP4941dYQMuCg9+wp/GslGwTUd+odGQIDAQAB",
"current_locale": "en",
"permissions": [
"identity",
"storage"
],
"permissions": ["identity", "storage"],
"oauth2": {
"client_id": "626996674772-iegg1iono3q4g3u8e3ajcp37fbuauuh1.apps.googleusercontent.com",
"scopes":[
"https://www.googleapis.com/auth/calendar.readonly"
]
"scopes": ["https://www.googleapis.com/auth/calendar.readonly"]
},
"background": {
"service_worker":"./src/dist/background.bundle.js"
"service_worker": "./src/dist/background.bundle.js"
},
"content_scripts": [
{
"matches": [
"https://calendar.google.com/calendar/u/0/r/*"
],
"js": [
"./src/dist/main.bundle.js"
]
"matches": ["https://calendar.google.com/calendar/u/0/r/*"],
"js": ["./src/dist/main.bundle.js"]
}
],
"cross_origin_embedder_policy": {
Expand All @@ -51,4 +44,4 @@
"cross_origin_opener_policy": {
"value": "same-origin"
}
}
}
4 changes: 1 addition & 3 deletions src/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ module.exports = {
browser: true,
node: true,
},
extends: [
'@maxxxxxdlp/eslint-config-react',
],
extends: ['@maxxxxxdlp/eslint-config-react'],
rules: {
'@typescript-eslint/no-empty-interface': OFF,
},
Expand Down
1 change: 1 addition & 0 deletions src/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/
49 changes: 35 additions & 14 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Getting Started with Create React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
This project was bootstrapped with
[Create React App](https://github.com/facebook/create-react-app).

## Available Scripts

Expand All @@ -17,54 +18,74 @@ You may also see any lint errors in the console.
### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests)
for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
It correctly bundles React in production mode and optimizes the build for the best
performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
See the section about
[deployment](https://facebook.github.io/create-react-app/docs/deployment) for
more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
If you aren't satisfied with the build tool and configuration choices, you can
`eject` at any time. This command will remove the single build dependency from
your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
Instead, it will copy all the configuration files and the transitive
dependencies (webpack, Babel, ESLint, etc) right into your project so you have
full control over them. All of the commands except `eject` will still work, but
they will point to the copied scripts so you can tweak them. At this point
you're on your own.

You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You don't have to ever use `eject`. The curated feature set is suitable for
small and middle deployments, and you shouldn't feel obligated to use this
feature. However we understand that this tool wouldn't be useful if you couldn't
customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
You can learn more in the
[Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

### Code Splitting

This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)

### Analyzing the Bundle Size

This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)

### Making a Progressive Web App

This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)

### Advanced Configuration

This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)

### Deployment

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `npm run build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
This section has moved here:
[https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
15 changes: 6 additions & 9 deletions src/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
* Webpack uses Babel too, but that config is provided inside of webpack.config.js
*/

"use strict";
'use strict';

module.exports = {
env: {
test: {
presets: [
[
'@babel/preset-env',
{targets: {node: 'current'}},
],
['@babel/preset-env', { targets: { node: 'current' } }],
['@babel/preset-react'],
['@babel/preset-typescript'],
],
"plugins": ["@babel/plugin-transform-modules-commonjs"],
}
}
}
plugins: ['@babel/plugin-transform-modules-commonjs'],
},
},
};
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@
"test": "tests"
},
"prettier": "@maxxxxxdlp/prettier-config"
}
}
4 changes: 2 additions & 2 deletions src/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ is similar to how most modern React projects are structured.

### Utils

There is an `utils` folder that contains all the utility functions
that don't belong to any single component, but are used by many of them.
There is an `utils` folder that contains all the utility functions that don't
belong to any single component, but are used by many of them.

The files in the `utils` folder must not be React components or React hooks (for
the sake of consistency). React hooks that are used by several components should
Expand Down
Loading

0 comments on commit d728fc5

Please sign in to comment.