Skip to content

Commit 02c1fb3

Browse files
Merge pull request #15 from New1Direction/chore/website-eslint
chore(website): add ESLint (next/core-web-vitals + typescript)
2 parents 25a46cc + c6529b8 commit 02c1fb3

4 files changed

Lines changed: 5077 additions & 641 deletions

File tree

website/components/home/HeroMascot.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export function HeroMascot() {
3535
<div className="hero-mascot">
3636
<div className="hero-mascot-stage">
3737
{reduced ? (
38+
// eslint-disable-next-line @next/next/no-img-element -- static export (output: export) with unoptimized images; next/image adds no value for this decorative poster
3839
<img src={`${BASE}/mascot-poster.jpg`} alt={ALT} width={230} height={270} />
3940
) : (
4041
<video

website/eslint.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { dirname } from 'path';
2+
import { fileURLToPath } from 'url';
3+
import { FlatCompat } from '@eslint/eslintrc';
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({ baseDirectory: __dirname });
9+
10+
const eslintConfig = [
11+
// next/core-web-vitals bundles the React, react-hooks, and jsx-a11y plugins;
12+
// next/typescript adds the typescript-eslint recommended rules.
13+
...compat.extends('next/core-web-vitals', 'next/typescript'),
14+
{
15+
// Generated / build output — never our code to lint.
16+
ignores: [
17+
'.next/**',
18+
'out/**',
19+
'.source/**',
20+
'node_modules/**',
21+
'next-env.d.ts',
22+
],
23+
},
24+
];
25+
26+
export default eslintConfig;

0 commit comments

Comments
 (0)