Skip to content

Commit

Permalink
Bump ESLint and related dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Nov 4, 2024
1 parent 59e78af commit 0cf5f2d
Show file tree
Hide file tree
Showing 7 changed files with 1,098 additions and 1,333 deletions.
8 changes: 7 additions & 1 deletion .depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
"@lavamoat/allow-scripts",
"@lavamoat/preinstall-always-fail",
"@metamask/auto-changelog",
"@metamask/eslint-config",
"@metamask/eslint-config-*",
"@types/*",
"@yarnpkg/types",
"eslint-config-*",
"eslint-import-resolver-typescript",
"eslint-plugin-*",
"prettier-plugin-packagejson",
"ts-node",
"typedoc"
"typedoc",
"typescript-eslint"
]
}
50 changes: 0 additions & 50 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- uses: MetaMask/action-create-release-pr@v3
- uses: MetaMask/action-create-release-pr@v4
with:
release-type: ${{ github.event.inputs.release-type }}
release-version: ${{ github.event.inputs.release-version }}
Expand Down
5 changes: 4 additions & 1 deletion .prettierrc.js → .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// All of these are defaults except singleQuote, but we specify them
// for explicitness
module.exports = {
const config = {
quoteProps: 'as-needed',
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
plugins: ['prettier-plugin-packagejson'],
};

export default config;
47 changes: 47 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import base, { createConfig } from '@metamask/eslint-config';
import jest from '@metamask/eslint-config-jest';
import nodejs from '@metamask/eslint-config-nodejs';
import typescript from '@metamask/eslint-config-typescript';

const config = createConfig([
{
ignores: ['!.eslintrc.js', '!.prettierrc.js', 'dist/', 'docs/', '.yarn/'],
},

{
extends: base,

languageOptions: {
sourceType: 'module',
parserOptions: {
tsconfigRootDir: import.meta.dirname,
project: ['./tsconfig.json'],
},
},

settings: {
'import-x/extensions': ['.js', '.mjs'],
},
},

{
files: ['**/*.ts'],
extends: typescript,
},

{
files: ['**/*.js', '**/*.cjs'],
extends: nodejs,

languageOptions: {
sourceType: 'script',
},
},

{
files: ['**/*.test.ts', '**/*.test.js'],
extends: [jest, nodejs],
},
]);

export default config;
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"lint:changelog": "auto-changelog validate --prettier",
"lint:constraints": "yarn constraints",
"lint:dependencies": "depcheck && yarn dedupe",
"lint:eslint": "eslint . --cache --ext js,cjs,ts",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:constraints --fix && yarn lint:misc --write && yarn lint:dependencies && yarn lint:changelog",
"lint:misc": "prettier '**/*.json' '**/*.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore --no-error-on-unmatched-pattern",
"prepack": "./scripts/prepack.sh",
Expand All @@ -48,34 +48,34 @@
"@arethetypeswrong/cli": "^0.15.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.0.0",
"@metamask/auto-changelog": "^3.4.3",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/auto-changelog": "^4.0.0",
"@metamask/eslint-config": "^14.0.0",
"@metamask/eslint-config-jest": "^14.0.0",
"@metamask/eslint-config-nodejs": "^14.0.0",
"@metamask/eslint-config-typescript": "^14.0.0",
"@ts-bridge/cli": "^0.6.0",
"@types/jest": "^28.1.6",
"@types/node": "^18.18",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^6.21.0",
"@yarnpkg/types": "^4.0.0-rc.52",
"depcheck": "^1.4.3",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "~2.26.0",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-jsdoc": "^39.9.1",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint": "^9.11.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import-x": "^4.3.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-jsdoc": "^50.2.4",
"eslint-plugin-n": "^17.10.3",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-promise": "^7.1.0",
"jest": "^28.1.3",
"jest-it-up": "^2.0.2",
"prettier": "^2.7.1",
"prettier": "^3.3.3",
"prettier-plugin-packagejson": "^2.3.0",
"ts-jest": "^28.0.7",
"ts-node": "^10.7.0",
"typedoc": "^0.23.15",
"typescript": "~5.4.5"
"typedoc": "^0.26.11",
"typescript": "~5.4.5",
"typescript-eslint": "^8.6.0"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading

0 comments on commit 0cf5f2d

Please sign in to comment.