mirror of
https://github.com/dependabot/fetch-metadata.git
synced 2026-03-12 18:07:12 -04:00
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).
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
node_modules
|
||||
dist
|
||||
20
.eslintrc.js
20
.eslintrc.js
@@ -1,20 +0,0 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
commonjs: true,
|
||||
es2021: true,
|
||||
jest: true,
|
||||
},
|
||||
extends: [
|
||||
'standard'
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 12
|
||||
},
|
||||
plugins: [
|
||||
'@typescript-eslint'
|
||||
],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
42
eslint.config.mjs
Normal file
42
eslint.config.mjs
Normal file
@@ -0,0 +1,42 @@
|
||||
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/',
|
||||
],
|
||||
}]);
|
||||
3714
package-lock.json
generated
3714
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -28,18 +28,20 @@
|
||||
"pluralize": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.0",
|
||||
"@eslint/js": "^9.22.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.11.20",
|
||||
"@types/yargs": "^17.0.32",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
||||
"@typescript-eslint/parser": "^7.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
||||
"@typescript-eslint/parser": "^8.27.0",
|
||||
"@vercel/ncc": "^0.38.3",
|
||||
"dotenv": "^16.4.5",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-standard": "^17.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint": "^9.22.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-promise": "^7.2.1",
|
||||
"globals": "^16.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"nock": "^13.5.3",
|
||||
"ts-jest": "^29.1.2",
|
||||
|
||||
Reference in New Issue
Block a user