Skip to content

Commit

Permalink
fix one spelling error, enable spellcheck in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Nov 21, 2024
1 parent c06d4e7 commit c4fe02a
Show file tree
Hide file tree
Showing 18 changed files with 751 additions and 27 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:

- name: Lint
run: yarn lint

- name: Spellcheck
run: yarn spellcheck
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ See the [package.json](./package.json) -> `scripts` section for more useful comm

- Merging a PR into `main` automatically triggers a new deployment accessible on [demo.fingerprint.com](https://demo.fingerprint.com).
- The app is deployed as a Digital Ocean App.
- The app is deployed behind a Cloudfront distribution in the Fingerprint DEV AWS environment (search for `demo.fingerprint.com` in the distribution description).
- If you ever encounter caching issues, for example, a cached index.html pointing to no longer existing resources, you can fix it by [creating a cache invalidation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation_Requests.html#invalidating-objects-console) (`/*` is fine) in the Cloudfront distribution.
- The app is deployed behind a CloudFront distribution in the Fingerprint DEV AWS environment (search for `demo.fingerprint.com` in the distribution description).
- If you ever encounter caching issues, for example, a cached index.html pointing to no longer existing resources, you can fix it by [creating a cache invalidation](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation_Requests.html#invalidating-objects-console) (`/*` is fine) in the CloudFront distribution.

### Rollbacks and incident response

Expand Down
36 changes: 36 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "0.2",
"words": [
"AIRMAX",
"ALLSTAR",
"botd",
"chargeback",
"chargebacks",
"fingerprinthub",
"fingerprintjs",
"fpjs",
"Frida",
"Headout",
"inkeep",
"Jailbroken",
"Jumia",
"Korsit",
"mapbox",
"notistack",
"omnichannel",
"pastable",
"subheadline",
"unshredded",
"usequerystate",
"Webstore",
"ruleset",
"rulesets",
"srcset",
"urlset",
"Juro",
"Uhlar"
],
"flagWords": ["Cloudfront"],
"files": ["**/*.md", "src/**/*.ts", "src/**/*.tsx"],
"ignorePaths": ["node_modules", "dist", "src/env.ts"]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"prettier": "prettier src --check",
"prettier:fix": "yarn prettier --write",
"format": "yarn prettier:fix && yarn lint:fix",
"spellcheck": "cspell --config cspell.json",
"test": "vitest",
"test:start": "yarn build && yarn start",
"test:e2e": "playwright test",
Expand Down Expand Up @@ -69,6 +70,7 @@
"@types/react": "^18.2.61",
"@types/react-syntax-highlighter": "^15.5.11",
"@vitejs/plugin-react": "^4.2.1",
"cspell": "^8.16.0",
"dotenv": "^16.4.5",
"eslint-config-next": "^14.1.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app/coupon-fraud/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { CouponFraudUseCase } from './CouponFraud';

export const metadata = generateUseCaseMetadata(USE_CASES.couponFraud);

export default function CoupounFraudPage() {
export default function CouponFraudPage() {
return <CouponFraudUseCase />;
}
1 change: 1 addition & 0 deletions src/app/credential-stuffing/api/authenticate/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const mockedUser = {
};

function getKnownVisitorIds() {
// cspell:disable-next-line
const defaultVisitorIds = ['bXbwuhCBRB9lLTK692vw', 'ABvLgKyH3fAr6uAjn0vq', 'BNvLgKyHefAr9iOjn0ul'];
const visitorIdsFromEnv = env.KNOWN_VISITOR_IDS?.split(',');
console.info(`Extracted ${visitorIdsFromEnv?.length ?? 0} visitorIds from env.`);
Expand Down
14 changes: 8 additions & 6 deletions src/app/paywall/api/articles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ export const ARTICLES: ArticleData[] = [
date: '1 hour ago',
title: 'How to defend your site from common cyber attacks',
description:
"Websites are an integral part of our lives, but that also makes them a prime target for cyberattacks — malicious attempts to exploit vulnerabilities in your website's security to steal sensitive information.",
"Websites are an integral part of our lives, but that also makes them a prime target for cyber attacks — malicious attempts to exploit vulnerabilities in your website's security to steal sensitive information.",
content: [
"Websites are an integral part of our lives, but that also makes them a prime target for cyberattacks — malicious attempts to exploit vulnerabilities in your website's security to steal sensitive information, disrupt services, or cause other types of damage.",
'Depending on the nature of your website and services, successful cyberattacks can have severe consequences such as financial loss, reputational damage, and legal liabilities.',
"According to cybersecurity statistics compiled by Zippia, the cost of cybercrime is increasing significantly and is expected to grow by as much as 15% over the next five years. It's estimated that by 2025, cybercrime will cost the world roughly $10.5 trillion every year. Zippia estimates that 30,000 websites are hacked each day globally, with one happening every 39 seconds.",
'The good news is that 95% of cyberattacks are due to human error, which means that something can be done to prevent them. To help track and prevent common cyberattacks, the Open Web Application Security Project (OWASP), a nonprofit organization, maintains a list of the most prevalent security risks affecting websites, including injection attacks, security misconfigurations, and broken authentication. The project is a community-driven initiative that aims to improve the security of software and web applications.',
'By understanding these attacks and implementing appropriate security measures, you can better protect your websites from potential threats. In this article, you will learn about some of the common cyberattacks and how to implement defenses to ensure that your site is secure.',
"Websites are an integral part of our lives, but that also makes them a prime target for cyber attacks — malicious attempts to exploit vulnerabilities in your website's security to steal sensitive information, disrupt services, or cause other types of damage.",
'Depending on the nature of your website and services, successful cyber attacks can have severe consequences such as financial loss, reputation damage, and legal liabilities.',
/* cspell:disable-next-line */
"According to cybersecurity statistics compiled by Zippia, the cost of cyber crime is increasing significantly and is expected to grow by as much as 15% over the next five years. It's estimated that by 2025, cyber crime will cost the world roughly $10.5 trillion every year. Zippia estimates that 30,000 websites are hacked each day globally, with one happening every 39 seconds.",
'The good news is that 95% of cyber attacks are due to human error, which means that something can be done to prevent them. To help track and prevent common cyber attacks, the Open Web Application Security Project (OWASP), a nonprofit organization, maintains a list of the most prevalent security risks affecting websites, including injection attacks, security misconfigurations, and broken authentication. The project is a community-driven initiative that aims to improve the security of software and web applications.',
'By understanding these attacks and implementing appropriate security measures, you can better protect your websites from potential threats. In this article, you will learn about some of the common cyber attacks and how to implement defenses to ensure that your site is secure.',
],
image: ArticleHeroSvg,
// cspell:disable-next-line
author: { name: 'Daniel Olaogun', avatar: GenericAvatarImage },
tags: ['Fingerprinting', 'Fraud'],
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/personalization/api/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function seedProducts() {
ProductDbModel.create({
price: 9,
name: `Extra strong coffee`,
image: '/personalization/img/extrastrong.svg',
image: '/personalization/img/extraStrong.svg',
tags: ['Big'],
timestamp: new Date().getTime().toString(),
}),
Expand Down
2 changes: 1 addition & 1 deletion src/app/playground/components/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type MapProps = {
const MAPBOX_ACCESS_TOKEN = env.NEXT_PUBLIC_MAPBOX_API_TOKEN;

export const Map: FunctionComponent<MapProps> = (props) => {
const defaultZoom = 9; // Shows you rougly inside a specific city
const defaultZoom = 9; // Shows you roughly inside a specific city
return (
<MapContainer
center={props.position}
Expand Down
2 changes: 1 addition & 1 deletion src/app/vpn-detection/VpnDetectionUseCase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const VpnDetectionUseCase: FunctionComponent = () => {
<Alert severity={activateResponse.severity}>{activateResponse.message}</Alert>
</div>
)}
<div className={styles.regionaPricingContainer}>
<div className={styles.regionalPricingContainer}>
<Button
disabled={isLoading}
size='medium'
Expand Down
2 changes: 1 addition & 1 deletion src/app/vpn-detection/data/build-ppp-table.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Source https://data.worldbank.org/indicator/NY.GDP.PCAP.PP.CD?end=2022
// Surprisingly I couldn't find any publically available industry-standard PPP data
// Surprisingly I couldn't find any publicly available industry-standard PPP data
// Obviously GDP is just an imperfect heuristic for purchasing power, but good enough for our purposes here
import gdpData from './gdp-capita-by-country.json';
import fs from 'fs';
Expand Down
2 changes: 1 addition & 1 deletion src/app/vpn-detection/vpnDetection.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ div.wrapper {
margin: 0px;
}

.regionaPricingContainer {
.regionalPricingContainer {
display: flex;
gap: rem(8px);
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FunctionComponent, PropsWithChildren } from 'react';
import SuccessIcon from './sucess.svg';
import SuccessIcon from './success.svg';
import ErrorIcon from './error.svg';
import WarningIcon from './warning.svg';
import InfoIcon from '../../img/InfoIconSvg.svg';
Expand Down
File renamed without changes
1 change: 1 addition & 0 deletions src/client/components/CodeSnippet/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function CollapsibleJsonViewer({ json, className, dataTestId }: JsonViewe
CopyComponent={({ onClick, className }) => (
<CopyButtonSvg onClick={onClick} className={classnames(className, styles.jsonViewerIcon)} />
)}
// cspell:disable-next-line
CopidComponent={({ className }) => (
<CheckMarkSvg className={classnames(className, styles.jsonViewerIcon)} />
)}
Expand Down
1 change: 1 addition & 0 deletions src/client/thirdParty/Inkeep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const useInkeepSettings = (): InkeepSharedSettings => {
name: 'Contact support',
url: 'https://fingerprint.com/support/',
icon: {
// cspell:disable-next-line
builtIn: 'IoChatbubblesOutline',
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/utils/locationUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('getLocationName test', () => {
getLocationName({
accuracyRadius: 100,
city: {
name: 'Guimarães',
name: 'Nova',
},
country: {
code: 'PT',
Expand Down
Loading

0 comments on commit c4fe02a

Please sign in to comment.