From 589e0884e5668ed74be320a08d4173a4826c5883 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Wed, 10 Mar 2021 13:37:21 +0700 Subject: [PATCH] Updated the script and add prettier --- .prettierrc | 7 +++++++ package.json | 8 +++++++- src/index.ts | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 .prettierrc diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..7121e0c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": true, + "trailingComma": "none", + "singleQuote": true, + "printWidth": 120, + "tabWidth": 4 +} \ No newline at end of file diff --git a/package.json b/package.json index 8069b86..e62b337 100644 --- a/package.json +++ b/package.json @@ -6,5 +6,11 @@ "repository": "https://github.com/CUBETIQ/cubetiq-ts-utils.git", "author": "Sambo Chea", "license": "MIT", - "private": false + "private": false, + "devDependencies": { + "prettier": "^2.2.1" + }, + "scripts": { + "lint": "prettier --config .prettierrc 'src/**/*.ts' --write" + } } diff --git a/src/index.ts b/src/index.ts index 49f1107..f8cc5e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ const Index = (): void => { - console.log("Index", "Hello, you are init the default function!") -} + console.log('Index', 'Hello, you are init the default function!'); +}; -export default Index; \ No newline at end of file +export default Index;