fullstacksjs / eslint-config

Fullstacks eslint config
MIT License
42 stars 3 forks source link

Underscore support #11

Closed AmirabbasJ closed 1 year ago

AmirabbasJ commented 1 year ago

I thought maybe having underscore names as allowed ignored names might be a good idea

these are some examples that should match IMO:

const _ = 2; // this variable is a valid ignored name
type Axis = [number, number, number];
const axis: Axis = [10, 2, 8];
const [x, _, z] = axis; // this variable is a valid ignored name
console.log(x + z);
type Index = [number, number, number, number];
function sumFirstAndLast([first, _, __, forth]: Index) {
  return first + forth;
}
ASafaeirad commented 1 year ago

Thanks