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
26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

33 changes: 33 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import globals from 'globals'
import js from '@eslint/js'
import react from 'eslint-plugin-react'
import tseslint from 'typescript-eslint'

export default [
{
languageOptions: {
ecmaVersion: 12,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true
},
},
globals: {
...globals.node,
...globals.browser,
},
},
},
js.configs.recommended,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
{
ignores: [
'wasm_exec.js',
'pcdeditor.esm.js',
'node_modules/**',
],
},
...tseslint.configs.recommended,
]
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"build": "make pcdeditor.esm.js ReactPCDEditor/index.js",
"fmt": "prettier --write pcdeditor.js pcdeditor.d.ts ReactPCDEditor/index.tsx",
"lint": "eslint pcdeditor.js pcdeditor.d.ts ReactPCDEditor/index.tsx",
"lint": "eslint",
"typecheck": "tsc --noEmit --allowJs --jsx react --esModuleInterop pcdeditor.js ReactPCDEditor/index.tsx",
"tsc": "tsc --declaration --jsx react --esModuleInterop ReactPCDEditor/index.tsx"
},
Expand All @@ -46,13 +46,15 @@
},
"homepage": "https://github.com/seqsense/pcdeditor#readme",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "7.18.0",
"@typescript-eslint/parser": "7.18.0",
"eslint": "8.57.1",
"@typescript-eslint/eslint-plugin": "8.15.0",
"@typescript-eslint/parser": "8.15.0",
"eslint": "9.14.0",
"eslint-plugin-react": "7.37.2",
"globals": "15.9.0",
"prettier": "3.3.3",
"react": "18.3.1",
"typescript": "5.6.3"
"typescript": "5.6.3",
"typescript-eslint": "8.3.0"
},
"packageManager": "pnpm@9.14.1"
}
5 changes: 2 additions & 3 deletions pcdeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ class PCDEditor {
.command(e.target.value)
.then((res) => {
let str = ''
// eslint-disable-next-line no-restricted-syntax
for (const vec of res) {
// eslint-disable-next-line no-restricted-syntax
for (const val of vec) {
str += `${val.toFixed(3)} `
}
Expand Down Expand Up @@ -311,7 +309,8 @@ class PCDEditor {
const retryRestore = setInterval(() => {
try {
glex.restoreContext()
} catch (error) {
} catch (e) {
this.logger(e)
return
}
clearInterval(retryRestore)
Expand Down
Loading