Skip to content

Commit

Permalink
build(deps): update to / forward port to eslint v9+
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Aug 3, 2024
1 parent 4d1b639 commit 93723ed
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 26 deletions.
20 changes: 0 additions & 20 deletions tools/localization/.eslintrc.js

This file was deleted.

43 changes: 43 additions & 0 deletions tools/localization/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
),
{
files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
},

rules: {
"no-useless-escape": 0,
},
},
];
15 changes: 9 additions & 6 deletions tools/localization/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "node ./dist/index.js",
"dev": "tsc --watch",
"format": "npx prettier --write .",
"lint": "eslint src/ --ext .js,.jsx,.ts,.tsx --max-warnings=0",
"lint": "eslint src/ --max-warnings=0",
"test": "jest --passWithNoTests"
},
"repository": "https://github.com/ankidroid/Anki-Android",
Expand All @@ -23,16 +23,19 @@
"typescript": "^5.3.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.8.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.18",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
"@types/node": "^22.1.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"eslint": "^9.8.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-promise": "^7.0.0",
"globals": "^15.9.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"ts-jest": "^29.1.2",
Expand Down

0 comments on commit 93723ed

Please sign in to comment.