Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ESLint to v9 and prettier to v3 #80

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20']
node: ['20', '22']

container:
image: node:${{ matrix.node }}-alpine
Expand Down
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ extend the [eslint-recommended](https://github.com/eslint/eslint/blob/master/con
as well as the [overrides](https://github.com/prettier/eslint-config-prettier/blob/master/index.js)
that allow the [Prettier](https://prettier.io) pretty-printer to reformat the code without conflicts.

## Status

[![npm version][npm-image]][npm-url]

## Installation

```sh
Expand All @@ -15,12 +19,31 @@ npm install eslint eslint-config-uphold prettier --save-dev

## Usage

Create an `.eslintrc.yml` file with the following content:
Create an `eslint.config.js` file with the following content:

```js
const uphold = require('eslint-config-uphold');

module.exports = uphold;
```

If you'd like to extend the config, you can do so like this:

```js
const uphold = require('eslint-config-uphold');
const yourPlugin = require('your-eslint-plugin');

```yaml
extends: uphold
module.exports = {
...uphold,
plugins: {
...uphold[0].plugins,
yourPlugin,
}
};
```

See [Using a Shareable Config](https://eslint.org/docs/latest/extend/shareable-configs#using-a-shareable-config) for more information.

Add a `lint` command to the `scripts` section of your `package.json`, like so:

```json
Expand Down Expand Up @@ -62,3 +85,6 @@ Run it by clicking the "Run workflow" button.
## License

MIT

[npm-image]: https://img.shields.io/npm/v/eslint-config-uphold.svg
[npm-url]: https://www.npmjs.com/package/eslint-config-uphold
8 changes: 8 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const uphold = require('./src');

module.exports = [
...uphold,
{
ignores: ['!**/.release-it.js', 'test/fixtures']
}
];
35 changes: 20 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,42 @@
"test": "mocha $npm_package_options_mocha"
},
"dependencies": {
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@babel/core": "^7.26.0",
"@babel/eslint-parser": "^7.25.9",
"@eslint/js": "^9.17.0",
"@stylistic/eslint-plugin-js": "^2.12.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.2.5",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-jsdoc": "^50.6.1",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-promise": "^7.2.1",
"eslint-plugin-rulesdir": "^0.2.2",
"eslint-plugin-sort-destructure-keys": "^1.6.0",
"eslint-plugin-sort-imports-requires": "^1.0.2",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"eslint-plugin-sort-imports-requires": "2.0.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-sql-template": "^2.0.0"
"eslint-plugin-sql-template": "https://github.com/uphold/eslint-plugin-sql-template#support/fix-unsafe-templates",
"globals": "^15.14.0"
},
"devDependencies": {
"@types/eslint": "^9.6.1",
"@uphold/github-changelog-generator": "^3.4.0",
"eslint": "^8.57.0",
"eslint": "^9.17.0",
"mocha": "^10.4.0",
"pre-commit": "^1.2.2",
"prettier": "^2.8.7",
"release-it": "^17.2.1",
"prettier": "^3.4.2",
"release-it": "^17.11.0",
"should": "^13.2.3"
},
"peerDependencies": {
"eslint": "^8.20.0",
"prettier": "^2.8.7"
"eslint": ">=9.0.0",
"prettier": ">=3.0.0"
},
"pre-commit": [
"lint"
],
"engines": {
"node": ">=18"
"node": ">=20"
},
"options": {
"mocha": "-t 10000 --require should test"
Expand Down
Loading