Skip to content
Open
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
10 changes: 10 additions & 0 deletions .erb/configs/webpack.config.main.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ const configuration: webpack.Configuration = {
filename: '[name].js',
},

resolve: {
alias: {
// Ensure main app and core logger share the same electron-log instance.
'electron-log': path.resolve(
webpackPaths.rootPath,
'node_modules/@internxt/drive-desktop-core/node_modules/electron-log',
),
},
},

optimization: {
chunkIds: 'deterministic',
minimizer: [
Expand Down
6 changes: 3 additions & 3 deletions .erb/scripts/delete-source-maps.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import path from 'path';
import rimraf from 'rimraf';
import { sync as rimrafSync } from 'rimraf';
import webpackPaths from '../configs/webpack.paths';

export default function deleteSourceMaps() {
rimraf.sync(path.join(webpackPaths.distMainPath, '*.js.map'));
rimraf.sync(path.join(webpackPaths.distRendererPath, '*.js.map'));
rimrafSync(path.join(webpackPaths.distMainPath, '*.js.map'));
rimrafSync(path.join(webpackPaths.distRendererPath, '*.js.map'));
}
42 changes: 0 additions & 42 deletions .eslintignore

This file was deleted.

50 changes: 0 additions & 50 deletions .eslintrc.js

This file was deleted.

117 changes: 117 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
const {
defineConfig,
globalIgnores,
} = require("eslint/config");

const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = defineConfig([{
extends: compat.extends("@internxt/eslint-config-internxt"),

rules: {
"no-await-in-loop": "warn",

"@typescript-eslint/no-use-before-define": ["warn", {
functions: false,
classes: true,
variables: true,
}],

"array-callback-return": "warn",

"max-len": ["warn", {
code: 120,
ignorePattern: "^it",
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],

"@typescript-eslint/ban-ts-comment": "warn",
"no-async-promise-executor": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
"object-shorthand": ["warn", "always"],
},

languageOptions: {
parser: tsParser,
},

settings: {
"import/resolver": {
node: {},

webpack: {
config: require.resolve("./.erb/configs/webpack.config.eslint.ts"),
},

typescript: {},
},

"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
}, globalIgnores(["src/infra/schemas.d.ts", "assets/assets.d.ts"]), {
files: ["**/*.ts", "**/*.tsx"],

languageOptions: {
parserOptions: {
project: ["./tsconfig.json"],
},

globals: {
...globals.jest,
},
},
}, globalIgnores([
"**/logs",
"**/*.log",
"**/pids",
"**/*.pid",
"**/*.seed",
"**/coverage",
"**/.eslintcache",
"**/node_modules",
"**/.DS_Store",
"**/dist",
"**/build",
"release/app/dist",
"release/build",
".erb/**",
"**/.idea",
"**/npm-debug.log.*",
"**/*.css.d.ts",
"**/*.sass.d.ts",
"**/*.scss.d.ts",
"src/workers/backups/process.ts",
"src/workers/backups/*",
"src/workers/filesystems/*",
"src/apps/renderer/localize/i18n.service.ts",
"src/test/*",
"tests/vitest/*",
// Root-level config and build scripts — not part of the application codebase
"beforeBuild.js",
"eslint.config.js",
"tailwind.config.js",
".prettierrc.js",
"vitest.config.main.ts",
"vitest.config.renderer.ts",
"vitest.setup.main.ts",
"vitest.setup.renderer.ts",
"scripts/**",
])]);
Loading
Loading