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

chore(deps): update eslint to v9 #2879

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
16 changes: 0 additions & 16 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions bin/fetch-possible-types.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fetch("http://localhost:8000/graphql", {
result.data.__schema.types.forEach((supertype) => {
if (supertype.possibleTypes) {
possibleTypes[supertype.name] = supertype.possibleTypes.map(
(subtype) => subtype.name
(subtype) => subtype.name,
);
}
});
Expand All @@ -44,6 +44,6 @@ fetch("http://localhost:8000/graphql", {
// eslint-disable-next-line no-console
console.log("Fragment types successfully extracted!");
}
}
},
);
});
1 change: 0 additions & 1 deletion config/ember-try.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

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

Expand Down
3 changes: 1 addition & 2 deletions config/testem.browserstack.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
"use strict";

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

module.exports = {
test_page: "tests/index.html?hidepassed&hideskipped&timeout=60000",
disable_watching: true,
parallel: 5,
// eslint-disable-next-line n/no-unpublished-require

reporter: require("testem-failure-only-reporter/grouped-by-browser"),
framework: "qunit",
timeout: 600,
Expand Down
79 changes: 79 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import adfinisEmberAddonConfig from "@adfinis/eslint-config/ember-addon";
import graphql from "@graphql-eslint/eslint-plugin";
import ember from "eslint-plugin-ember";
import n from "eslint-plugin-n";
import globals from "globals";

export default [
...adfinisEmberAddonConfig,
{
ignores: [
"**/blueprints/*/files/",
// compiled output
"**/dist/",
// misc
"**/coverage/",
// ember-try
"**/.node_modules.ember-try/",
// ember-cli-addon-docs
"packages/-ember-caluma/app/snippets/",
],
},
{
plugins: { ember },
settings: {
"import/internal-regex": "^(@projectcaluma|ember-caluma|dummy)/",
},
rules: {
// TODO: Migrate as suggested here:
// https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-runloop.md
"ember/no-runloop": "warn",
},
},
// Customization for workspace
{
files: [
"config/*.js",
"packages/*/ember-cli-build.js",
"packages/*/index.js",
"packages/*/testem.js",
"packages/*/blueprints/**/index.js",
"packages/*/config/**/*.js",
"packages/*/tests/dummy/config/**/*.js",
],
plugins: { n },
languageOptions: {
sourceType: "script",
ecmaVersion: "latest",
globals: {
...globals.node,
},
},
},
// GraphQL
{
files: ["*.graphql"],
plugins: { "@graphql-eslint": graphql },
languageOptions: {
parser: graphql.parser,
parserOptions: {
operations: "./packages/**/addon/gql/**/*.graphql",
schema: "./packages/testing/addon/mirage-graphql/schema.graphql",
},
},
rules: {
...graphql.configs["flat/operations-recommended"].rules,
"@graphql-eslint/selection-set-depth": ["off"],
},
},
// Mirage
{
files: [
"./packages/*/tests/**/*.js",
"./packages/testing/addon/mirage-graphql/**/*.js",
],
rules: {
"ember/no-array-prototype-extensions": ["off"],
},
},
];
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
"*.{graphql,json,md,yaml}": "prettier --write"
},
"devDependencies": {
"@adfinis/eslint-config": "2.1.1",
"@adfinis/eslint-config": "3.0.1",
"@babel/core": "7.26.0",
"@babel/eslint-parser": "7.26.5",
"@babel/plugin-proposal-decorators": "7.25.9",
"@commitlint/cli": "19.6.1",
"@commitlint/config-conventional": "19.6.0",
"@eslint/js": "9.18.0",
"@graphql-eslint/eslint-plugin": "3.20.1",
"@graphql-eslint/eslint-plugin": "4.3.0",
"@semantic-release/commit-analyzer": "13.0.1",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
Expand All @@ -52,17 +52,17 @@
"concurrently": "9.1.2",
"ember-template-lint": "6.0.0",
"ember-template-lint-plugin-prettier": "5.0.0",
"eslint": "8.57.1",
"eslint": "9.18.0",
"eslint-config-prettier": "10.0.1",
"eslint-plugin-ember": "12.3.3",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-n": "17.15.1",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-prettier": "5.2.2",
"eslint-plugin-qunit": "8.1.2",
"get-graphql-schema": "2.1.2",
"glob": "11.0.1",
"globals": "15.14.0",
"graphql": "15.10.1",
"graphql": "16.10.0",
"husky": "9.1.7",
"lint-staged": "15.3.0",
"node-fetch": "3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/-ember-caluma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"ember-uikit": "9.1.3",
"ember-validated-form": "7.0.1",
"flatpickr": "4.6.13",
"graphql": "15.10.1",
"graphql": "16.10.0",
"loader.js": "4.7.0",
"miragejs": "0.1.48",
"sass": "1.83.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class CaFieldSelectorListComponent extends Component {
this.intl.t("caluma.analytics.notification.reorder-success"),
);
this._fields = null;
} catch (e) {
} catch {
this.notification.danger(
this.intl.t("caluma.analytics.notification.reorder-error"),
);
Expand Down
1 change: 0 additions & 1 deletion packages/analytics/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

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

module.exports = buildEngine({
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ember-template-imports": "^4.2.0",
"ember-uikit": "^9.1.3",
"ember-validated-form": "^7.0.1",
"graphql": "^15.10.1",
"graphql": "^16.10.0",
"reactiveweb": "^1.3.0",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/addon/helpers/decode-id.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { warn } from "@ember/debug";
export function decodeId(str) {
try {
return window.atob(str).split(":")[1];
} catch (e) {
} catch {
warn(`Attempted to decode ${str} as base64 but failed`, {
id: "ember-caluma.decode-id",
});
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ember-modify-based-class-resource": "^1.1.1",
"ember-template-imports": "^4.2.0",
"ember-uikit": "^9.1.3",
"graphql": "^15.10.1",
"graphql": "^16.10.0",
"graphql-tag": "^2.12.6",
"jexl": "^2.3.0",
"lodash.clonedeep": "^4.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class CdInquiryAnswerFormComponent extends Component {
});

yield this.router.transitionTo("inquiry.index");
} catch (error) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.answer.complete-error"),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
workItem: decodeId(this.args.inquiry.id),
},
});
} catch (error) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.withdraw.error"),
);
Expand Down Expand Up @@ -126,7 +126,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
buttonTasks: Object.keys(this.config.inquiry.answer.buttons),
},
});
} catch (error) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.reopen-inquiry.error"),
);
Expand Down Expand Up @@ -163,7 +163,7 @@ export default class CdInquiryDialogInquiryPartComponent extends Component {
}),
},
});
} catch (error) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.reminder.error"),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class CdInquiryEditFormComponent extends Component {
});

