Skip to content

Commit

Permalink
chore: update Prettier configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasPais committed Sep 1, 2024
1 parent 117ba56 commit f06cf65
Show file tree
Hide file tree
Showing 31 changed files with 425 additions and 397 deletions.
16 changes: 8 additions & 8 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier'
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte']
extraFileExtensions: ['.svelte'],
},
env: {
browser: true,
es2017: true,
node: true
node: true,
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
]
};
parser: '@typescript-eslint/parser',
},
},
],
}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore markdown files
*.md
20 changes: 12 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"useTabs": false,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-css-order"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }],
"proseWrap": "always",
"tabWidth": 2
"useTabs": true,
"singleQuote": true,
"trailingComma": "all",
"semi": false,
"tabWidth": 2,
"printWidth": 80,
"htmlWhitespaceSensitivity": "css",
"bracketSameLine": false,
"proseWrap": "always",
"endOfLine": "crlf",
"plugins": ["prettier-plugin-svelte", "prettier-plugin-css-order"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
50 changes: 25 additions & 25 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-french",
"vunguyentuan.vscode-css-variables",
"usernamehw.errorlens",
"ms-vscode.live-server",
"yzhang.markdown-all-in-one",
"svelte.svelte-vscode",
"miguelsolorio.symbols",
"YoavBls.pretty-ts-errors",
"pmndrs.pmndrs",
"pushqrdx.inline-html",
"mikestead.dotenv",
"inu1255.easy-snippet",
"bbugh.change-color-format",
"inlang.vs-code-extension"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-french",
"vunguyentuan.vscode-css-variables",
"usernamehw.errorlens",
"ms-vscode.live-server",
"yzhang.markdown-all-in-one",
"svelte.svelte-vscode",
"miguelsolorio.symbols",
"YoavBls.pretty-ts-errors",
"pmndrs.pmndrs",
"pushqrdx.inline-html",
"mikestead.dotenv",
"inu1255.easy-snippet",
"bbugh.change-color-format",
"inlang.vs-code-extension"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
47 changes: 31 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,55 @@

### ⚙️ Requirements

First, you need to install the requirements. You need to install the latest Node.js version and npm
to run the website. You can download both [here](https://nodejs.org/en/download/package-manager).
First, you need to install the requirements. You need to install the latest
Node.js version and npm to run the website. You can download both
[here](https://nodejs.org/en/download/package-manager).

Then I recommend using [VSCode](https://code.visualstudio.com/). You can get autocompletion and
others improvements by installing **workspace recommended extensions**.
Then I recommend using [VSCode](https://code.visualstudio.com/). You can get
autocompletion and others improvements by installing **workspace recommended
extensions**.

### ⚒️ Run the project

Open your terminal in the folder of your choice and enter the following lines:

1. Clone or download the repository on your machine
1. Clone or download the repository on your machine

git clone <repository-link>

2. Once in the repository folder install all the dependencies
2. Once in the repository folder install all the dependencies

npm install

3. Run locally the website in your browser
3. Run locally the website in your browser

npm run dev -- --open

You should have the website opening in your default browser 👍.

> [!IMPORTANT]
> If you use **pnpm** (which I recommend), just replace `npm` with
> `pnpm`. For example: `pnpm install`.
### 📖 Useful resources

If you are new to Git and Github, I recommend watching this
[video](https://www.youtube.com/watch?v=RGOj5yH7evk).

To learn how to write markdown use this [guide](https://www.markdownguide.org/cheat-sheet/).
To learn how to write markdown use this
[guide](https://www.markdownguide.org/cheat-sheet/).

If you are new to web development, you need to learn HTML, CSS and Javascript. There is a lot of
resources but I recommend this [video](https://www.youtube.com/watch?v=zJSY8tbf_ys&t=71834s).
If you are new to web development, you need to learn HTML, CSS and Javascript.
There is a lot of resources but I recommend this
[video](https://www.youtube.com/watch?v=zJSY8tbf_ys&t=71834s).

## 🔧 Sveltekit Framework

SvelteKit is a very popular framework with a growing community. It is quite easy to understand and
very fast compared to **React**.
SvelteKit is a very popular framework with a growing community. It is quite easy
to understand and very fast compared to **React**.

If you are new to Sveltekit, you can refer to their documentation and their very well-made tutorial
[here](https://kit.svelte.dev/).
If you are new to Sveltekit, you can refer to their documentation and their very
well-made tutorial [here](https://kit.svelte.dev/).

## 📐 Commit Convention

Expand All @@ -62,9 +70,16 @@ The commits follow this convention:
| docs | Updates to documentation such as a the README or other markdown files |
| style | Changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semi-colons, and so on. |

> 💡 You can also add in parenthesis the scope of the commit just after the type.
> [!TIP]
> You can also add in parenthesis the scope of the commit just after the
> type.
I strongly recommend
[better-commits](https://github.com/Everduin94/better-commits), a CLI tool to
automate GitHub commits.

> ⚠️ The commit should be all lowercase with a succinct descriptions.
> [!WARNING]
> The commit should be all lowercase with a succinct descriptions.
### Exemples

Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<img src="static/images/tolosat-icon.png" width="30%" alt="TOLOSAT Icon">
</p>

Welcome to the official website of TOLOSAT. If you are interested in contributing, please refer to
our [contribution guidelines](/CONTRIBUTING.md).
Welcome to the official website of TOLOSAT. If you are interested in
contributing, please refer to our [contribution guidelines](/CONTRIBUTING.md).

## ⚙️ Requirements

You need to install the latest Node.js version and npm to run the website. You can download both
[here](https://nodejs.org/en/download/package-manager).
You need to install the latest Node.js version and npm to run the website. You
can download both [here](https://nodejs.org/en/download/package-manager).

> [!IMPORTANT]
> To get autocompletion and a nice code environment, I recommend using
> [VSCode](https://code.visualstudio.com/) and install **workspace recommended extensions** in the
> extension panel.
> To get autocompletion and a nice code environment, I recommend
> using [VSCode](https://code.visualstudio.com/) and install **workspace
> recommended extensions** in the extension panel.
## ⚡️ Quick Usage

Expand All @@ -28,8 +28,9 @@ To quickly run the website, you need to know the following commands:
| `npm run build` | Builds the project for production |

> [!TIP]
> I recommend using [pnpm](https://pnpm.io/installation) instead of **npm** to save disk
> space and boost installation speed. More information [here](https://pnpm.io/motivation).
> I recommend using [pnpm](https://pnpm.io/installation) instead of
> **npm** to save disk space and boost installation speed. More information
> [here](https://pnpm.io/motivation).
## ✨ Features

Expand Down
6 changes: 3 additions & 3 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"about": "About"
}
"$schema": "https://inlang.com/schema/inlang-message-format",
"about": "About"
}
6 changes: 3 additions & 3 deletions messages/fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"about": "À propos"
}
"$schema": "https://inlang.com/schema/inlang-message-format",
"about": "À propos"
}
78 changes: 39 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"name": "tolosat",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@iconify-json/tabler": "^1.1.121",
"@inlang/paraglide-js": "1.11.2",
"@inlang/paraglide-sveltekit": "^0.11.0",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.79.1",
"@sveltejs/adapter-auto": "^3.2.4",
"@sveltejs/kit": "^2.5.25",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@types/eslint": "^8.56.12",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"mode-watcher": "^0.3.1",
"prettier": "^3.3.3",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-svelte": "^3.2.6",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"tslib": "^2.7.0",
"typescript": "^5.5.4",
"unplugin-icons": "^0.19.2",
"vite": "^5.4.2"
},
"type": "module"
"name": "tolosat",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@iconify-json/tabler": "^1.1.121",
"@inlang/paraglide-js": "1.11.2",
"@inlang/paraglide-sveltekit": "^0.11.0",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.79.1",
"@sveltejs/adapter-static": "^3.0.4",
"@sveltejs/kit": "^2.5.25",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@types/eslint": "^8.56.12",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.43.0",
"mode-watcher": "^0.3.1",
"prettier": "^3.3.3",
"prettier-plugin-css-order": "^2.1.2",
"prettier-plugin-svelte": "^3.2.6",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"tslib": "^2.7.0",
"typescript": "^5.5.4",
"unplugin-icons": "^0.19.2",
"vite": "^5.4.2"
},
"type": "module"
}
31 changes: 14 additions & 17 deletions project.inlang/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": [
"en",
"fr"
],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{languageTag}.json"
}
}
"$schema": "https://inlang.com/schema/project-settings",
"sourceLanguageTag": "en",
"languageTags": ["en", "fr"],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-empty-pattern@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-missing-translation@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/message-lint-rule-without-source@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@latest/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@latest/dist/index.js"
],
"plugin.inlang.messageFormat": {
"pathPattern": "./messages/{languageTag}.json"
}
}
4 changes: 2 additions & 2 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

html,
body {
height: 100%;
height: 100%;
}

body {
margin: 0;
margin: 0;
}
Loading

0 comments on commit f06cf65

Please sign in to comment.