add tslint & prettier

This commit is contained in:
Halit Aksoy 2022-05-01 15:23:02 +03:00
parent f3c5aa074e
commit 546f6fa31b
4 changed files with 29 additions and 3 deletions

2
.eslintignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
dist

12
.eslintrc Normal file
View File

@ -0,0 +1,12 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}

6
.prettierrc Normal file
View File

@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 80
}

View File

@ -5,11 +5,17 @@
"main": "index.js",
"scripts": {
"dev": "yarn tsc -w",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint . --ext .ts",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
},
"author": "",
"license": "ISC",
"devDependencies": {
"typescript": "^4.6.3"
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"eslint": "^8.14.0",
"typescript": "^4.6.3",
"prettier": "^2.6.2"
}
}