Release v0.2.0 #5

Merged
ksv741 merged 13 commits from krylov into main 2024-04-04 06:13:56 +03:00
Showing only changes of commit 3e908496b3 - Show all commits

View File

@ -1,7 +1,8 @@
import ESLintPlugin from 'eslint-webpack-plugin';
import path from 'path';
import semver from 'semver';
import type { WebpackOptions } from 'types';
import { hasPackage } from 'utils/helpers';
import { getPackageVersion, hasPackage } from 'utils/helpers';
const getEslintPlugin = (options: WebpackOptions) => {
const {
@ -11,7 +12,8 @@ const getEslintPlugin = (options: WebpackOptions) => {
} = {},
} = options;
if (!hasPackage('eslint') || eslintPlugin === 'off') {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (!hasPackage('eslint') || eslintPlugin === 'off' || semver.lt(getPackageVersion('eslint')!, '8.0.0')) {
return null;
}