@@ -4,19 +4,16 @@ const path = require('node:path')
4
4
5
5
const { includeIgnoreFile } = require ( '@eslint/compat' )
6
6
const js = require ( '@eslint/js' )
7
+ const constants = require ( '@socketsecurity/registry/lib/constants' )
8
+ const tsParser = require ( '@typescript-eslint/parser' )
7
9
const nodePlugin = require ( 'eslint-plugin-n' )
8
10
const sortDestructureKeysPlugin = require ( 'eslint-plugin-sort-destructure-keys' )
9
11
const unicornPlugin = require ( 'eslint-plugin-unicorn' )
10
12
const tsEslint = require ( 'typescript-eslint' )
11
- const tsParser = require ( '@typescript-eslint/parser' )
12
13
13
14
const gitignorePath = path . resolve ( __dirname , '.gitignore' )
14
15
const prettierignorePath = path . resolve ( __dirname , '.prettierignore' )
15
16
16
- const {
17
- engines : { node : nodeRange }
18
- } = require ( './package.json' )
19
-
20
17
const sharedPlugins = {
21
18
'sort-destructure-keys' : sortDestructureKeysPlugin ,
22
19
unicorn : unicornPlugin
@@ -111,8 +108,9 @@ module.exports = [
111
108
'n/no-unsupported-features/node-builtins' : [
112
109
'error' ,
113
110
{
114
- ignores : [ 'test.describe' ] ,
115
- version : nodeRange
111
+ ignores : [ 'test' , 'test.describe' ] ,
112
+ // Lazily access constants.maintainedNodeVersions.
113
+ version : constants . maintainedNodeVersions . previous
116
114
}
117
115
] ,
118
116
'n/prefer-node-protocol' : [ 'error' ] ,
0 commit comments