yield this.router.transitionTo("inquiry.index");
} catch (error) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.edit.send-error"),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class CdNavigationControlsComponent extends Component {

yield this.distribution.refetch();
this.router.transitionTo("index");
} catch (e) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.complete-error"),
);
Expand All @@ -88,7 +88,7 @@ export default class CdNavigationControlsComponent extends Component {
});

yield this.distribution.refetchControls();
} catch (e) {
} catch {
this.notification.danger(this.intl.t("caluma.distribution.reopen-error"));
}
}
Expand All @@ -104,7 +104,7 @@ export default class CdNavigationControlsComponent extends Component {
),
},
});
} catch (e) {
} catch {
this.notification.danger(
this.intl.t("caluma.distribution.check-inquiries-error"),
);
Expand Down
4 changes: 2 additions & 2 deletions packages/distribution/addon/services/distribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default class DistributionService extends Service {

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

yield this.apollo.mutate({ mutation });
} catch (e) {
} catch {
this.notification.danger(this.intl.t("caluma.distribution.send-error"));
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/distribution/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";

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

const publicAssets = [
Expand Down
2 changes: 1 addition & 1 deletion packages/distribution/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ember-test-selectors": "^7.0.0",
"ember-uikit": "^9.1.3",
"flatpickr": "^4.6.13",
"graphql": "^15.10.1",
"graphql": "^16.10.0",
"graphql-tag": "^2.12.6",
"lodash.merge": "^4.6.2",
"luxon": "^3.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class CfbFormEditorCopyModal extends Component {
);

this.router.transitionTo("edit", changeset.slug);
} catch (e) {
} catch {
this.notification.danger(
this.intl.t("caluma.form-builder.notification.form.create.error"),
);
Expand Down
Loading
Loading