Skip to content

Commit 34c69f2

Browse files
committed
Add ESLint config and clean up ts-nocheck comments
Introduces a new ESLint configuration for the designer-demo example and removes unnecessary // @ts-nocheck comments from App.tsx and main.tsx. Also updates the lint script in awesome-components to indicate no lint config is present.
1 parent 2f3182a commit 34c69f2

4 files changed

Lines changed: 24 additions & 3 deletions

File tree

examples/awesome-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dev": "rollup -c -w",
2020
"prepublishOnly": "npm run build",
2121
"test": "echo 'No tests yet'",
22-
"lint": "eslint src --ext .ts,.tsx"
22+
"lint": "echo 'No lint config'"
2323
},
2424

2525
"peerDependencies": {
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs.flat.recommended,
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

examples/designer-demo/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import React, { useState } from 'react';
32
import { Designer } from '@object-ui/designer';
43
import type { SchemaNode } from '@object-ui/protocol';

examples/designer-demo/src/main.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import React from 'react'
32
import ReactDOM from 'react-dom/client'
43
import App from './App.tsx'

0 commit comments

Comments
 (0)