Skip to content

Commit 6b88458

Browse files
committed
fix for eslint
1 parent d46b41e commit 6b88458

11 files changed

Lines changed: 1131 additions & 35 deletions

.eslintrc.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Notify.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Notify {
1313
* @returns this
1414
*/
1515
error(message, options) {
16-
// eslint-disable-next-line
1716
return this.message({ level: 'error', message, ...options });
1817
}
1918

@@ -25,7 +24,6 @@ class Notify {
2524
* @returns this
2625
*/
2726
success(message, options) {
28-
// eslint-disable-next-line
2927
return this.message({ level: 'success', message, ...options });
3028
}
3129

@@ -37,7 +35,6 @@ class Notify {
3735
* @returns this
3836
*/
3937
info(message, options) {
40-
// eslint-disable-next-line
4138
return this.message({ level: 'info', message, ...options });
4239
}
4340

background.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* eslint-disable no-console */
2-
/* global chrome */
1+
/* global chrome URL */
32

43
const idealTokenTTL = '24h';
54
const tokenCheckAlarm = 'tokenCheck';

chooseMatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-console */
21
/* global chrome */
32

43
window.addEventListener('message', (event) => {
@@ -22,6 +21,7 @@ document.addEventListener('DOMContentLoaded', () => {
2221
function populateMatches(matches) {
2322
const matchesListEl = document.getElementById('matchesList');
2423
if (!matchesListEl) {
24+
// eslint-disable-next-line quotes
2525
console.error("Element with ID 'matchesList' not found.");
2626
return;
2727
}

common.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/* eslint-disable no-console */
21
/* eslint-disable no-unused-vars */
3-
/* global browser chrome */
2+
/* global chrome */
43

54
function storePathComponents(storePath) {
65
let path = 'secret/vaultPass';

content.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
/* global browser */
31
/* global chrome */
42
// We can only access the TABs DOM with this script.
53
// It will get the credentials via message passing from the popup

eslint.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import js from '@eslint/js';
2+
3+
export default [
4+
js.configs.recommended,
5+
{
6+
languageOptions: {
7+
ecmaVersion: 2020,
8+
sourceType: 'module',
9+
globals: {
10+
browser: 'readonly',
11+
console: 'readonly',
12+
document: 'readonly',
13+
window: 'readonly',
14+
navigator: 'readonly',
15+
fetch: 'readonly',
16+
setTimeout: 'readonly',
17+
MutationObserver: 'readonly',
18+
HTMLFormElement: 'readonly',
19+
},
20+
},
21+
rules: {
22+
indent: [
23+
'error',
24+
2,
25+
{
26+
SwitchCase: 1,
27+
ignoredNodes: ['ConditionalExpression > ConditionalExpression'],
28+
},
29+
],
30+
'linebreak-style': ['error', 'unix'],
31+
quotes: ['error', 'single'],
32+
semi: ['error', 'always'],
33+
},
34+
},
35+
{
36+
ignores: ['browser-polyfill.min.js'],
37+
},
38+
];

options.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* eslint-disable no-console */
2-
/* global browser Notify storePathComponents */
1+
/* global Notify storePathComponents */
32

43
const notify = new Notify(document.querySelector('#notify'));
54
async function mainLoaded() {

0 commit comments

Comments
 (0)