Skip to content

Commit c054316

Browse files
risantosfranciscocardoso
authored andcommitted
Update eslint-config-uphold@6.5.2 and ESLint config
- Bump minimum Node.js version to 20
1 parent 0686323 commit c054316

5 files changed

Lines changed: 1030 additions & 60 deletions

File tree

.eslintrc.yaml

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

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node: [18, 20]
10+
node: [20, 22]
1111
name: Node v${{ matrix.node }}
1212

1313
steps:
@@ -20,7 +20,7 @@ jobs:
2020
node-version: ${{ matrix.node }}
2121

2222
- name: Install dependencies
23-
run: yarn
23+
run: yarn install --frozen-lockfile
2424

2525
- name: Run lint
2626
run: yarn lint

eslint.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use strict';
2+
3+
/**
4+
* Module dependencies.
5+
*/
6+
7+
const { defineConfig } = require('eslint/config');
8+
const uphold = require('eslint-config-uphold');
9+
10+
/**
11+
* `ESLint` configuration.
12+
*/
13+
14+
module.exports = defineConfig([
15+
uphold,
16+
{
17+
files: ['src/asserts/*.js'],
18+
name: 'validator.js-asserts/config',
19+
rules: {
20+
// Add exception to the `no-underscore-dangle` rule required by validator.js to set the class name.
21+
'no-underscore-dangle': ['error', { allow: ['__class__'] }]
22+
}
23+
},
24+
{
25+
name: 'validator.js-asserts/tests',
26+
rules: {
27+
'sql-template/no-unsafe-query': 'off'
28+
}
29+
}
30+
]);

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
],
3333
"main": "./src/index.js",
3434
"scripts": {
35-
"lint": "uphold-scripts lint .",
35+
"lint": "eslint",
3636
"release": "release-it",
3737
"test": "uphold-scripts test"
3838
},
@@ -42,16 +42,19 @@
4242
},
4343
"devDependencies": {
4444
"@uphold/github-changelog-generator": "^3.4.0",
45-
"release-it": "^17.0.1",
4645
"abavalidator": "^2.0.1",
4746
"bignumber.js": "^9.0.0",
4847
"cpf": "^2.0.1",
4948
"creditcard": "^0.1.2",
5049
"curp": "^1.2.3",
50+
"eslint": "~9.28.0",
51+
"eslint-config-uphold": "^6.5.2",
5152
"google-libphonenumber": "^3.2.35",
5253
"iban": "0.0.6",
5354
"isoc": "0.0.1",
5455
"moment": "^2.29.1",
56+
"prettier": "^3.5.3",
57+
"release-it": "^17.0.1",
5558
"sinon": "^11.1.1",
5659
"tin-validator": "^1.0.0",
5760
"uk-modulus-checking": "0.0.3",
@@ -61,7 +64,7 @@
6164
"validator": "^13.7.0"
6265
},
6366
"engines": {
64-
"node": ">=18"
67+
"node": ">=20"
6568
},
6669
"optionalPeerDependencies": {
6770
"abavalidator": ">=2 <3",

0 commit comments

Comments
 (0)