Skip to content

Commit aaf5357

Browse files
authored
Bump ESLint and related dependencies (#254)
* Bump ESLint and related dependencies * Remove unnecessary ignores
1 parent 59e78af commit aaf5357

File tree

7 files changed

+1098
-1333
lines changed

7 files changed

+1098
-1333
lines changed

.depcheckrc.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
"@lavamoat/allow-scripts",
44
"@lavamoat/preinstall-always-fail",
55
"@metamask/auto-changelog",
6+
"@metamask/eslint-config",
7+
"@metamask/eslint-config-*",
68
"@types/*",
79
"@yarnpkg/types",
10+
"eslint-config-*",
11+
"eslint-import-resolver-typescript",
12+
"eslint-plugin-*",
813
"prettier-plugin-packagejson",
914
"ts-node",
10-
"typedoc"
15+
"typedoc",
16+
"typescript-eslint"
1117
]
1218
}

.eslintrc.js

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/create-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/setup-node@v4
3434
with:
3535
node-version-file: '.nvmrc'
36-
- uses: MetaMask/action-create-release-pr@v3
36+
- uses: MetaMask/action-create-release-pr@v4
3737
with:
3838
release-type: ${{ github.event.inputs.release-type }}
3939
release-version: ${{ github.event.inputs.release-version }}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// All of these are defaults except singleQuote, but we specify them
22
// for explicitness
3-
module.exports = {
3+
const config = {
44
quoteProps: 'as-needed',
55
singleQuote: true,
66
tabWidth: 2,
77
trailingComma: 'all',
8+
plugins: ['prettier-plugin-packagejson'],
89
};
10+
11+
export default config;

eslint.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import base, { createConfig } from '@metamask/eslint-config';
2+
import jest from '@metamask/eslint-config-jest';
3+
import nodejs from '@metamask/eslint-config-nodejs';
4+
import typescript from '@metamask/eslint-config-typescript';
5+
6+
const config = createConfig([
7+
{
8+
ignores: ['dist/', 'docs/', '.yarn/'],
9+
},
10+
11+
{
12+
extends: base,
13+
14+
languageOptions: {
15+
sourceType: 'module',
16+
parserOptions: {
17+
tsconfigRootDir: import.meta.dirname,
18+
project: ['./tsconfig.json'],
19+
},
20+
},
21+
22+
settings: {
23+
'import-x/extensions': ['.js', '.mjs'],
24+
},
25+
},
26+
27+
{
28+
files: ['**/*.ts'],
29+
extends: typescript,
30+
},
31+
32+
{
33+
files: ['**/*.js', '**/*.cjs'],
34+
extends: nodejs,
35+
36+
languageOptions: {
37+
sourceType: 'script',
38+
},
39+
},
40+
41+
{
42+
files: ['**/*.test.ts', '**/*.test.js'],
43+
extends: [jest, nodejs],
44+
},
45+
]);
46+
47+
export default config;

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"lint:changelog": "auto-changelog validate --prettier",
3838
"lint:constraints": "yarn constraints",
3939
"lint:dependencies": "depcheck && yarn dedupe",
40-
"lint:eslint": "eslint . --cache --ext js,cjs,ts",
40+
"lint:eslint": "eslint . --cache",
4141
"lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies && yarn lint:changelog",
4242
"lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
4343
"prepack": "./scripts/prepack.sh",
@@ -48,34 +48,34 @@
4848
"@arethetypeswrong/cli": "^0.15.3",
4949
"@lavamoat/allow-scripts": "^3.0.4",
5050
"@lavamoat/preinstall-always-fail": "^2.0.0",
51-
"@metamask/auto-changelog": "^3.4.3",
52-
"@metamask/eslint-config": "^12.2.0",
53-
"@metamask/eslint-config-jest": "^12.1.0",
54-
"@metamask/eslint-config-nodejs": "^12.1.0",
55-
"@metamask/eslint-config-typescript": "^12.1.0",
51+
"@metamask/auto-changelog": "^4.0.0",
52+
"@metamask/eslint-config": "^14.0.0",
53+
"@metamask/eslint-config-jest": "^14.0.0",
54+
"@metamask/eslint-config-nodejs": "^14.0.0",
55+
"@metamask/eslint-config-typescript": "^14.0.0",
5656
"@ts-bridge/cli": "^0.6.0",
5757
"@types/jest": "^28.1.6",
5858
"@types/node": "^18.18",
59-
"@typescript-eslint/eslint-plugin": "^5.43.0",
60-
"@typescript-eslint/parser": "^6.21.0",
6159
"@yarnpkg/types": "^4.0.0-rc.52",
6260
"depcheck": "^1.4.3",
63-
"eslint": "^8.44.0",
64-
"eslint-config-prettier": "^8.8.0",
65-
"eslint-plugin-import": "~2.26.0",
66-
"eslint-plugin-jest": "^27.2.2",
67-
"eslint-plugin-jsdoc": "^39.9.1",
68-
"eslint-plugin-n": "^15.7.0",
69-
"eslint-plugin-prettier": "^4.2.1",
70-
"eslint-plugin-promise": "^6.1.1",
61+
"eslint": "^9.11.0",
62+
"eslint-config-prettier": "^9.1.0",
63+
"eslint-import-resolver-typescript": "^3.6.3",
64+
"eslint-plugin-import-x": "^4.3.0",
65+
"eslint-plugin-jest": "^28.8.3",
66+
"eslint-plugin-jsdoc": "^50.2.4",
67+
"eslint-plugin-n": "^17.10.3",
68+
"eslint-plugin-prettier": "^5.2.1",
69+
"eslint-plugin-promise": "^7.1.0",
7170
"jest": "^28.1.3",
7271
"jest-it-up": "^2.0.2",
73-
"prettier": "^2.7.1",
72+
"prettier": "^3.3.3",
7473
"prettier-plugin-packagejson": "^2.3.0",
7574
"ts-jest": "^28.0.7",
7675
"ts-node": "^10.7.0",
77-
"typedoc": "^0.23.15",
78-
"typescript": "~5.4.5"
76+
"typedoc": "^0.26.11",
77+
"typescript": "~5.4.5",
78+
"typescript-eslint": "^8.6.0"
7979
},
8080
"packageManager": "[email protected]",
8181
"engines": {

0 commit comments

Comments
 (0)