From 142ca7e6decb12f28c35c1ca72f132d79fc67e73 Mon Sep 17 00:00:00 2001 From: 123niel Date: Wed, 6 Feb 2019 23:25:14 +0100 Subject: [PATCH] prettier and tslint configs --- .prettierrc | 6 ++++++ package.json | 8 +++++++- tslint.json | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .prettierrc create mode 100644 tslint.json diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e4f321a --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": true, + "singleQuote": true, + "jsxSingleQuote": true, + "trailingComma": "es5" +} diff --git a/package.json b/package.json index 3281cc9..8af2e05 100644 --- a/package.json +++ b/package.json @@ -7,16 +7,22 @@ "@types/node": "10.12.21", "@types/react": "16.8.2", "@types/react-dom": "16.8.0", + "prettier": "^1.16.4", "react": "^16.8.1", "react-dom": "^16.8.1", "react-scripts": "2.1.3", + "tslint": "^5.12.1", + "tslint-config-prettier": "^1.18.0", + "tslint-config-standard": "^8.0.1", + "tslint-react": "^3.6.0", "typescript": "3.3.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "lint": "tslint 'src/**/*.{ts,tsx}'" }, "eslintConfig": { "extends": "react-app" diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..52a27ba --- /dev/null +++ b/tslint.json @@ -0,0 +1,18 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended", + "tslint-config-standard", + "tslint-react", + "tslint-config-prettier" + ], + "jsRules": {}, + "rules": { + "object-literal-sort-keys": false, + "member-ordering": false, + "jsx-no-lambda": false, + "jsx-boolean-value": false, + "member-access": false + }, + "rulesDirectory": [] +}