Skip to content

Commit

Permalink
Upgrade eslint to v9 with flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Aug 18, 2024
1 parent cbda6cf commit 3dfeae0
Show file tree
Hide file tree
Showing 7 changed files with 240 additions and 201 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

53 changes: 53 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import globals from "globals";
import ts from "typescript-eslint";

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
prettier,
{
languageOptions: {
globals: {
...globals.browser,
...globals.jquery,
...globals.node,
},
},
rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/triple-slash-reference": "off",
},
},
{
files: ["tests/**/*.js"],
languageOptions: {
globals: {
...globals.qunit,
},
},
},
{
ignores: [
".DS_Store",
"node_modules",
"build",
"dist",
"coverage",
".vercel",
"package",
".env",
".env.*",
"!.env.example",
"pnpm-lock.yaml",
"package-lock.json",
"yarn.lock",
],
},
];
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,23 @@
},
"license": "MIT",
"devDependencies": {
"@eslint/js": "^9.9.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@types/jquery": "^3.5.30",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"esbuild": "^0.21.4",
"eslint": "^8.56.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"glob": "^10.3.10",
"globals": "^15.9.0",
"jquery": "^3.7.1",
"prettier": "^3.2.5",
"qunit": "^2.21.0",
"rollup": "^4.17.2",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-esbuild": "^6.1.1",
"tslib": "^2.6.2",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^8.1.0"
},
"peerDependencies": {
"jquery": ">=1.9.0"
Expand Down
Loading

0 comments on commit 3dfeae0

Please sign in to comment.