Skip to content
Merged
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.

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

This file was deleted.

21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import tsconfigs from 'eslint-config-salesforce-typescript';
import plugin from 'eslint-plugin-sf-plugin';

const configs = [
...tsconfigs,
...plugin.configs.recommended,
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
];

export default configs;
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"enableO11y": true,
"o11yUploadEndpoint": "https://794testsite.my.site.com/byolwr/webruntime/log/metrics",
"dependencies": {
"@inquirer/input": "^2.3.0",
"@inquirer/prompts": "^7.10.1",
"@jsforce/jsforce-node": "^3.10.22",
"@oclif/core": "^4",
"@salesforce/core": "^9.1.4",
Expand All @@ -24,16 +24,22 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.3.34",
"@salesforce/cli-plugins-testkit": "^5.3.64",
"@salesforce/dev-scripts": "^11.0.4",
"@salesforce/dev-scripts": "^13.0.2",
"@salesforce/plugin-command-reference": "^3.1.132",
"@salesforce/ts-sinon": "^1.4.36",
"@salesforce/ts-types": "^3.0.1",
"@types/chai": "^4.3.17",
"@types/marked": "^4.0.8",
"@types/marked-terminal": "^3.1.3",
"@types/mocha": "^10.0.10",
"@types/node": "^18",
"@types/semver": "^7.8.0",
"@types/which": "^3",
"@types/sinon": "^10.0.20",
"@types/sinon-chai": "^3.2.12",
"eslint-plugin-sf-plugin": "^1.20.33",
"@types/which": "^3",
"eslint": "^10.4.0",
"eslint-config-salesforce-typescript": "^6.0.0",
"eslint-plugin-sf-plugin": "^3.0.0",
"oclif": "^4.23.30",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.2",
Expand Down Expand Up @@ -148,6 +154,7 @@
"src/**/*.ts",
"test/**/*.ts",
"messages/**",
"**/eslint.config.*",
"**/.eslint*",
"**/tsconfig.json"
],
Expand Down
4 changes: 2 additions & 2 deletions src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class Diagnostics {
const conn = new Connection();
await conn.request(url);
await Lifecycle.getInstance().emit('Doctor:diagnostic', { testName: `can access: ${url}`, status: 'pass' });
} catch (e) {
} catch (_e) {
await Lifecycle.getInstance().emit('Doctor:diagnostic', { testName: `can't access: ${url}`, status: 'fail' });
this.doctor.addSuggestion(
`Cannot reach ${url} - potential network configuration error, check proxies, firewalls, environment variables`
Expand All @@ -180,7 +180,7 @@ export class Diagnostics {
testName: `can access: ${manifestUrl}`,
status: 'pass',
});
} catch (e) {
} catch (_e) {
await Lifecycle.getInstance().emit('Doctor:diagnostic', {
testName: `can't access: ${manifestUrl}`,
status: 'fail',
Expand Down
2 changes: 1 addition & 1 deletion src/shared/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import input from '@inquirer/input';
import { input } from '@inquirer/prompts';

// a wrapper object to make inquirer prompts stubbable by sinon
export const prompts = {
Expand Down
25 changes: 0 additions & 25 deletions test/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion test/commands/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ describe('Doctor Command', () => {
afterEach(() => {
sandbox.restore();
// Reset the instance for testing
// eslint-disable-next-line @typescript-eslint/ban-ts-comment,@typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
delete Doctor.instance;
});
Expand Down
2 changes: 1 addition & 1 deletion test/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('Diagnostics', () => {
afterEach(() => {
sandbox.restore();
// Reset the instance for testing
// eslint-disable-next-line @typescript-eslint/ban-ts-comment,@typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
delete Doctor.instance;
});
Expand Down
2 changes: 1 addition & 1 deletion test/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Doctor Class', () => {
afterEach(() => {
sandbox.restore();
// Reset the instance for testing
// eslint-disable-next-line @typescript-eslint/ban-ts-comment,@typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
delete Doctor.instance;
});
Expand Down
2 changes: 1 addition & 1 deletion test/shared/getInfoConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('getInfoConfig tests', () => {
},
},
},
} as PjsonWithInfo;
};

// keep pjsonMock as JSON to access values in tests
readFileStub = stubMethod(sandbox, fs.promises, 'readFile').resolves(JSON.stringify(pjsonMock));
Expand Down
Loading
Loading