Browse Source

remove tsconfig at root, it is not a ts project. add reusable tsconfig and prettier

Mokhtar Naamani 4 years ago
parent
commit
1926f633fe

+ 1 - 1
.editorconfig

@@ -10,5 +10,5 @@ insert_final_newline = true
 [*.yml]
 indent_style = space
 indent_size = 2
-tab_width = 8
+tab_width = 4
 end_of_line = lf

+ 3 - 0
.prettierrc.js

@@ -0,0 +1,3 @@
+module.exports = {
+    ...require('@joystream/prettier-config')
+}

+ 4 - 3
.prettierrc → devops/prettier-config/index.js

@@ -1,6 +1,7 @@
-{
+module.exports = {
   "singleQuote": true,
   "arrowParens": "avoid",
   "useTabs": false,
-  "tabWidth": 2
-}
+  "tabWidth": 2,
+  "semi": false
+};

+ 22 - 0
devops/prettier-config/package.json

@@ -0,0 +1,22 @@
+{
+  "name": "@joystream/prettier-config",
+  "version": "1.0.0",
+  "description": "joystream prettier shared config",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/joystream/joystream.git"
+  },
+  "author": "Joystream contributors",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/joystream/joystream/issues"
+  },
+  "homepage": "https://github.com/joystream/joystream#readme",
+  "peerDependencies": {
+    "prettier": ">= 2"
+  }
+}

+ 13 - 0
devops/tsconfig/index.json

@@ -0,0 +1,13 @@
+{
+  "compilerOptions": {
+    "declaration": true,
+    "importHelpers": true,
+    "module": "commonjs",
+    "strict": true,
+    "target": "esnext",
+    "esModuleInterop": true,
+    "types" : [ "node" ],
+    "resolveJsonModule": true,
+    "forceConsistentCasingInFileNames": true
+  }
+}

+ 22 - 0
devops/tsconfig/package.json

@@ -0,0 +1,22 @@
+{
+  "name": "@joystream/tsconfig",
+  "version": "1.0.0",
+  "description": "joystream shared tsconfig",
+  "main": "index.json",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/joystream/joystream.git"
+  },
+  "author": "Joystream contributors",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/joystream/joystream/issues"
+  },
+  "homepage": "https://github.com/joystream/joystream#readme",
+  "peerDependencies": {
+    "typescript": ">= 3.7.2"
+  }
+}

+ 3 - 1
package.json

@@ -15,7 +15,9 @@
 		"types",
 		"pioneer",
 		"pioneer/packages/*",
-		"devops/eslint-config"
+		"devops/eslint-config",
+		"devops/prettier-config",
+		"devops/tsconfig"
 	],
 	"resolutions": {
 		"@polkadot/api": "^0.96.1",

+ 0 - 1
tsconfig.json

@@ -1 +0,0 @@
-{}