fix: apply new prettier rules

This commit is contained in:
abhijithvijayan 2020-04-17 12:59:08 +05:30
parent b258224b46
commit 2d510b8f30
5 changed files with 72 additions and 60 deletions

View File

@ -30,7 +30,7 @@
"webextension-polyfill-ts": "^0.14.0" "webextension-polyfill-ts": "^0.14.0"
}, },
"devDependencies": { "devDependencies": {
"@abhijithvijayan/eslint-config": "0.14.1", "@abhijithvijayan/eslint-config": "^1.3.0",
"@abhijithvijayan/tsconfig": "^1.1.2", "@abhijithvijayan/tsconfig": "^1.1.2",
"@babel/core": "^7.9.0", "@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3",

View File

@ -1,4 +1,4 @@
import { browser } from 'webextension-polyfill-ts'; import {browser} from 'webextension-polyfill-ts';
browser.runtime.onInstalled.addListener((): void => { browser.runtime.onInstalled.addListener((): void => {
console.log('extension installed'); console.log('extension installed');

View File

@ -9,11 +9,19 @@ const Options: React.FC = () => {
<p> <p>
<label htmlFor="name">Name</label> <label htmlFor="name">Name</label>
<br /> <br />
<input type="text" id="name" name="name" spellCheck="false" autoComplete="off" required /> <input
type="text"
id="name"
name="name"
spellCheck="false"
autoComplete="off"
required
/>
</p> </p>
<p> <p>
<label htmlFor="logging"> <label htmlFor="logging">
<input type="checkbox" name="logging" /> Show the features enabled on each page in the console <input type="checkbox" name="logging" /> Show the features enabled
on each page in the console
</label> </label>
</p> </p>
</form> </form>

View File

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import { browser, Tabs } from 'webextension-polyfill-ts'; import {browser, Tabs} from 'webextension-polyfill-ts';
import './styles.scss'; import './styles.scss';
function openWebPage(url: string): Promise<Tabs.Tab> { function openWebPage(url: string): Promise<Tabs.Tab> {
return browser.tabs.create({ url }); return browser.tabs.create({url});
} }
const Popup: React.FC = () => { const Popup: React.FC = () => {
@ -26,7 +26,9 @@ const Popup: React.FC = () => {
<button <button
type="button" type="button"
onClick={(): Promise<Tabs.Tab> => { onClick={(): Promise<Tabs.Tab> => {
return openWebPage('https://github.com/abhijithvijayan/web-extension-starter'); return openWebPage(
'https://github.com/abhijithvijayan/web-extension-starter'
);
}} }}
> >
GitHub GitHub
@ -36,7 +38,9 @@ const Popup: React.FC = () => {
<button <button
type="button" type="button"
onClick={(): Promise<Tabs.Tab> => { onClick={(): Promise<Tabs.Tab> => {
return openWebPage('https://www.buymeacoffee.com/abhijithvijayan'); return openWebPage(
'https://www.buymeacoffee.com/abhijithvijayan'
);
}} }}
> >
Buy Me A Coffee Buy Me A Coffee

View File

@ -2,10 +2,10 @@
# yarn lockfile v1 # yarn lockfile v1
"@abhijithvijayan/eslint-config@0.14.1": "@abhijithvijayan/eslint-config@^1.3.0":
version "0.14.1" version "1.3.0"
resolved "https://registry.npmjs.org/@abhijithvijayan/eslint-config/-/eslint-config-0.14.1.tgz#ca6a0e0da188cb9d6be1be44a1e054f76be74c69" resolved "https://registry.yarnpkg.com/@abhijithvijayan/eslint-config/-/eslint-config-1.3.0.tgz#cfe741a97f04725fa931e918014dfabc33aefdb1"
integrity sha512-fx/n434sXdKAyKNxtdy91Wn8uqeyfd4fcIC8I1/xb7JTVlqB4uAdp2xVu5KG5hEFL+liauieT97wXNTTJBLTJg== integrity sha512-b823i+e8Tw9auspey0U+3fVziydJ3d0bxUfd+HJdSuuHV/48EO6erPEy3acusqwSQ9uGB3contePze9Yt/n+eA==
"@abhijithvijayan/tsconfig@^1.1.2": "@abhijithvijayan/tsconfig@^1.1.2":
version "1.1.2" version "1.1.2"