diff --git a/bun.lockb b/bun.lockb index 5aa90dd..c24e42b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index bdf0a82..56a8ecb 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,9 @@ "version": "0.7.1", "description": "Adds item pricing to the Team Fortress 2 wiki", "devDependencies": { + "@eslint/css": "^0.7.0", + "@eslint/js": "^9.25.1", + "@eslint/json": "^0.12.0", "@happy-dom/global-registrator": "^17.4.4", "@types/firefox-webext-browser": "^120.0.4", "@types/greasemonkey": "^4.0.7", @@ -12,10 +15,13 @@ "buffer": "^6.0.3", "bun-types": "^1.2.5", "copy-webpack-plugin": "^12.0.2", + "eslint": "^9.25.1", + "globals": "^16.0.0", "path-browserify": "^1.0.1", "raw-loader": "^4.0.2", "tf2-static-schema": "^1.74.0", "ts-loader": "^9.5.1", + "typescript-eslint": "^8.31.0", "webpack": "^5.94.0", "webpack-cli": "^5.1.4" }, diff --git a/src/eslint.config.mjs b/src/eslint.config.mjs new file mode 100644 index 0000000..d3cb68f --- /dev/null +++ b/src/eslint.config.mjs @@ -0,0 +1,17 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import json from "@eslint/json"; +import css from "@eslint/css"; +import { defineConfig } from "eslint/config"; + + +export default defineConfig([ + { ignores: ["**/GM_fetch/**/*.js"] }, + { files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] }, + { files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: globals.browser } }, + tseslint.configs.recommended, + { files: ["**/*.json"], plugins: { json }, language: "json/json", extends: ["json/recommended"] }, + { files: ["**/*.jsonc"], plugins: { json }, language: "json/jsonc", extends: ["json/recommended"] }, + { files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] }, +]); \ No newline at end of file