Skip to content

Commit 53b729c

Browse files
committed
chore(deps): update eslint to v9
1 parent fa35505 commit 53b729c

File tree

43 files changed

+745
-667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+745
-667
lines changed

Diff for: .eslintignore

-16
This file was deleted.

Diff for: .eslintrc.js

-53
This file was deleted.

Diff for: bin/fetch-possible-types.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fetch("http://localhost:8000/graphql", {
2929
result.data.__schema.types.forEach((supertype) => {
3030
if (supertype.possibleTypes) {
3131
possibleTypes[supertype.name] = supertype.possibleTypes.map(
32-
(subtype) => subtype.name
32+
(subtype) => subtype.name,
3333
);
3434
}
3535
});
@@ -44,6 +44,6 @@ fetch("http://localhost:8000/graphql", {
4444
// eslint-disable-next-line no-console
4545
console.log("Fragment types successfully extracted!");
4646
}
47-
}
47+
},
4848
);
4949
});

Diff for: config/ember-try.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
/* eslint-disable n/no-missing-require */
43
const { embroiderSafe, embroiderOptimized } = require("@embroider/test-setup");
54
const getChannelURL = require("ember-source-channel-url");
65

Diff for: config/testem.browserstack.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"use strict";
22

3-
/* eslint-disable n/no-missing-require */
43
const project = ["-p", require("./package.json").name];
54

