Skip to content
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
21 changes: 0 additions & 21 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion __tests__/__snapshots__/bing.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/cartodb.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/google-street-view.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/google.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/here.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/mapbox.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/mapquest.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/yandex.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`renders homepage unchanged 1`] = `
<div>
Expand Down
2 changes: 1 addition & 1 deletion components/copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Copy({
try {
await navigator.clipboard.writeText(text);
setCopySuccess("Copied!");
} catch (err) {
} catch {
setCopySuccess("Failed to copy!");
}
};
Expand Down
62 changes: 62 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const js = require('@eslint/js');
const typescript = require('@typescript-eslint/eslint-plugin');
const typescriptParser = require('@typescript-eslint/parser');
const reactPerf = require('eslint-plugin-react-perf');

module.exports = [
js.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: typescriptParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: {
React: 'writable',
process: 'readonly',
console: 'readonly',
window: 'readonly',
document: 'readonly',
},
},
plugins: {
'@typescript-eslint': typescript,
'react-perf': reactPerf,
},
rules: {
...typescript.configs.recommended.rules,
...reactPerf.configs.recommended.rules,
'prefer-template': 'error',
'prefer-const': 'error',
'@typescript-eslint/no-unused-vars': 'error',

// Fix later
'react/no-unescaped-entities': 'off',
'react-perf/jsx-no-new-function-as-prop': 'off',

// Not compatible with static build
'@next/next/no-img-element': 'off',

// Disable some rules that conflict with TypeScript
'no-unused-vars': 'off',
'no-undef': 'off',
},
},
{
ignores: [
'.next/**',
'out/**',
'node_modules/**',
'.git/**',
'*.config.js',
'jest.config.js',
'next.config.js',
'next-sitemap.config.js',
],
},
];
1 change: 1 addition & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
Loading