Skip to content

Commit

Permalink
chore(deps): upgrade ESLint to v9 (#200)
Browse files Browse the repository at this point in the history
Co-authored-by: Timothy Jones <[email protected]>
  • Loading branch information
gian1200 and TimothyJones authored Oct 21, 2024
1 parent 7168feb commit 890019a
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 55 deletions.
49 changes: 0 additions & 49 deletions .eslintrc

This file was deleted.

67 changes: 67 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import globals from "globals";
import js from "@eslint/js";
import jest from "eslint-plugin-jest";
import eslintConfigPrettier from "eslint-config-prettier";

/**
* @type {import("eslint").Linter.Config}
*/
export default [
{
"ignores": [".git/", ".github/", ".husky/", ".scannerwork/", ".vscode/", "coverage/", "node_modules/"],
"name": "Files to ignore"
},
{
...eslintConfigPrettier,
"name": "Prettier"
},
{
...js.configs.recommended,
"files": ["**/*.{js,cjs,mjs}"],
"languageOptions": {
"ecmaVersion": 2023
},
"name": "JavaScript files",
"rules": {
...js.configs.recommended.rules,
"no-var": "error",
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "_.*"
}
]
}
},
{
"files": ["**/*.mjs"],
"languageOptions": {
"sourceType": "module"
},
"name": "JavaScript modules"
},
{
"files": ["**/*.{js,cjs,mjs}"],
"languageOptions": {
"globals": {
...globals.node
}
},
"name": "Node.js files"
},
{
...jest.configs["flat/recommended"],
"files": ["test/**/*{spec,test}.{js,cjs,mjs}", "test/mocks/jest-mocks.js"],
"languageOptions": {
"globals": {
...globals.jest
}
},
"name": "Test files",
"rules": {
...jest.configs["flat/recommended"].rules,
"jest/prefer-expect-assertions": "off",
"jest/expect-expect": "off"
}
}
];
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ module.exports = async function standardVersion(argv) {
: false,
};
break;
// eslint-disable-next-line no-unused-vars
} catch (err) {
/* This probably shouldn't be empty? */
}
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "replacement for `npm version` with automatic CHANGELOG generation",
"bin": "bin/cli.js",
"scripts": {
"fix": "eslint . --fix",
"posttest": "eslint . && npm run format:check",
"eslint": "eslint .",
"eslint:fix": "npm run eslint -- --fix",
"posttest": "npm run eslint && npm run format:check",
"format:base": "prettier \"./**/*.{ts,js}\"",
"format:fix": "npm run format:base -- --write",
"format:check": "npm run format:base -- --check",
Expand Down Expand Up @@ -56,12 +57,13 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"eslint": "^8.57.1",
"@eslint/js": "^9.13.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-n": "^17.11.1",
"eslint-plugin-promise": "^7.1.0",
"jest": "^29.7.0",
"jest-serial-runner": "^1.2.1",
"prettier": "^3.3.3",
Expand Down

0 comments on commit 890019a

Please sign in to comment.