Exclude file from eslint and from webpack (no checking for js errors and no compile)

I am trying to add a jquery plugin (social-feed), but I am getting crazy with the amount of alerts/errors that I am having, so I would like to try to exclude this js file from eslint and from webpack.

my scope is to have the exact same file (no compile and no checking for js errors) that i have in the /resources/assets/scripts/socialfeed.js inside the /dist/scripts/ folder, and then enqueuing this additional JS.

I tried these steps:

  • Created the socialfeed.js within the resources/assets/scripts/ directory
  • modified the resources/assets/config.json with this file
  • Enqueued the new file in app/setup.php
  • run yarn build

after that I can see my socialfeed.js in the code but with eslint errors and with the webpack’s modifies.

So I tried to exclude this file from eslint with /* eslint-disable */ at the top of the socialfeed.js and I also I created a .eslintignore file in the theme root, with this line of code /resources/assets/scripts/socialfeed.js

But I am still getting error

Module build failed:
1727 : if (img.width < options.media_min_width) {
1728 :     image.hide();
1729 : }
1730 : // garbage collect img
1731 : delete img;
                               ^
Deleting local variable in strict mode (1731:24)

How can I say to Sage9, to don’t modify this file, so I can have socialfeed.js in the /dist/scripts/ (no compile, no eslint errors) after I run yarn build?
thanks