65
module.exports = {
76
test_page: "tests/index.html?hidepassed&hideskipped&timeout=60000",
87
disable_watching: true,
98
parallel: 5,
10-
// eslint-disable-next-line n/no-unpublished-require
9+
1110
reporter: require("testem-failure-only-reporter/grouped-by-browser"),
1211
framework: "qunit",
1312
timeout: 600,

Diff for: eslint.config.mjs

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import adfinisEmberAddonConfig from "@adfinis/eslint-config/ember-addon";
2+
import graphql from "@graphql-eslint/eslint-plugin";
3+
import ember from "eslint-plugin-ember";
4+
import n from "eslint-plugin-n";
5+
import globals from "globals";
6+
7+
export default [
8+
...adfinisEmberAddonConfig,
9+
{
10+
ignores: [
11+
"**/blueprints/*/files/",
12+
// compiled output
13+
"**/dist/",
14+
// misc
15+
"**/coverage/",
16+
// ember-try
17+
"**/.node_modules.ember-try/",
18+
// ember-cli-addon-docs
19+
"packages/-ember-caluma/app/snippets/",
20+
],
21+
},
22+
{
23+
plugins: { ember },
24+
settings: {
25+
"import/internal-regex": "^(@projectcaluma|ember-caluma|dummy)/",
26+
},
27+
rules: {
28+
// TODO: Migrate as suggested here:
29+
// https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-runloop.md
30+
"ember/no-runloop": "warn",
31+
},
32+
},
33+
// Customization for workspace
34+
{
35+
files: [
36+
"config/*.js",
37+
"packages/*/ember-cli-build.js",
38+
"packages/*/index.js",
39+
"packages/*/testem.js",
40+
"packages/*/blueprints/**/index.js",
41+
"packages/*/config/**/*.js",
42+
"packages/*/tests/dummy/config/**/*.js",
43+
],
44+
plugins: { n },
45+
languageOptions: {
46+
sourceType: "script",
47+
ecmaVersion: "latest",
48+
globals: {
49+
...globals.node,
50+
},
51+
},
52+
},
53+
// GraphQL
54+
{
55+
files: ["*.graphql"],
56+
plugins: { "@graphql-eslint": graphql },
57+
languageOptions: {
58+
parser: graphql.parser,
59+
parserOptions: {
60+
operations: "./packages/**/addon/gql/**/*.graphql",
61+
schema: "./packages/testing/addon/mirage-graphql/schema.graphql",
62+
},
63+
},
64+
rules: {
65+
...graphql.configs["flat/operations-recommended"].rules,
66+
"@graphql-eslint/selection-set-depth": ["off"],
67+
},
68+
},
69+
// Mirage
70+
{
71+
files: [
72+
"./packages/*/tests/**/*.js",
73+
"./packages/testing/addon/mirage-graphql/**/*.js",
74+
],
75+
rules: {
76+
"ember/no-array-prototype-extensions": ["off"],
77+
},
78+
},
79+
];

Diff for: package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
"*.{graphql,json,md,yaml}": "prettier --write"
3737
},
3838
"devDependencies": {
39-
"@adfinis/eslint-config": "2.1.1",
39+
"@adfinis/eslint-config": "3.0.1",
4040
"@babel/core": "7.26.0",
4141
"@babel/eslint-parser": "7.26.5",
4242
"@babel/plugin-proposal-decorators": "7.25.9",
4343
"@commitlint/cli": "19.6.1",
4444
"@commitlint/config-conventional": "19.6.0",
4545
"@eslint/js": "9.18.0",
46-
"@graphql-eslint/eslint-plugin": "3.20.1",
46+
"@graphql-eslint/eslint-plugin": "4.3.0",
4747
"@semantic-release/commit-analyzer": "13.0.1",
4848
"@semantic-release/exec": "6.0.3",
4949
"@semantic-release/git": "10.0.1",
@@ -52,17 +52,17 @@
5252
"concurrently": "9.1.2",
5353
"ember-template-lint": "6.0.0",
5454
"ember-template-lint-plugin-prettier": "5.0.0",
55-
"eslint": "8.57.1",
55+
"eslint": "9.18.0",
5656
"eslint-config-prettier": "10.0.1",
5757
"eslint-plugin-ember": "12.3.3",
5858
"eslint-plugin-import": "2.31.0",
5959
"eslint-plugin-n": "17.15.1",
60-
"eslint-plugin-prettier": "5.2.1",
60+
"eslint-plugin-prettier": "5.2.2",
6161
"eslint-plugin-qunit": "8.1.2",
6262
"get-graphql-schema": "2.1.2",
6363
"glob": "11.0.1",
6464
"globals": "15.14.0",
65-
"graphql": "15.10.1",
65+
"graphql": "16.10.0",
6666
"husky": "9.1.7",
6767
"lint-staged": "15.3.0",
6868
"node-fetch": "3.3.2",

Diff for: packages/-ember-caluma/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"ember-uikit": "9.1.3",
7272
"ember-validated-form": "7.0.1",
7373
"flatpickr": "4.6.13",
74-
"graphql": "15.10.1",
74+
"graphql": "16.10.0",
7575
"loader.js": "4.7.0",
7676
"miragejs": "0.1.48",
7777
"sass": "1.83.4",

Diff for: packages/analytics/addon/components/ca-field-selector-list.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default class CaFieldSelectorListComponent extends Component {
7575
this.intl.t("caluma.analytics.notification.reorder-success"),
7676
);
7777
this._fields = null;
78-
} catch (e) {
78+
} catch {
7979
this.notification.danger(
8080
this.intl.t("caluma.analytics.notification.reorder-error"),
8181
);

Diff for: packages/analytics/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// eslint-disable-next-line n/no-unpublished-require
43
const { buildEngine } = require("ember-engines/lib/engine-addon");
54

65
module.exports = buildEngine({

Diff for: packages/analytics/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"ember-template-imports": "^4.2.0",
4040
"ember-uikit": "^9.1.3",
4141
"ember-validated-form": "^7.0.1",
42-
"graphql": "^15.10.1",
42+
"graphql": "^16.10.0",
4343
"reactiveweb": "^1.3.0",
4444
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
4545
},

Diff for: packages/core/addon/helpers/decode-id.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { warn } from "@ember/debug";
44
export function decodeId(str) {
55
try {
66
return window.atob(str).split(":")[1];
7-
} catch (e) {
7+
} catch {
88
warn(`Attempted to decode ${str} as base64 but failed`, {
99
id: "ember-caluma.decode-id",
1010
});

Diff for: packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"ember-modify-based-class-resource": "^1.1.1",
3030
"ember-template-imports": "^4.2.0",
3131
"ember-uikit": "^9.1.3",
32-
"graphql": "^15.10.1",
32+
"graphql": "^16.10.0",
3333
"graphql-tag": "^2.12.6",
3434
"jexl": "^2.3.0",
3535
"lodash.clonedeep": "^4.5.0",

Diff for: packages/distribution/addon/components/cd-inquiry-answer-form.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default class CdInquiryAnswerFormComponent extends Component {
105105
});
106106

107107
yield this.router.transitionTo("inquiry.index");
108-
} catch (error) {
108+
} catch {
109109
this.notification.danger(
110110
this.intl.t("caluma.distribution.answer.complete-error"),
111111
);

Diff for: packages/distribution/addon/components/cd-inquiry-dialog/inquiry-part.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
9797
workItem: decodeId(this.args.inquiry.id),
9898
},
9999
});
100-
} catch (error) {
100+
} catch {
101101
this.notification.danger(
102102
this.intl.t("caluma.distribution.withdraw.error"),
103103
);
@@ -126,7 +126,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
126126
buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
127127
},
128128
});
129-
} catch (error) {
129+
} catch {
130130
this.notification.danger(
131131
this.intl.t("caluma.distribution.reopen-inquiry.error"),
132132
);
@@ -163,7 +163,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
163163
}),
164164
},
165165
});
166-
} catch (error) {
166+
} catch {
167167
this.notification.danger(
168168
this.intl.t("caluma.distribution.reminder.error"),
169169
);

Diff for: packages/distribution/addon/components/cd-inquiry-edit-form.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class CdInquiryEditFormComponent extends Component {
4848
});
4949

