Skip to content

Commit 89d70d8

Browse files
committed
Add eslint backwards compatibility.
1 parent e60ccf2 commit 89d70d8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { FlatCompat } = require('@eslint/eslintrc');
22
const compat = new FlatCompat({ baseDirectory: __dirname });
33

4-
const eslintrc = compat.config({
4+
let eslintrc = compat.config({
55
// The following path may have to be adjusted to your directory structure.
66
extends: './src/Utilities/Lombiq.NodeJs.Extensions/Lombiq.NodeJs.Extensions/config/.eslintrc.lombiq-base.js',
77

@@ -10,4 +10,8 @@ const eslintrc = compat.config({
1010
},
1111
});
1212

13+
if (fs.existsSync('./.eslintrc.js')) {
14+
eslintrc = require('./.eslintrc.js');
15+
}
16+
1317
module.exports = [ ...eslintrc ];
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { FlatCompat } = require('@eslint/eslintrc');
22
const compat = new FlatCompat({ baseDirectory: __dirname });
33

4-
const eslintrc = compat.config({
4+
let eslintrc = compat.config({
55
// The following path may have to be adjusted to your directory structure.
66
extends: './node_modules/nodejs-extensions/config/.eslintrc.lombiq-base.js',
77

@@ -10,4 +10,8 @@ const eslintrc = compat.config({
1010
},
1111
});
1212

13+
if (fs.existsSync('./.eslintrc.js')) {
14+
eslintrc = require('./.eslintrc.js');
15+
}
16+
1317
module.exports = [ ...eslintrc ];

0 commit comments

Comments
 (0)