diff --git a/typescript/.prettierrc.js b/typescript/.prettierrc.js index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4abbdd671cbe21517760475d825aed62d31eb010 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 147a84e41483c88cc19b595c620785e4f84d894c..0dc718083ab60db5f142bf880ae55f798592bcf4 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 eb90192083444611cca05a7fe445d5c9d04835ba..d649704eae037e768eeb09c0ab1ff5921faaa7fd 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) => {};