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.

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

This file was deleted.

22 changes: 22 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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: '^_',
},
],
'jsdoc/newline-after-description': 'off',
},
},
];

export default configs;
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.3.20",
"@salesforce/cli-plugins-testkit": "^5.3.66",
"@salesforce/dev-scripts": "^11.0.4",
"@salesforce/dev-scripts": "^13.0.2",
"@salesforce/plugin-command-reference": "^3.1.132",
"@salesforce/ts-sinon": "^1.4.34",
"@types/chai": "^4.3.17",
"@types/mocha": "^10.0.10",
"@types/node": "^18",
"@types/sinon": "^10.0.20",
"@types/which": "^3",
"eslint-plugin-sf-plugin": "^1.20.33",
"eslint": "^10.4.0",
"eslint-config-salesforce-typescript": "^6.0.0",
"eslint-plugin-sf-plugin": "^3.0.0",
"oclif": "^4.23.16",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
Expand Down Expand Up @@ -154,6 +160,7 @@
"src/**/*.ts",
"test/**/*.ts",
"messages/**",
"**/eslint.config.*",
"**/.eslint*",
"**/tsconfig.json"
],
Expand Down
2 changes: 1 addition & 1 deletion src/commands/org/list/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class ListAuth extends SfCommand<AuthListResults> {
}

return mappedAuths;
} catch (err) {
} catch (_err) {
this.log(messages.getMessage('noResultsFound'));
return [];
}
Expand Down
1 change: 1 addition & 0 deletions src/commands/org/login/jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default class LoginJwt extends SfCommand<AuthFields> {
public async run(): Promise<AuthFields> {
const { flags } = await this.parse(LoginJwt);
this.flags = flags;
// eslint-disable-next-line no-useless-assignment -- assignment isn't actually useless.
let result: AuthFields = {};

if (await common.shouldExitCommand(flags['no-prompt'])) return {};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/org/login/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default class LoginWeb extends SfCommand<AuthFields> {
}

// leave it because it's stubbed in the test
// eslint-disable-next-line class-methods-use-this
private async executeLoginFlow({
oauthConfig,
browser,
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ type NpmExplanation = {

// Detects if the auth key used is crypto v1 or v2
// Detects if the SF_CRYPTO_V2 env var is set and if it matches the key crypto version
// eslint-disable-next-line complexity
const cryptoVersionTest = async (doctor: SfDoctor): Promise<void> => {
getLogger().debug('Running Crypto Version tests');

Expand Down Expand Up @@ -164,6 +165,7 @@ const cryptoVersionTest = async (doctor: SfDoctor): Promise<void> => {

// Inspect CLI install and plugins to ensure all versions of `@salesforce/core` can support v2 crypto.
// This uses `npm explain @salesforce/core` to ensure all versions are greater than 6.6.0.
// eslint-disable-next-line complexity
const supportsCliV2Crypto = async (doctor: SfDoctor): Promise<boolean> => {
const diagnosis: SfDoctorDiagnosis = doctor.getDiagnosis();
let coreSupportsV2 = false;
Expand Down
19 changes: 0 additions & 19 deletions test/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion test/commands/org/login/login.jwt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ describe('org:login:jwt', () => {
await prepareStubs({ existingAuth: true });
try {
await LoginJwt.run(['-u', testData.username, '-f', 'path/to/key.json', '-i', '123456', '--json']);
} catch (e) {
} catch (_e) {
expect.fail('Should not have thrown an error');
}
});
Expand Down
1 change: 0 additions & 1 deletion test/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const projectSetup = async ($$: TestContext, inProject = true, contents?: Config
if (contents) {
$$.setConfigStubContents('SfProjectJson', contents);
if ($$.configStubs.SfProjectJson) {
// eslint-disable-next-line @typescript-eslint/require-await
$$.configStubs.SfProjectJson.retrieveContents = async (): Promise<ConfigContents> => contents;
}
}
Expand Down
Loading
Loading