Skip to content

Commit

Permalink
Merge pull request #519 from Shopify/dependabot/npm_and_yarn/shopify/…
Browse files Browse the repository at this point in the history
…eslint-plugin-43.0.0

Bump @shopify/eslint-plugin from 42.1.0 to 43.0.0
  • Loading branch information
vinistock authored Aug 17, 2023
2 parents dc0e71a + 4abc4a1 commit 1d7b0db
Show file tree
Hide file tree
Showing 6 changed files with 635 additions and 332 deletions.
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

0 comments on commit 1d7b0db

Please sign in to comment.