Skip to content

Commit

Permalink
feat: upgrade eslint to v9.15 (#753)
Browse files Browse the repository at this point in the history
* feat: upgrade eslint to v9.15

* fix: address linter errors
  • Loading branch information
ecshreve authored Nov 23, 2024
1 parent e6e7877 commit 7169b60
Show file tree
Hide file tree
Showing 5 changed files with 3,225 additions and 2,718 deletions.
9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// @ts-check

import eslint from "@eslint/js";
import eslintPluginJest from "eslint-plugin-jest";
import json from "eslint-plugin-json";
import globals from "globals";

export default [
{
name: "base",
ignores: ["**/node_modules/**", "**/dist/**", "**/built/**"],
},
{
name: "eslint/recommended-with-overrides",
files: ["**/*.js"],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
rules: {
...eslint.configs.recommended.rules,
"no-unused-vars": "warn",
"no-undef": "warn",
},
},
{
name: "jest/recommended",
files: ["**/*.test.{js,ts}"],
ignores: ["**/*.json"],
...eslintPluginJest.configs["flat/recommended"],
},
{
name: "json/recommended-with-comments",
files: ["**/*.json"],
...json.configs["recommended"],
rules: {
"json/*": ["warn", { allowComments: false }],
},
},
];
Loading

0 comments on commit 7169b60

Please sign in to comment.