Skip to content

Commit f2f95aa

Browse files
committed
Replace Galex ESLint config
1 parent deed603 commit f2f95aa

File tree

365 files changed

+4120
-3156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+4120
-3156
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/lint-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,20 @@ jobs:
8484
uses: actions/cache@v4
8585
with:
8686
path: ~/.local
87-
key: poetry-0 # increment to reset cache
87+
key: poetry-1 # increment to reset cache
8888

8989
- name: Install Poetry 📜
9090
if: steps.poetry.outputs.cache-hit != 'true'
9191
uses: snok/install-poetry@v1
92+
with:
93+
version: 1.8.5
9294

9395
- name: Restore Poetry environments 📌
9496
id: poetry-venvs
9597
uses: actions/cache@v4
9698
with:
9799
path: ~/.cache/pypoetry/virtualenvs
98-
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-1 # increment to reset cache
100+
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-3 # increment to reset cache
99101

100102
- name: Create Poetry environments 📜
101103
if: steps.poetry-venvs.outputs.cache-hit != 'true'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ dist*/
1414
Thumbs.db
1515
*.log
1616
*.tsbuildinfo
17+
.eslintcache

apps/demo/.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

apps/demo/.eslintrc.cjs

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/demo/eslint.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { createConfig, detectOpts } from '../../eslint.config.base.js';
2+
3+
const opts = detectOpts(import.meta.dirname);
4+
5+
const config = [
6+
...createConfig(opts),
7+
{
8+
name: 'h5web/demo/ignores',
9+
ignores: ['dist/'],
10+
},
11+
];
12+
13+
export default config;

apps/demo/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"start": "vite",
99
"build": "vite build",
1010
"serve": "vite preview --port 5173",
11-
"lint:eslint": "eslint \"**/*.{js,cjs,ts,tsx}\" --max-warnings=0",
11+
"lint:eslint": "eslint --max-warnings=0",
1212
"lint:tsc": "tsc",
1313
"analyze": "pnpm dlx source-map-explorer dist/assets/*.js --no-border-checks"
1414
},
@@ -30,8 +30,7 @@
3030
"@types/react": "^18.3.3",
3131
"@types/react-dom": "^18.3.0",
3232
"@vitejs/plugin-react-swc": "3.7.0",
33-
"eslint": "8.57.0",
34-
"eslint-config-galex": "4.5.2",
33+
"eslint": "9.16.0",
3534
"typescript": "5.4.5",
3635
"vite": "5.3.5",
3736
"vite-css-modules": "1.4.2",

apps/demo/src/DemoApp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import HsdsApp from './HsdsApp';
77
import MockApp from './MockApp';
88

99
// Split H5Wasm demo into its own bundle, and load it only when the demo is first visited
10-
const H5WasmApp = lazy(() => import('./h5wasm/H5WasmApp'));
10+
const H5WasmApp = lazy(async () => import('./h5wasm/H5WasmApp'));
1111

1212
const query = new URLSearchParams(document.location.search);
13-
// @ts-expect-error
14-
window.H5WEB_EXPERIMENTAL = query.has('experimental');
13+
// @ts-expect-error - Untyped global flag
14+
globalThis.H5WEB_EXPERIMENTAL = query.has('experimental');
1515

1616
function DemoApp() {
1717
return (

apps/demo/src/h5wasm/DropZone.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import type { PropsWithChildren } from 'react';
2-
import { useCallback } from 'react';
1+
import { type PropsWithChildren, useCallback } from 'react';
32
import { useDropzone } from 'react-dropzone';
43

54
import styles from './DropZone.module.css';
6-
import type { RemoteFile } from './models';
5+
import { type RemoteFile } from './models';
76
import UrlForm from './UrlForm';
87

98
const EXT = ['.h5', '.hdf5', '.hdf', '.nx', '.nx5', '.nexus', '.nxs', '.cxi'];

0 commit comments

Comments
 (0)