Question: I have added swiftLint to my Project and also added .swiftlint.yml file with all rules but some of rule of file not working in my project like excluded and line length. i want to exclude pod from Linting so i have added following code in .swiftlint.yml file

`excluded: # paths to ignore during linting. Takes precedence over`included`.
 - Carthage
 - Pods`

in my .yml file but pods is still not ignore.

Anyone have any idea where i done mistake.

Thanks in Advance

Answer: 
I can't really understand what do you want to achieve, however, I want to note:

1. Within the callback function you can check the condition of your values.
2. Return the values. At the moment you are not returning anything, and probably you are have an array with `undefined` values
You can use ternary operator like below for cleaner code

```
let results = dates.filter(e => {
  return (
    is_filter_by_arrival_date ? 
    // verify your condition for arrival date
    e.arrival_date <= arrival_to && e.arrival_date >= arrival_to 
    : 
    true
  ) && (
    is_filter_by_dept_date ? 
    // verify your condition for dept date
    : 
    true
  )
})

```