Files
fetch-metadata/eslint.config.mjs
Jeff Widman 553e555f81 Bump to ESLint 9 (#606)
This bumps to ESLint 9:

* Bump the main `eslint` package to v9
* Remove the `eslint-config-standard` package as it doesn't yet support
  ESLint 9 and doesn't appear to be actively maintained... I considered
  some of the alternatives, but they've got some drama attached (https://github.com/standard/standard/issues/1948)
  so it seemed simplest for now to not worry about replacing it. This is
  a linter, so it's easy to switch to a different config if we want to
  later.
* Migrate to the new [Flat config format](https://eslint.org/docs/user-guide/configuring/configuration-files#using-the-flat-format).
2025-03-21 11:25:45 -07:00

43 lines
1.1 KiB
JavaScript

import { defineConfig } from "eslint/config";
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 defineConfig([{
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
globals: {
...globals.browser,
...globals.commonjs,
...globals.jest,
},
parser: tsParser,
ecmaVersion: 12,
sourceType: "script",
},
rules: {},
}, {
ignores: [
'dist/',
'lib/',
'node_modules/',
'jest.config.js',
'repo/',
'output/',
],
}]);