From fbe00361accdcb2b9992d786f195948c93728700 Mon Sep 17 00:00:00 2001
From: Thibaut de Saivre <thibaut.de-saivre@polytechnique.edu>
Date: Mon, 16 Oct 2023 15:36:52 +0200
Subject: [PATCH] add prettier config

---
 typescript/.prettierrc.js | 11 +++++++++++
 typescript/src/index.ts   |  4 ++--
 typescript/src/lib.ts     |  3 +++
 3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/typescript/.prettierrc.js b/typescript/.prettierrc.js
index e69de29..4abbdd6 100644
--- a/typescript/.prettierrc.js
+++ b/typescript/.prettierrc.js
@@ -0,0 +1,11 @@
+// Use CommonJS to enable extending this config, and using comments
+module.exports = {
+  singleQuote: true, // Prefer ' to "
+  semi: true, // Always terminate lines with semicolons
+  tabWidth: 2, // Use 2 spaces for indentation
+  quoteProps: 'consistent',
+  bracketSpacing: true, // {*bracketSpacing*}
+  arrowParens: 'always', // (always perentheses around arrow args) => {}
+  printWidth: 100, // Max 100 characters per line
+  trailingComma: 'es5', // Use trailing commas where valid in ES5 (objects, arrays, etc.)
+};
diff --git a/typescript/src/index.ts b/typescript/src/index.ts
index 147a84e..0dc7180 100644
--- a/typescript/src/index.ts
+++ b/typescript/src/index.ts
@@ -1,3 +1,3 @@
-import { func } from "./lib";
+import { func } from './lib';
 
-func("This is a message");
+func('This is a message');
diff --git a/typescript/src/lib.ts b/typescript/src/lib.ts
index eb90192..d649704 100644
--- a/typescript/src/lib.ts
+++ b/typescript/src/lib.ts
@@ -2,3 +2,6 @@
 export const func = (message: string) => {
   console.log(message);
 };
+
+// TODO : normalement ici on aura des erreurs
+const test = (arg: any) => {};
-- 
GitLab