From f8e9aa552f3272e33c9c2cc40d8e3a03822b18de Mon Sep 17 00:00:00 2001
From: ttsukagoshi <55706659+ttsukagoshi@users.noreply.github.com>
Date: Wed, 16 Dec 2020 22:23:10 +0900
Subject: [PATCH 1/4] Change LGTM badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2579fd2..0b84531 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# ImgSrc-er (Google Chrome Extension)
- [](https://github.com/marketplace/actions/super-linter) [](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_ImgSrc-er/context:javascript)
+ [](https://github.com/marketplace/actions/super-linter) [](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_ImgSrc-er/alerts/)
Google Chrome extension to convert selected image link URL into an HTML `
` tag with `src` attribute on the clipboard. Either an image, URL of an image, or link to an image can be selected.
For example when a text `https://example.com/image.jpg` is selected and this extension is executed via the context menu, the string `
` is save on the clipboard. You can in turn use this to edit your website or whereever you like.
From 98cb1fd3237da90953bbf50386cfa212b55a7c47 Mon Sep 17 00:00:00 2001
From: ttsukagoshi <55706659+ttsukagoshi@users.noreply.github.com>
Date: Wed, 16 Dec 2020 22:27:01 +0900
Subject: [PATCH 2/4] Enable ESLint on Super Linter
---
.github/linters/.eslintrc.yml | 63 +++++++++++++++++++++++++++++++++++
.github/workflows/linter.yml | 4 +--
.gitignore | 1 +
3 files changed, 66 insertions(+), 2 deletions(-)
create mode 100644 .github/linters/.eslintrc.yml
create mode 100644 .gitignore
diff --git a/.github/linters/.eslintrc.yml b/.github/linters/.eslintrc.yml
new file mode 100644
index 0000000..af837f9
--- /dev/null
+++ b/.github/linters/.eslintrc.yml
@@ -0,0 +1,63 @@
+---
+
+#############################
+#############################
+## JavaScript Linter rules ##
+#############################
+#############################
+
+############
+# Env Vars #
+############
+env:
+ browser: true
+ es6: true
+ jest: true
+
+###############
+# Global Vars #
+###############
+globals:
+ Atomics: readonly
+ SharedArrayBuffer: readonly
+ #######################################
+ # Google Apps Script-specific classes #
+ #######################################
+ # CalendarApp: readonly
+ # DocumentApp: readonly
+ # DriveApp: readonly
+ # FormApp: readonly
+ # GmailApp: readonly
+ # HtmlService: readonly
+ # MailApp: readonly
+ # PropertiesService: readonly
+ # ScriptApp: readonly
+ # Session: readonly
+ # SitesApp: readonly
+ # SlidesApp: readonly
+ # SpreadsheetApp: readonly
+ # UrlFetchApp: readonly
+ # Utilities: readonly
+
+###############
+# Parser vars #
+###############
+parser: '@typescript-eslint/parser'
+parserOptions:
+ ecmaVersion: 2018
+ sourceType: script
+
+###########
+# Plugins #
+###########
+extends:
+ - 'eslint:recommended'
+plugins:
+ - '@typescript-eslint'
+
+#########
+# Rules #
+#########
+rules:
+ no-useless-escape: warn
+ semi: error
\ No newline at end of file
diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml
index 5d6ae2c..c20b216 100644
--- a/.github/workflows/linter.yml
+++ b/.github/workflows/linter.yml
@@ -16,7 +16,7 @@ name: Lint Code Base
#############################
on:
push:
- branches-ignore: [main]
+ # branches-ignore: [main]
# Remove the line above to run when pushing to master
pull_request:
branches: [main]
@@ -50,7 +50,7 @@ jobs:
- name: Lint Code Base
uses: github/super-linter@v3
env:
- VALIDATE_ALL_CODEBASE: false
+ VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..496ee2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
\ No newline at end of file
From b39c8c7d06c3ee71e68b91241fc0f7924aff5377 Mon Sep 17 00:00:00 2001
From: ttsukagoshi <55706659+ttsukagoshi@users.noreply.github.com>
Date: Wed, 16 Dec 2020 22:34:43 +0900
Subject: [PATCH 3/4] Declare class 'chrome' as global
---
src/background.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/background.js b/src/background.js
index 42dfb64..b897157 100644
--- a/src/background.js
+++ b/src/background.js
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+/* global chrome */
+
chrome.runtime.onInstalled.addListener(function () {
chrome.contextMenus.create({
'id': 'ImgSrc-er',
From 42bba2ea7805bf9d74a39e4d709616b8508c7fcf Mon Sep 17 00:00:00 2001
From: ttsukagoshi <55706659+ttsukagoshi@users.noreply.github.com>
Date: Wed, 16 Dec 2020 22:36:16 +0900
Subject: [PATCH 4/4] Update version to v1.0.2
---
src/manifest.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/manifest.json b/src/manifest.json
index 1bf0449..59b4def 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,6 +1,6 @@
{
"name": "__MSG_extName__",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "__MSG_extDescription__",
"permissions": [
"contextMenus",