javascript icon indicating copy to clipboard operation
javascript copied to clipboard

Enforce rule 7.9 in eslint (default-param-last)

Open vieira opened this issue 6 years ago • 10 comments

Enforces the existing airbnb style guide rule about default parameters coming last in eslint by using default-param-last.

As this rule was introduced in ESLint 6.4.0, I bumped the eslint version in package.json but I am not sure if that is the right thing to do? This is my first PR in this repository. 😨

vieira avatar Oct 03 '19 10:10 vieira

I just realized that since this rule isn't in eslint 5, this would in fact be a breaking change - so it can't come in enabled just yet.

ljharb avatar Oct 03 '19 15:10 ljharb

Ahh I see, sorry, should I drop eslint 5 from the dependencies and you will merge this sometime in the future or is there other way of doing things?

vieira avatar Oct 03 '19 19:10 vieira

Typically I add all new rules as "off" as I update eslint versions, and leave a TODO comment to enable them - but they are not enabled until the next major release.

ljharb avatar Oct 03 '19 19:10 ljharb

@ljharb Understood, let me know if you need anything else from me!

vieira avatar Oct 03 '19 22:10 vieira

Ideally this can stay open until we’re ready to do a semver-major.

ljharb avatar Mar 28 '21 17:03 ljharb

Can this be merged or closed now?

vieira avatar Apr 04 '22 13:04 vieira

Can this be merged or closed now?

vieira avatar Apr 04 '22 13:04 vieira

@vieira we're still not ready to do a semver-major, so i'd prefer to leave it open.

ljharb avatar Apr 04 '22 14:04 ljharb

@ljharb you already did, some months ago. This change requires eslint 6.4+ and eslint-config-airbnb requires 8 since 19 ([breaking] support eslint 8; drop eslint < 7).

vieira avatar Apr 04 '22 14:04 vieira

Oops, good catch. I should have included this in that release. you're right; i'll merge this later today.

ljharb avatar Apr 04 '22 15:04 ljharb