Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Part 1: Setup prettier #19

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier'
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
plugins: ['react-refresh', 'prettier'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'prettier/prettier': [
'warn',
{},
{
usePrettierrc: true,
}
]
},
}
9 changes: 9 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
arrowParens: 'always',
printWidth: 120,
semi: false,
tabWidth: 2,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'es5'
}
62 changes: 26 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
</p>
</div>



<!-- TABLE OF CONTENTS -->
<details>
<summary>Table of Contents</summary>
Expand All @@ -37,28 +35,23 @@
</ol>
</details>



<!-- ABOUT THE PROJECT -->

## About The Project

A web interface for performing administrative tasks related to Dapla teams. TODO: Put more info here.

<p align="right">(<a href="#readme-top">back to top</a>)</p>



### Built With

* [![Vite][Vite.js]][Vite-url]
* [![React][React.js]][React-url]

- [![Vite][Vite.js]][Vite-url]
- [![React][React.js]][React-url]

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- GETTING STARTED -->

## Getting Started

This is an example of how you may give instructions on setting up your project locally.
Expand All @@ -67,24 +60,25 @@ To get a local copy up and running follow these simple example steps.
### Prerequisites

This is an example of how to list things you need to use the software and how to install them.
* npm

- npm
```sh
npm install npm@latest -g
```
* Install nodemon (required to run the development server)
```
npm install -g nodemon
```
* If you want to test against local version of dapla-team-api-redux. [Click here for step by step guide to set it up](https://example.com)
* Create .env.local (note you must replace dummy names with real values)
If testing with local version of dapla-team-api-redux put this:
```sh
touch .env.local && printf 'VITE_DAPLA_TEAM_API_URL="http://localhost:8080"\nVITE_JWKS_URI="https://your-keycloak.domain.com/auth/realms/ssb/protocol/openid-connect/certs"\nVITE_SSB_BEARER_URL="https://your-http-bin.domain.com/bearer"' >> .env.local
```
If testing with dapla-team-api-redux in production, put this:
```sh
touch .env.local && printf 'VITE_DAPLA_TEAM_API_URL="http://your-running-application.domain.com"\nVITE_JWKS_URI="https://your-keycloak.domain.com/auth/realms/ssb/protocol/openid-connect/certs"\nVITE_SSB_BEARER_URL="https://your-http-bin.domain.com/bearer"' >> .env.local
```
- Install nodemon (required to run the development server)
```
npm install -g nodemon
```
- If you want to test against local version of dapla-team-api-redux. [Click here for step by step guide to set it up](https://example.com)
- Create .env.local (note you must replace dummy names with real values)
If testing with local version of dapla-team-api-redux put this:
```sh
touch .env.local && printf 'VITE_DAPLA_TEAM_API_URL="http://localhost:8080"\nVITE_JWKS_URI="https://your-keycloak.domain.com/auth/realms/ssb/protocol/openid-connect/certs"\nVITE_SSB_BEARER_URL="https://your-http-bin.domain.com/bearer"' >> .env.local
```
If testing with dapla-team-api-redux in production, put this:
```sh
touch .env.local && printf 'VITE_DAPLA_TEAM_API_URL="http://your-running-application.domain.com"\nVITE_JWKS_URI="https://your-keycloak.domain.com/auth/realms/ssb/protocol/openid-connect/certs"\nVITE_SSB_BEARER_URL="https://your-http-bin.domain.com/bearer"' >> .env.local
```

### Installation

Expand All @@ -93,9 +87,9 @@ This is an example of how to list things you need to use the software and how to
git clone https://github.com/statisticsnorway/dapla-ctrl.git
```
2. Navigate into the repository
```sh
cd dapla-ctrl
```
```sh
cd dapla-ctrl
```
3. Install NPM packages
```sh
npm install
Expand All @@ -107,8 +101,8 @@ This is an example of how to list things you need to use the software and how to

<p align="right">(<a href="#readme-top">back to top</a>)</p>


<!-- CONTRIBUTING -->

## Contributing

Any contributions you make are **greatly appreciated**.
Expand All @@ -124,21 +118,17 @@ Don't forget to give the project a star! Thanks again!

<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- LICENSE -->

## License

Distributed under the MIT License. See `LICENSE.txt` for more information.



<p align="right">(<a href="#readme-top">back to top</a>)</p>



<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge
[contributors-url]: https://github.com/github_username/repo_name/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge
Expand Down
Loading