20.0.0 • Published 1 month ago

eslint-config-sweet v20.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
1 month ago

eslint-config-sweet

latest version on npm npm downloads a month eslint peer dependency typescript peer dependency package license

ESLint shareable config for the most sweet-ass vanilla JavaScript. 🤙🏼

Installation

yarn add eslint-config-sweet eslint typescript --dev

Usage

As soon as you've installed the config, you can extend from it. To do that, find your config and add the following line:

module.exports = {
  extends: "sweet"
};

Pro Tip for VS Code

To make your experience even better, Microsoft has added a rad feature to VS Code that makes cleaning up import and export statements a breeze! Go to your user settings via ⌘ + ⇧ + p, then type user json, and hit enter. Add "source.organizeImports": "always" to "editor.codeActionsOnSave" as seen here in the VS Code docs, and save that bad boy.

Boom, VS Code will now automatically remove unused imports and exports, as well as sort them for ya! 🤙🏼

How will my code look when using this?

Sweet, man. That's the point. On a more serious note though: It mostly, of course, enforces consistency, even though it may not look like it the first few moments. It will make your code feel more lightweight and nudge you towards using more modern APIs and good practices, while maintaining readability and keeping complexity down.

Nice to know

sweet will clash with your Prettier setup, there's no way around it. This config is using @stylistic/eslint-plugin for formatting, and eslint-config-prettier turns off ESLint's built-in, but deprecated, formatting rules.

While I generally agree with the different concerns of linters and formatters, Prettier just isn't configurable enough for my liking. And this is by design, as it is meant to be an opinionated, zero-config, drop-in solution with limited options. Until we have a more flexible formatter available, using ESLint in this way seems to be the way to go.

License

MIT

20.0.0

1 month ago

19.0.1

2 months ago

19.0.0

2 months ago

19.0.2

2 months ago

15.0.0

6 months ago

14.0.0

6 months ago

13.0.0

6 months ago

18.0.0

5 months ago

17.0.1

6 months ago

17.0.0

6 months ago

16.0.2

6 months ago

16.0.1

6 months ago

16.0.0

6 months ago

16.0.3

6 months ago

12.0.0

9 months ago

10.0.0

1 year ago

11.0.2

1 year ago

11.0.0

1 year ago

11.0.1

1 year ago

9.0.1

2 years ago

9.0.0

2 years ago

8.0.1

2 years ago

8.0.0

2 years ago

7.0.0

2 years ago

6.0.0

3 years ago

5.0.0

3 years ago

4.0.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago