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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

10 changes: 0 additions & 10 deletions .eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'eslint-config-salesforce-typescript';
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.3.9",
"@playwright/test": "^1.49.0",
"@salesforce/cli-plugins-testkit": "^5.3.41",
"@salesforce/dev-scripts": "^11.0.4",
"@salesforce/dev-scripts": "^13.0.2",
"@salesforce/plugin-command-reference": "^3.1.80",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.10",
"@types/node": "^18",
"@types/node-fetch": "^2.6.13",
"@types/sinon": "^10.0.20",
"@types/xml2js": "^0.4.14",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@playwright/test": "^1.49.0",
"playwright": "^1.49.0",
"dotenv": "^16.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.2",
"eslint-plugin-header": "^3.1.1",
"eslint": "^10.4.0",
"eslint-config-prettier": "^10.1.5",
"eslint-config-salesforce-typescript": "^6.0.0",
"eslint-plugin-jsdoc": "^46.10.1",
"eslint-plugin-sf-plugin": "^1.20.33",
"eslint-plugin-unicorn": "^50.0.1",
"esmock": "^2.7.3",
"oclif": "^4.22.80",
"playwright": "^1.49.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
},
Expand Down Expand Up @@ -106,9 +110,9 @@
"prepack": "sf-prepack",
"prepare": "sf-install",
"test": "wireit",
"test:nut:local": "npx playwright install --with-deps && node -r dotenv/config ./node_modules/.bin/nyc mocha --slow 30000 --timeout 600000",
"test:nuts": "npx playwright install --with-deps && mocha \"**/*.nut.ts\" --slow 30000 --timeout 600000 --parallel=false",
"test:nuts:local": "npx playwright install --with-deps && node -r dotenv/config ./node_modules/.bin/nyc mocha \"**/*.nut.ts\" --slow 30000 --timeout 600000 --parallel=false",
"test:nut:local": "npx playwright install --with-deps && node -r dotenv/config ./node_modules/.bin/nyc mocha --slow 30000 --timeout 600000",
"test:only": "wireit",
"unlink-lwr": "yarn unlink @lwrjs/api @lwrjs/app-service @lwrjs/asset-registry @lwrjs/asset-transformer @lwrjs/auth-middleware @lwrjs/base-view-provider @lwrjs/base-view-transformer @lwrjs/client-modules @lwrjs/config @lwrjs/core @lwrjs/dev-proxy-server @lwrjs/diagnostics @lwrjs/esbuild @lwrjs/everywhere @lwrjs/fs-asset-provider @lwrjs/fs-watch @lwrjs/html-view-provider @lwrjs/instrumentation @lwrjs/label-module-provider @lwrjs/lambda @lwrjs/legacy-npm-module-provider @lwrjs/loader @lwrjs/lwc-module-provider @lwrjs/lwc-ssr @lwrjs/markdown-view-provider @lwrjs/module-bundler @lwrjs/module-registry @lwrjs/npm-module-provider @lwrjs/nunjucks-view-provider @lwrjs/o11y @lwrjs/resource-registry @lwrjs/router @lwrjs/security @lwrjs/server @lwrjs/shared-utils @lwrjs/static @lwrjs/tools @lwrjs/types @lwrjs/view-registry lwr",
"update-snapshots": "node --loader ts-node/esm --no-warnings=ExperimentalWarning \"./bin/dev.js\" snapshot:generate",
Expand Down Expand Up @@ -159,6 +163,7 @@
"src/**/*.ts",
"test/**/*.ts",
"messages/**",
"**/eslint.config.*",
"**/.eslint*",
"**/tsconfig.json"
],
Expand Down
4 changes: 2 additions & 2 deletions src/lwc-dev-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function createLWCServerConfig(

const resolvedWorkspace: Workspace = (workspace ??
(await ConfigUtils.getLocalDevServerWorkspace()) ??
LOCAL_DEV_SERVER_DEFAULT_WORKSPACE) as Workspace;
LOCAL_DEV_SERVER_DEFAULT_WORKSPACE);

const serverConfig: ServerConfig = {
rootDir,
Expand All @@ -62,7 +62,7 @@ async function createLWCServerConfig(
// use custom workspace if any is provided, or fetch from config file (if any), otherwise use the default workspace
workspace: resolvedWorkspace,
identityToken: token,
lifecycle: Lifecycle.getInstance() as unknown as ServerConfig['lifecycle'],
lifecycle: Lifecycle.getInstance(),
clientType,
namespace: typeof namespace === 'string' && namespace.trim().length > 0 ? namespace.trim() : undefined,
};
Expand Down
2 changes: 1 addition & 1 deletion src/shared/experience/expSite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class ExperienceSite {
let siteJson;
if (fs.existsSync(siteJsonPath)) {
try {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
siteJson = JSON.parse(fs.readFileSync(siteJsonPath, 'utf-8')) as SiteMetadata;
this.metadataCache.localMetadata = siteJson;
} catch (error) {
Expand Down
25 changes: 0 additions & 25 deletions test/.eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions test/commands/lightning/dev/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('lightning dev app', () => {
const testOrgData = new MockTestOrgData();

// Helper function to safely stub handleLocalDevEnablement (restores if already stubbed)
const stubHandleLocalDevEnablement = (returnValue?: boolean | undefined): sinon.SinonStub => {
const stubHandleLocalDevEnablement = (returnValue?: boolean ): sinon.SinonStub => {
// Restore if already stubbed - use try/catch to handle case where it's not stubbed
/* eslint-disable @typescript-eslint/unbound-method */
try {
Expand Down Expand Up @@ -278,7 +278,7 @@ describe('lightning dev app', () => {
// eslint-disable-next-line @typescript-eslint/unbound-method
const existingPromptStub = PromptUtils.promptUserToEnableLocalDev as unknown as sinon.SinonStub;
if (existingPromptStub && typeof existingPromptStub.restore === 'function') {
// eslint-disable-next-line @typescript-eslint/unbound-method
existingPromptStub.restore();
}
} catch {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/lightning/dev/component.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('lightning dev component', () => {
let MockedLightningDevComponent: typeof LightningDevComponent;

// Helper function to safely stub handleLocalDevEnablement (restores if already stubbed)
const stubHandleLocalDevEnablement = (returnValue?: boolean | undefined): sinon.SinonStub => {
const stubHandleLocalDevEnablement = (returnValue?: boolean ): sinon.SinonStub => {
// Restore if already stubbed - use try/catch to handle case where it's not stubbed
/* eslint-disable @typescript-eslint/unbound-method */
try {
Expand Down Expand Up @@ -218,7 +218,7 @@ describe('lightning dev component', () => {
// eslint-disable-next-line @typescript-eslint/unbound-method
const existingPromptStub = PromptUtils.promptUserToEnableLocalDev as unknown as sinon.SinonStub;
if (existingPromptStub && typeof existingPromptStub.restore === 'function') {
// eslint-disable-next-line @typescript-eslint/unbound-method
existingPromptStub.restore();
}
} catch {
Expand Down
4 changes: 2 additions & 2 deletions test/commands/lightning/dev/site.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('lightning dev site', () => {
let MockedLightningDevSite: typeof LightningDevSite;

// Helper function to safely stub handleLocalDevEnablement (restores if already stubbed)
const stubHandleLocalDevEnablement = (returnValue?: boolean | undefined): sinon.SinonStub => {
const stubHandleLocalDevEnablement = (returnValue?: boolean ): sinon.SinonStub => {
// Restore if already stubbed - use try/catch to handle case where it's not stubbed
/* eslint-disable @typescript-eslint/unbound-method */
try {
Expand Down Expand Up @@ -162,7 +162,7 @@ describe('lightning dev site', () => {
// eslint-disable-next-line @typescript-eslint/unbound-method
const existingPromptStub = PromptUtils.promptUserToEnableLocalDev as unknown as sinon.SinonStub;
if (existingPromptStub && typeof existingPromptStub.restore === 'function') {
// eslint-disable-next-line @typescript-eslint/unbound-method
existingPromptStub.restore();
}
} catch {
Expand Down
Loading
Loading