Skip to content

Commit

Permalink
style: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
coston committed Aug 9, 2024
1 parent ad0cfff commit e028595
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"rules": {
"prettier/prettier": "error"
},
"ignorePatterns": ["node_modules/", "lib/"]
"ignorePatterns": ["node_modules/", "lib/", ".next/", "out/"]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"lint": "eslint 'src/**/*.{js,ts,tsx}'",
"lint:fix": "eslint 'src/**/*.{js,ts,tsx}' --fix",
"lint": "eslint '**/*.{js,ts,tsx}'",
"lint:fix": "eslint '**/*.{js,ts,tsx}' --fix",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"preversion": "npm run test && npm run lint:fix && npm run clean && npm run build && npm run export",
"postpublish": "git push && git push --tag"
Expand Down
114 changes: 57 additions & 57 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import Head from 'next/head';
import { LiveProvider, LiveEditor, LiveError, LivePreview } from 'react-live';
import { Browser, Terminal } from 'react-window-ui';
import Obfuscate from '../src/obfuscate';
import React from "react";
import Head from "next/head";
import { LiveProvider, LiveEditor, LiveError, LivePreview } from "react-live";
import { Browser, Terminal } from "react-window-ui";
import Obfuscate from "../src/obfuscate";

const headerCode = `
<ul>
Expand Down Expand Up @@ -57,94 +57,94 @@ const headerCode = `

const theme /*: PrismTheme */ = {
plain: {
color: '#fc929e',
color: "#fc929e",
},
styles: [
{
types: ['comment', 'prolog', 'doctype', 'cdata', 'punctuation'],
types: ["comment", "prolog", "doctype", "cdata", "punctuation"],
style: {
color: '#fc929e',
color: "#fc929e",
},
},
{
types: ['namespace'],
types: ["namespace"],
style: {
opacity: 0.7,
},
},
{
types: ['tag', 'operator', 'number'],
types: ["tag", "operator", "number"],
style: {
color: '#fff',
color: "#fff",
},
},
{
types: ['property', 'function'],
types: ["property", "function"],
style: {
color: '#9a86fd',
color: "#9a86fd",
},
},
{
types: ['tag-id', 'selector', 'atrule-id'],
types: ["tag-id", "selector", "atrule-id"],
style: {
color: '#fff',
color: "#fff",
},
},
{
types: ['attr-name'],
types: ["attr-name"],
style: {
color: '#fff',
color: "#fff",
},
},
{
types: [
'boolean',
'string',
'entity',
'url',
'attr-value',
'keyword',
'control',
'directive',
'unit',
'statement',
'regex',
'at-rule',
'placeholder',
'variable',
"boolean",
"string",
"entity",
"url",
"attr-value",
"keyword",
"control",
"directive",
"unit",
"statement",
"regex",
"at-rule",
"placeholder",
"variable",
],
style: {
color: '#fc929e',
color: "#fc929e",
},
},
{
types: ['deleted'],
types: ["deleted"],
style: {
textDecorationLine: 'line-through',
textDecorationLine: "line-through",
},
},
{
types: ['inserted'],
types: ["inserted"],
style: {
textDecorationLine: 'underline',
textDecorationLine: "underline",
},
},
{
types: ['italic'],
types: ["italic"],
style: {
fontStyle: 'italic',
fontStyle: "italic",
},
},
{
types: ['important', 'bold'],
types: ["important", "bold"],
style: {
fontWeight: 'bold',
fontWeight: "bold",
},
},
{
types: ['important'],
types: ["important"],
style: {
color: '#6c6783',
color: "#6c6783",
},
},
],
Expand Down Expand Up @@ -216,17 +216,17 @@ function App() {
<div
style={{
fontFamily:
'-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif',
marginLeft: 'auto',
marginRight: 'auto',
maxWidth: '900px',
padding: '1em',
"-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif",
marginLeft: "auto",
marginRight: "auto",
maxWidth: "900px",
padding: "1em",
}}
>
<h1>react-obfuscate ☁️</h1>
<p>
<a
style={{ borderBottom: 'none', marginRight: '5px' }}
style={{ borderBottom: "none", marginRight: "5px" }}
target="_blank"
href="https://coveralls.io/github/coston/react-obfuscate?branch=master"
rel="noreferrer"
Expand All @@ -237,7 +237,7 @@ function App() {
/>
</a>
<a
style={{ borderBottom: 'none', marginRight: '5px' }}
style={{ borderBottom: "none", marginRight: "5px" }}
target="_blank"
href="https://travis-ci.org/coston/react-obfuscate"
rel="noreferrer"
Expand All @@ -248,7 +248,7 @@ function App() {
/>
</a>
<a
style={{ borderBottom: 'none', marginRight: '5px' }}
style={{ borderBottom: "none", marginRight: "5px" }}
target="_blank"
href="https://www.npmjs.com/package/react-obfuscate"
rel="noreferrer"
Expand All @@ -259,7 +259,7 @@ function App() {
/>
</a>
<a
style={{ borderBottom: 'none', marginRight: '5px' }}
style={{ borderBottom: "none", marginRight: "5px" }}
target="_blank"
href="https://www.npmjs.com/package/react-obfuscate"
rel="noreferrer"
Expand All @@ -278,9 +278,9 @@ function App() {
>
<div
style={{
height: 'auto',
minWidth: '100%',
marginBottom: '2em',
height: "auto",
minWidth: "100%",
marginBottom: "2em",
}}
>
<div>
Expand All @@ -300,8 +300,8 @@ function App() {
aria-describedby="Live Code Editor"
theme={theme}
style={{
background: 'black',
overflow: 'scroll',
background: "black",
overflow: "scroll",
}}
/>
<LiveError />
Expand All @@ -311,7 +311,7 @@ function App() {
<h2 id="howitworks">How It Works</h2>

<p>
Pass the contact link as an <code>email</code>, <code>tel</code>,{' '}
Pass the contact link as an <code>email</code>, <code>tel</code>,{" "}
<code>sms</code>, <code>facetime</code>, or <code>href</code> prop.
The component obfuscates href data until an onClick event. Links are
given their proper URL schemes (mailto, facetime, etc.) The link is
Expand Down
Loading

0 comments on commit e028595

Please sign in to comment.