Problem
You tried to integrate the WProofreader plugin for CKEditor 5: put the webspellchecker folder downloaded through NPM into the lib directory, then imported the wproofreader.js in your js where where you are initializing CKEditor 5. But as soon as you run the build, it gives you the error from the wproofreader.js.
Below is an example of such an error:
ESLintError in plugin "gulp-eslint"
Message:
'WEBSPELLCHECKER' is not defined.
Details:
fileName: C:\...\...\...\...\...\...\...\src\lib\@webspellchecker\wproofreader-ckeditor5\src\wproofreader.js
lineNumber: 221
domainEmitter: [object Object]
domainThrown: false
Solution
The problem is with custom list of rules in your ESLint. We have a writing rule for such a case, but our ESLint config is not included in the npm package. Thus, you have to modify your ESLint so that it does not throw such an error. For example, you can add the ignoring of the WEBSPELLCHECKER variable or ignoring such type of the errors in general.