# Exclude directory/file for eslint

**URL:** https://discourse.roots.io/t/exclude-directory-file-for-eslint/10037
**Category:** sage
**Tags:** eslint
**Created:** 2017-07-20T14:16:06Z
**Posts:** 2

## Post 1 by @strarsis — 2017-07-20T14:16:06Z

The sage 9 based theme should use a library that has been built from source and copied to assets/lib folder. - On build the files should be copied to dist/.  
However, eslint complains about linting errors in the library files.  
How can I exclude the library folder so eslint never lints it during build?

---

## Post 2 by @strarsis — 2017-07-21T14:13:20Z

I solved it by adding a new exclude property to rules object for `use: 'eslint',`:  
`exclude: [/(lib\/somelib)/],`
