Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @shopify/eslint-plugin from 42.1.0 to 43.0.0 #519

Merged
merged 2 commits into from
Aug 17, 2023
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
11 changes: 9 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@ const developmentOverrides = isVsCode
: {};

module.exports = {
extends: ["plugin:@shopify/typescript", "plugin:@shopify/prettier"],
extends: [
"plugin:@shopify/typescript",
"plugin:@shopify/typescript-type-checking",
"plugin:@shopify/prettier",
],
parserOptions: {
project: "tsconfig.json",
},
rules: {
"consistent-return": "off",
"no-warning-comments": "off",
"max-len": ["error", { "code": 120 }],
"max-len": ["error", { code: 120 }],
...developmentOverrides,
},
settings: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"devDependencies": {
"@babel/core": "^7.22.10",
"@shopify/eslint-plugin": "^42.1.0",
"@shopify/eslint-plugin": "^43.0.0",
"@shopify/prettier-config": "^1.1.2",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
Expand Down
12 changes: 6 additions & 6 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ export enum OverridesStatus {
}

export class Configuration {
private context: vscode.ExtensionContext;
private readonly context: vscode.ExtensionContext;
private overrideStatus: OverridesStatus | undefined;
private settings: Setting[];
private allSettingsMatch: boolean;
private configurationStore: ConfigurationStore;
private readonly settings: Setting[];
private readonly allSettingsMatch: boolean;
private readonly configurationStore: ConfigurationStore;

constructor(
configurationStore: ConfigurationStore,
Expand Down Expand Up @@ -177,7 +177,7 @@ export class Configuration {
const existingKeys = this.context.globalState
.keys()
.filter((key) =>
key.match(/shopify\.ruby-extensions-pack\..*\.approved_all_overrides/),
/shopify\.ruby-extensions-pack\..*\.approved_all_overrides/.exec(key),
);

existingKeys.forEach((key) => {
Expand Down Expand Up @@ -247,7 +247,7 @@ export class Configuration {
// Otherwise, try to find a previous override status
const existingKeys = this.context.globalState.keys();
const previousApprovalKey = existingKeys.find((key) =>
key.match(/shopify\.ruby-extensions-pack\..*\.approved_all_overrides/),
/shopify\.ruby-extensions-pack\..*\.approved_all_overrides/.exec(key),
);

if (previousApprovalKey === undefined) {
Expand Down
16 changes: 8 additions & 8 deletions src/setting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export enum OverrideType {
export class Setting {
public name: string;
public shadowedByWorkspaceSetting: boolean;
private section: string;
private value: any;
private scope?: { languageId: string };
private configurationStore: ConfigurationStore;
private configurationEntry: ConfigurationEntry;
private existingConfig: ConfigurationInfo;
private context: vscode.ExtensionContext;
private readonly section: string;
private readonly value: any;
private readonly scope?: { languageId: string };
private readonly configurationStore: ConfigurationStore;
private readonly configurationEntry: ConfigurationEntry;
private readonly existingConfig: ConfigurationInfo;
private readonly context: vscode.ExtensionContext;

constructor(
context: vscode.ExtensionContext,
Expand Down Expand Up @@ -105,7 +105,7 @@ export class Setting {
let exists = true;
if (
this.existingConfig === undefined ||
this.existingConfig?.globalValue === undefined
this.existingConfig.globalValue === undefined
) {
message =
`No configuration found for ${this.fullName()}. ` +
Expand Down
2 changes: 1 addition & 1 deletion src/test/suite/configuration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ suite("Configuration suite", () => {
const store = new FakeStore();

// Update all settings to match the expected
DEFAULT_CONFIGS.forEach(async ({ scope, section, name, value }) => {
DEFAULT_CONFIGS.forEach(({ scope, section, name, value }) => {
const entry = store.getConfiguration(section, scope);
entry.update(name, value, true, true);
});
Expand Down
Loading