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

Enable ESLint-recommended settings as component of Super Linter #8

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 8 commits into from
Dec 15, 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_HTML: true
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_JSON: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# openBD情報チェッカー(Google Chrome拡張機能)
![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jmbcpombnleepfponcjibgeohkfcocgg) [![GitHub Super-Linter](https://github.com/ttsukagoshi/chrome-ext_openBD-checker/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_openBD-checker.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_openBD-checker/context:javascript)
![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jmbcpombnleepfponcjibgeohkfcocgg) [![GitHub Super-Linter](https://github.com/ttsukagoshi/chrome-ext_openBD-checker/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_openBD-checker.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ttsukagoshi/chrome-ext_openBD-checker/alerts/)
ウェブブラウザ(Chrome)内で選択したISBNコードに基づいて、コンテクストメニュー(右クリックメニュー)から[openBD](https://openbd.jp/)に登録されている情報を参照できるようにする拡張機能。

## インストール
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 */

// Global variable(s)
const OPENBD_API_VERSION = 'v1'; // openBDのAPIバージョン。 https://openbd.jp/

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": "openBD情報チェッカー",
"version": "1.2.4",
"version": "1.2.5",
"description": "openBDに登録されている書誌・書影情報を、コンテクストメニューからISBNで検索・参照する。",
"permissions": [
"contextMenus",
Expand Down
2 changes: 2 additions & 0 deletions src/result.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 */

window.addEventListener('load', function () {
// openBD APIから取得した取得したデータをchrome.storageから読み込む
chrome.storage.local.get(['openBdUrl', 'openBdResponse'], function (result) {
Expand Down