Skip to content

Commit

Permalink
Eslint 9; drop eslint-import and deprecation (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbraak authored Sep 22, 2024
1 parent 5c255fd commit d428a68
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 1,269 deletions.
3 changes: 0 additions & 3 deletions frontend/django_mptt_admin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "jqtree";
import * as cookie from "cookie";

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
interface JQTreeMoveEvent extends JQuery.Event {
move_info: {
do_move: () => void;
Expand All @@ -11,13 +10,11 @@ interface JQTreeMoveEvent extends JQuery.Event {
};
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
interface JQTreeSelectEvent extends JQuery.Event {
deselected_node: INode | null;
node: INode;
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
interface JQTreeLoadingEvent extends JQuery.Event {
isLoading: boolean;
node: INode | null;
Expand Down
8 changes: 0 additions & 8 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import eslintPluginDeprecation from "eslint-plugin-deprecation";

export default [
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
deprecation: eslintPluginDeprecation,
},
rules: {
"@typescript-eslint/restrict-template-expressions": "error",
"deprecation/deprecation": "error",
},
},
];
9 changes: 3 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@
"@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.24.4",
"@babel/preset-typescript": "^7.24.1",
"@eslint/js": "^9.9.1",
"@eslint/js": "^9.11.0",
"@types/cookie": "^0.6.0",
"@types/eslint__js": "^8.42.3",
"@types/jquery": "^3.5.29",
"@types/node": "^20.12.5",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.30.0",
"eslint": "^9",
"sass": "^1.74.1",
"typescript": "^5.4.4",
"typescript-eslint": "^8.4.0",
"typescript-eslint": "^8.6.0",
"webpack": "^5.91.0",
"webpack-cli": "^5.1.4"
},
Expand Down
Loading

0 comments on commit d428a68

Please sign in to comment.