5050
yield this.router.transitionTo("inquiry.index");
51-
} catch (error) {
51+
} catch {
5252
this.notification.danger(
5353
this.intl.t("caluma.distribution.edit.send-error"),
5454
);

Diff for: packages/distribution/addon/components/cd-navigation/controls.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default class CdNavigationControlsComponent extends Component {
6262

6363
yield this.distribution.refetch();
6464
this.router.transitionTo("index");
65-
} catch (e) {
65+
} catch {
6666
this.notification.danger(
6767
this.intl.t("caluma.distribution.complete-error"),
6868
);
@@ -88,7 +88,7 @@ export default class CdNavigationControlsComponent extends Component {
8888
});
8989

9090
yield this.distribution.refetchControls();
91-
} catch (e) {
91+
} catch {
9292
this.notification.danger(this.intl.t("caluma.distribution.reopen-error"));
9393
}
9494
}
@@ -104,7 +104,7 @@ export default class CdNavigationControlsComponent extends Component {
104104
),
105105
},
106106
});
107-
} catch (e) {
107+
} catch {
108108
this.notification.danger(
109109
this.intl.t("caluma.distribution.check-inquiries-error"),
110110
);

Diff for: packages/distribution/addon/services/distribution.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class DistributionService extends Service {
123123

124124
// refetch navigation and controls data
125125
yield this.refetch();
126-
} catch (e) {
126+
} catch {
127127
this.notification.danger(
128128
this.intl.t("caluma.distribution.new.error", { count: groups.length }),
129129
);
@@ -205,7 +205,7 @@ export default class DistributionService extends Service {
205205
const mutation = gql`mutation SendInquiries {${mutations.join("\n")}}`;
206206

207207
yield this.apollo.mutate({ mutation });
208-
} catch (e) {
208+
} catch {
209209
this.notification.danger(this.intl.t("caluma.distribution.send-error"));
210210
}
211211
}

Diff for: packages/distribution/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"use strict";
22

3-
// eslint-disable-next-line n/no-unpublished-require
43
const { buildEngine } = require("ember-engines/lib/engine-addon");
54

65
const publicAssets = [

Diff for: packages/distribution/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"ember-test-selectors": "^7.0.0",
4141
"ember-uikit": "^9.1.3",
4242
"flatpickr": "^4.6.13",
43-
"graphql": "^15.10.1",
43+
"graphql": "^16.10.0",
4444
"graphql-tag": "^2.12.6",
4545
"lodash.merge": "^4.6.2",
4646
"luxon": "^3.5.0",

Diff for: packages/form-builder/addon/components/cfb-form-editor/copy-modal.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export default class CfbFormEditorCopyModal extends Component {
5454
);
5555

5656
this.router.transitionTo("edit", changeset.slug);
57-
} catch (e) {
57+
} catch {
5858
this.notification.danger(
5959
this.intl.t("caluma.form-builder.notification.form.create.error"),
6060
);

0 commit comments

Comments
 (0)