From bb55c305944c171b51438a5e7ae9d78ae7a60808 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Tue, 5 Oct 2021 14:49:46 +0300 Subject: [PATCH] web: move eslint-storj to separate repo For some reason our build process cannot handle relative path packages, it's easier to create a new repository than to figure out, why npm/docker etc. don't like it. Change-Id: I94b7cb9611f453246b596f97114fe5c54d9a4008 --- web/eslint-storj/index.js | 46 ------------------------------- web/eslint-storj/package.json | 5 ---- web/multinode/package-lock.json | 14 ++++++---- web/multinode/package.json | 2 +- web/satellite/package-lock.json | 13 +++++---- web/satellite/package.json | 2 +- web/storagenode/package-lock.json | 13 +++++---- web/storagenode/package.json | 2 +- 8 files changed, 27 insertions(+), 70 deletions(-) delete mode 100644 web/eslint-storj/index.js delete mode 100644 web/eslint-storj/package.json diff --git a/web/eslint-storj/index.js b/web/eslint-storj/index.js deleted file mode 100644 index 9604c4bf1..000000000 --- a/web/eslint-storj/index.js +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2021 Storj Labs, Inc. -// See LICENSE for copying information. - -module.exports = { - rules: { - "vue/require-annotation": { - meta: { - fixable: "code", - }, - create: function(context) { - return { - Decorator(node) { - let isComponent = false; - const expr = node.expression; - if(expr.name === "Component"){ - isComponent = true; - } else if (expr.callee && expr.callee.name === "Component"){ - isComponent = true; - } - if(!isComponent){ return; } - - const commentsBefore = context.getCommentsBefore(node); - const decoratorLine = node.loc.start.line; - let annotated = false; - commentsBefore.forEach(comment => { - if(comment.loc.start.line === decoratorLine - 1){ - if(comment.value.trim() === "@vue/component") { - annotated = true; - } - } - }) - if(!annotated){ - context.report({ - node: node, - message: '@Component requires // @vue/component', - fix: function(fixer) { - return fixer.insertTextBefore(node, "// @vue/component\n"); - } - }); - } - } - }; - } - } - } -}; \ No newline at end of file diff --git a/web/eslint-storj/package.json b/web/eslint-storj/package.json deleted file mode 100644 index 52f6dd5df..000000000 --- a/web/eslint-storj/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "eslint-plugin-storj", - "version": "1.0.0", - "main": "index.js" -} \ No newline at end of file diff --git a/web/multinode/package-lock.json b/web/multinode/package-lock.json index e8da1a7c9..14bca1272 100644 --- a/web/multinode/package-lock.json +++ b/web/multinode/package-lock.json @@ -5,7 +5,6 @@ "requires": true, "packages": { "": { - "name": "multinode", "version": "0.0.1", "dependencies": { "chart.js": "2.9.4", @@ -34,7 +33,7 @@ "compression-webpack-plugin": "6.0.0", "core-js": "3.6.5", "eslint": "6.7.2", - "eslint-plugin-storj": "file:../eslint-storj", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", "jest-fetch-mock": "3.0.0", "sass": "1.37.0", @@ -54,7 +53,7 @@ "../eslint-storj": { "name": "eslint-plugin-storj", "version": "1.0.0", - "dev": true + "extraneous": true }, "node_modules/@babel/code-frame": { "version": "7.14.5", @@ -10730,8 +10729,9 @@ } }, "node_modules/eslint-plugin-storj": { - "resolved": "../eslint-storj", - "link": true + "version": "0.0.2", + "resolved": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true }, "node_modules/eslint-plugin-vue": { "version": "7.16.0", @@ -36229,7 +36229,9 @@ } }, "eslint-plugin-storj": { - "version": "file:../eslint-storj" + "version": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true, + "from": "eslint-plugin-storj@https://github.com/storj/eslint-storj" }, "eslint-plugin-vue": { "version": "7.16.0", diff --git a/web/multinode/package.json b/web/multinode/package.json index 891c1702d..59537f7a0 100644 --- a/web/multinode/package.json +++ b/web/multinode/package.json @@ -37,8 +37,8 @@ "compression-webpack-plugin": "6.0.0", "core-js": "3.6.5", "eslint": "6.7.2", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", - "eslint-plugin-storj": "file:../eslint-storj", "jest-fetch-mock": "3.0.0", "sass": "1.37.0", "sass-loader": "8.0.0", diff --git a/web/satellite/package-lock.json b/web/satellite/package-lock.json index f6aeed284..022e14899 100644 --- a/web/satellite/package-lock.json +++ b/web/satellite/package-lock.json @@ -52,7 +52,7 @@ "babel-eslint": "10.1.0", "compression-webpack-plugin": "6.0.0", "eslint": "6.7.2", - "eslint-plugin-storj": "file:../eslint-storj", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", "jest-fetch-mock": "3.0.3", "sass": "1.37.0", @@ -72,7 +72,7 @@ "../eslint-storj": { "name": "eslint-plugin-storj", "version": "1.0.0", - "dev": true + "extraneous": true }, "node_modules/@babel/code-frame": { "version": "7.14.5", @@ -11809,8 +11809,9 @@ } }, "node_modules/eslint-plugin-storj": { - "resolved": "../eslint-storj", - "link": true + "version": "0.0.2", + "resolved": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true }, "node_modules/eslint-plugin-vue": { "version": "7.16.0", @@ -39533,7 +39534,9 @@ } }, "eslint-plugin-storj": { - "version": "file:../eslint-storj" + "version": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true, + "from": "eslint-plugin-storj@https://github.com/storj/eslint-storj" }, "eslint-plugin-vue": { "version": "7.16.0", diff --git a/web/satellite/package.json b/web/satellite/package.json index dbf243324..90c93cad3 100644 --- a/web/satellite/package.json +++ b/web/satellite/package.json @@ -56,8 +56,8 @@ "babel-eslint": "10.1.0", "compression-webpack-plugin": "6.0.0", "eslint": "6.7.2", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", - "eslint-plugin-storj": "file:../eslint-storj", "jest-fetch-mock": "3.0.3", "sass": "1.37.0", "sass-loader": "10.0.2", diff --git a/web/storagenode/package-lock.json b/web/storagenode/package-lock.json index e06b0f063..8488f2e7a 100644 --- a/web/storagenode/package-lock.json +++ b/web/storagenode/package-lock.json @@ -35,7 +35,7 @@ "compression-webpack-plugin": "6.0.0", "core-js": "3.6.5", "eslint": "6.7.2", - "eslint-plugin-storj": "file:../eslint-storj", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", "jest-fetch-mock": "3.0.0", "sass": "1.37.0", @@ -55,7 +55,7 @@ "../eslint-storj": { "name": "eslint-plugin-storj", "version": "1.0.0", - "dev": true + "extraneous": true }, "node_modules/@babel/code-frame": { "version": "7.14.5", @@ -10737,8 +10737,9 @@ } }, "node_modules/eslint-plugin-storj": { - "resolved": "../eslint-storj", - "link": true + "version": "0.0.2", + "resolved": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true }, "node_modules/eslint-plugin-vue": { "version": "7.16.0", @@ -36242,7 +36243,9 @@ } }, "eslint-plugin-storj": { - "version": "file:../eslint-storj" + "version": "git+https://git@github.com/storj/eslint-storj.git#5f952ffab7141e752cc095e5f024c39bab89679f", + "dev": true, + "from": "eslint-plugin-storj@https://github.com/storj/eslint-storj" }, "eslint-plugin-vue": { "version": "7.16.0", diff --git a/web/storagenode/package.json b/web/storagenode/package.json index 7ce26a40a..2a0071b85 100644 --- a/web/storagenode/package.json +++ b/web/storagenode/package.json @@ -38,8 +38,8 @@ "compression-webpack-plugin": "6.0.0", "core-js": "3.6.5", "eslint": "6.7.2", + "eslint-plugin-storj": "github:storj/eslint-storj", "eslint-plugin-vue": "7.16.0", - "eslint-plugin-storj": "file:../eslint-storj", "jest-fetch-mock": "3.0.0", "sass": "1.37.0", "sass-loader": "8.0.0",