Parcourir la source

storage-node: change configuration

- update root package.json: add ‘eslint-plugin-prettier’
- change the lint command in the storage-node
- add new rule ‘no-console’ to the lint config
Shamil Gadelshin il y a 4 ans
Parent
commit
06bb12d400
4 fichiers modifiés avec 7 ajouts et 9 suppressions
  1. 2 1
      package.json
  2. 2 1
      storage-node/.eslintrc.js
  3. 2 1
      storage-node/package.json
  4. 1 6
      yarn.lock

+ 2 - 1
package.json

@@ -30,7 +30,8 @@
 		"typescript": "^3.7.2"
 	},
 	"devDependencies": {
-		"husky": "^4.2.5"
+		"husky": "^4.2.5",
+		"eslint-plugin-prettier": "^3.1.4"
 	},
 	"husky": {
 	  "hooks": {

+ 2 - 1
storage-node/.eslintrc.js

@@ -18,7 +18,8 @@ module.exports = {
 		// Disabling Rules because of monorepo environment:
 		// https://github.com/benmosher/eslint-plugin-import/issues/1174
 		"import/no-extraneous-dependencies": "off",
-		"import/no-nodejs-modules": "off" // nodejs project
+		"import/no-nodejs-modules": "off", // nodejs project
+		"no-console": "off" // we use console in the project
 	},
 	"overrides": [
 		{

+ 2 - 1
storage-node/package.json

@@ -32,9 +32,10 @@
   ],
   "scripts": {
     "test": "wsrun --serial test",
-    "lint": "wsrun --serial lint"
+    "lint": "eslint --ignore-path .gitignore ."
   },
   "devDependencies": {
+    "eslint": "^5.16.0",
     "eslint-config-esnext": "^4.1.0",
     "eslint-config-prettier": "^6.11.0",
     "eslint-plugin-babel": "^5.3.1",

+ 1 - 6
yarn.lock

@@ -22800,16 +22800,11 @@ typescript-formatter@^7.2.2:
     commandpost "^1.0.0"
     editorconfig "^0.15.0"
 
-typescript@3.7.2, typescript@3.7.x, typescript@^3.0.3, typescript@^3.6.4, typescript@^3.7.2:
+typescript@3.7.2, typescript@3.7.x, typescript@^3.0.3, typescript@^3.6.4, typescript@^3.7.2, typescript@^3.8.3:
   version "3.7.2"
   resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
   integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==
 
-typescript@^3.8.3:
-  version "3.9.6"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a"
-  integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==
-
 u2f-api@0.2.7:
   version "0.2.7"
   resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"