mirror of
https://github.com/dependabot/fetch-metadata.git
synced 2026-03-12 18:07:12 -04:00
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).
43 lines
1.1 KiB
JavaScript
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/',
|
|
],
|
|
}]);
|