fileoverview import { HintContext , IHint } from 'hint' ; import { debug as d } from '@hint/utils-debug' ; import { Severity } from '@hint/utils-types' ; import { WebpackConfigEvents , WebpackConfigInvalidConfiguration } from '@hint/parser-webpack-config' ; import meta from './meta/is-valid' ; const debug = d ( __filename ) ; export default class WebpackConfigIsValid implements IHint { public static readonly meta = meta ; public constructor ( context ) { const invalidConfigurationFile = ( webpackConfigInvalid ) => { const { error , resource } = webpackConfigInvalid ; debug ( `'parse::error::webpack-config::configuration' received` ) ; context . report ( resource , error . message , { severity : Severity . error } ) ; } ; context . on ( 'parse::error::webpack-config::configuration' , invalidConfigurationFile ) ; } }