> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dont-Use-With

#### Sourcery rule id: `dont-use-with`

#### Description

Avoid using `with` statements.


#### Match

```javascript
with (thing) {
  y = 5;
  x = 2;
}
```



#### Explanation

The `with` statement is deprecated, and may cease to work in browsers at any time.

`with` gives short-hand access to an object's properties, but the scope is inconsistent and it's better just to use normal attribute setting.
