Skip to content

Commit b3ebda2

Browse files
authored
Merge pull request #6 from wwu-cs/chore/remove-react
Remove React
2 parents 03f637e + f6aaa98 commit b3ebda2

35 files changed

+2
-6195
lines changed

curl.txt

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

eslint.config.mjs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// eslint.config.js
22
import js from '@eslint/js';
33
import globals from 'globals';
4-
import react from 'eslint-plugin-react'; // For general React rules
5-
import reactHooks from 'eslint-plugin-react-hooks';
6-
import reactRefresh from 'eslint-plugin-react-refresh';
74
import tseslint from 'typescript-eslint';
85
import prettierConfig from 'eslint-config-prettier';
96
import { defineConfig } from 'eslint/config';
@@ -94,59 +91,4 @@ export default defineConfig([
9491
},
9592
},
9693

97-
// --- 4. Configuration for Webview UI (React/TypeScript) ---
98-
{
99-
files: ['webview-ui/src/**/*.{ts,tsx}'], // Only apply to your React webview files
100-
// Specific language options for the React part of the project
101-
languageOptions: {
102-
ecmaVersion: 2020, // Or 2021/2022 if your target environment supports it
103-
sourceType: 'module',
104-
// Define global variables for the browser environment
105-
globals: {
106-
...globals.browser,
107-
},
108-
// Specify the TypeScript parser for these files
109-
parser: tseslint.parser,
110-
// Configuration for the TypeScript parser, including JSX support
111-
parserOptions: {
112-
// project: ['./webview-ui/tsconfig.json'], // Path to your webview's tsconfig.json
113-
tsconfigRootDir: import.meta.dirname,
114-
ecmaFeatures: {
115-
jsx: true, // Enable JSX parsing
116-
},
117-
},
118-
},
119-
// Define plugins specific to the React environment
120-
plugins: {
121-
react, // General React rules
122-
'react-hooks': reactHooks, // Rules for React Hooks
123-
'react-refresh': reactRefresh, // Rules for React Fast Refresh
124-
},
125-
// Specific rules for your React/TypeScript files
126-
rules: {
127-
// General React rules (e.g., props validation, accessibility)
128-
...react.configs.recommended.rules,
129-
...react.configs['jsx-runtime'].rules, // Use this for React 17+ with new JSX transform
130-
131-
// React Hooks specific rules
132-
...reactHooks.configs.recommended.rules,
133-
134-
// React Refresh specific rule
135-
'react-refresh/only-export-components': [
136-
'warn',
137-
{ allowConstantExport: true },
138-
],
139-
140-
// Override or add other React/TypeScript specific rules
141-
'react/prop-types': 'off', // Often not needed with TypeScript
142-
'react/react-in-jsx-scope': 'off', // Not needed for React 17+ with new JSX transform
143-
'@typescript-eslint/explicit-function-return-type': 'off', // Often too verbose in React components
144-
'semi': 'off', // Let Prettier handle semicolons
145-
},
146-
settings: {
147-
react: {
148-
version: 'detect', // Automatically detect the React version
149-
},
150-
},
151-
},
15294
]);

package.json

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@
4949
"title": "Submitty",
5050
"icon": "media/duck.png"
5151
}
52-
],
53-
"panel": [
54-
{
55-
"id": "reactWebview",
56-
"title": "React Webview",
57-
"icon": "$(file-code)"
58-
}
5952
]
6053
},
6154
"views": {
@@ -79,9 +72,7 @@
7972
"lint:fix": "eslint --fix .",
8073
"format": "prettier --write .",
8174
"format:check": "prettier --check .",
82-
"test": "vscode-test",
83-
"build:webview-ui": "cd webview-ui && npm install && npm run build",
84-
"watch:webview-ui": "cd webview-ui && npm run dev"
75+
"test": "vscode-test"
8576
},
8677
"devDependencies": {
8778
"@eslint/js": "^9.39.1",
@@ -92,9 +83,6 @@
9283
"@vscode/test-electron": "^2.4.0",
9384
"eslint": "^9.39.1",
9485
"eslint-config-prettier": "^9.1.0",
95-
"eslint-plugin-react": "^7.37.5",
96-
"eslint-plugin-react-hooks": "^7.0.1",
97-
"eslint-plugin-react-refresh": "^0.4.24",
9886
"globals": "^16.5.0",
9987
"prettier": "^3.3.3",
10088
"rimraf": "^3.0.2",

src/extension.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import * as vscode from 'vscode';
22
import { SidebarProvider } from './sidebarProvider';
3-
import ReactWebview from './reactWebview';
4-
import { ExtensionContextUtil } from './util/extensionContextUtil';
53
import { ApiService } from './services/apiService';
64
import { TestingService } from './services/testingService';
75

8-
export function activate(context: vscode.ExtensionContext) {
9-
ExtensionContextUtil.getExtensionContext(context);
6+
export function activate(context: vscode.ExtensionContext): void {
107
const apiService = ApiService.getInstance(context, '');
118
const testingService = new TestingService(context, apiService);
129
const sidebarProvider = new SidebarProvider(context, testingService);
@@ -15,12 +12,6 @@ export function activate(context: vscode.ExtensionContext) {
1512
vscode.window.registerWebviewViewProvider('submittyWebview', sidebarProvider)
1613
);
1714

18-
// context.subscriptions.push(
19-
// vscode.window.registerWebviewViewProvider(
20-
// ReactWebview.viewType,
21-
// ReactWebview.getInstance(context.extensionUri),
22-
// )
23-
// );
2415
}
2516

2617
export function deactivate() { }

src/reactWebview.ts

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

src/util/extensionContextUtil.ts

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

src/util/getNonce.ts

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

src/util/getUri.ts

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

vsc-extension-quickstart.md

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

0 commit comments

Comments
 (0)