这是indexloc提供的服务,不要输入任何密码
Skip to content

Minor Fixes following introduction of ESLint on Super Linter #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ImgSrc-er (Google Chrome Extension)
![Chrome Web Store](https://img.shields.io/chrome-web-store/v/mmalpdcdmbloijpgoagaeallfnmioika) [![GitHub Super-Linter](https://github.com/ttsukagoshi/chrome-ext_ImgSrc-er/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/ttsukagoshi/chrome-ext_ImgSrc-er.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_ImgSrc-er/context:javascript)
![Chrome Web Store](https://img.shields.io/chrome-web-store/v/mmalpdcdmbloijpgoagaeallfnmioika) [![GitHub Super-Linter](https://github.com/ttsukagoshi/chrome-ext_ImgSrc-er/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) [![Total alerts](https://img.shields.io/lgtm/alerts/g/ttsukagoshi/chrome-ext_ImgSrc-er.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_ImgSrc-er/alerts/)
Google Chrome extension to convert selected image link URL into an HTML `<img>` 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 `<img src="https://example.com/image.jpg" alt="">` is save on the clipboard. You can in turn use this to edit your website or whereever you like.
Expand Down
2 changes: 2 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "__MSG_extName__",
"version": "1.0.1",
"version": "1.0.2",
"description": "__MSG_extDescription__",
"permissions": [
"contextMenus",
Expand Down