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
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.
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',
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",