Skip to content
Draft
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
4 changes: 2 additions & 2 deletions packages/template/base/tmpl/_gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ typings/
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache
# Optional oxlint cache
.oxlintcache

# Optional REPL history
.node_repl_history
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('ViteTypeScriptTemplate', () => {
it.each([
'package.json',
'tsconfig.json',
'.eslintrc.json',
'.oxlintrc.json',
'forge.env.d.ts',
'forge.config.ts',
'vite.main.config.ts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class ViteTypeScriptTemplate extends BaseTemplate {
// Copy tsconfig with a small set of presets
await this.copyTemplateFile(directory, 'tsconfig.json');

// Copy eslint config with recommended settings
await this.copyTemplateFile(directory, '.eslintrc.json');
// Copy oxlint config with recommended settings
await this.copyTemplateFile(directory, '.oxlintrc.json');

// Remove index.js and replace with main.ts
await fs.remove(filePath('index.js'));
Expand Down Expand Up @@ -80,7 +80,7 @@ class ViteTypeScriptTemplate extends BaseTemplate {
const packageJSON = await fs.readJson(packageJSONPath);
packageJSON.main = '.vite/build/main.js';
// Configure scripts for TS template
packageJSON.scripts.lint = 'eslint --ext .ts,.tsx .';
packageJSON.scripts.lint = 'oxlint && oxfmt --check .';
await fs.writeJson(packageJSONPath, packageJSON, {
spaces: 2,
});
Expand Down
22 changes: 0 additions & 22 deletions packages/template/vite-typescript/tmpl/.eslintrc.json

This file was deleted.

5 changes: 5 additions & 0 deletions packages/template/vite-typescript/tmpl/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-unused-vars": "warn"
}
}
7 changes: 2 additions & 5 deletions packages/template/vite-typescript/tmpl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
"devDependencies": {
"@electron-forge/plugin-vite": "ELECTRON_FORGE/VERSION",
"@types/electron-squirrel-startup": "^1.0.2",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.25.0",
"eslint-import-resolver-typescript": "^4.4.4",
"oxlint": "^1.0.0",
"oxfmt": "^0.1.0",
"typescript": "^5.9.2",
"vite": "^7.2.4"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('WebpackTypeScriptTemplate', () => {
describe('template files are copied to project', () => {
it.each([
'tsconfig.json',
'.eslintrc.json',
'.oxlintrc.json',
'forge.config.ts',
'webpack.main.config.ts',
'webpack.renderer.config.ts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class WebpackTypeScriptTemplate extends BaseTemplate {
// Copy tsconfig with a small set of presets
await this.copyTemplateFile(directory, 'tsconfig.json');

// Copy eslint config with recommended settings
await this.copyTemplateFile(directory, '.eslintrc.json');
// Copy oxlint config with recommended settings
await this.copyTemplateFile(directory, '.oxlintrc.json');

// Remove index.js and replace with index.ts
await fs.remove(filePath('index.js'));
Expand All @@ -71,7 +71,7 @@ class WebpackTypeScriptTemplate extends BaseTemplate {
const packageJSON = await fs.readJson(packageJSONPath);
packageJSON.main = '.webpack/main';
// Configure scripts for TS template
packageJSON.scripts.lint = 'eslint --ext .ts,.tsx .';
packageJSON.scripts.lint = 'oxlint && oxfmt --check .';
await fs.writeJson(packageJSONPath, packageJSON, {
spaces: 2,
});
Expand Down
22 changes: 0 additions & 22 deletions packages/template/webpack-typescript/tmpl/.eslintrc.json

This file was deleted.

5 changes: 5 additions & 0 deletions packages/template/webpack-typescript/tmpl/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-unused-vars": "warn"
}
}
2 changes: 1 addition & 1 deletion packages/template/webpack-typescript/tmpl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
// eslint-disable-next-line @typescript-eslint/no-require-imports
// oxlint-disable-next-line @typescript-eslint/no-require-imports
if (require('electron-squirrel-startup')) {
app.quit();
}
Expand Down
7 changes: 2 additions & 5 deletions packages/template/webpack-typescript/tmpl/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"devDependencies": {
"@electron-forge/plugin-webpack": "ELECTRON_FORGE/VERSION",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"oxlint": "^1.0.0",
"oxfmt": "^0.1.0",
"@vercel/webpack-asset-relocator-loader": "1.7.3",
"css-loader": "^6.0.0",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.25.0",
"eslint-import-resolver-typescript": "^4.4.4",
"fork-ts-checker-webpack-plugin": "^7.2.13",
"node-loader": "^2.0.0",
"style-loader": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type IForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';

// eslint-disable-next-line @typescript-eslint/no-require-imports
// oxlint-disable-next-line @typescript-eslint/no-require-imports
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

export const plugins = [
Expand Down
Loading