Natural Preference for Minification
Miss any of our Open RFC calls?Watch the recordings here! »

eslint-plugin-do-this

1.0.0 • Public • Published

Do This

A set of ESLint rules to make your code better.

Included Rules

no-inhuman-const

The only value of higher-order programming languages is clearly communicating with other developers. Only strings and numbers are actually constant values, and are the only values that should be assigned to const when it's instantiated.

Read Stop Writing Inhuman const.

no-multiple-exit

Functions should have a single entry point and a single exit point. More than one exit point is a recipe for buggy edge cases and untraceable code execution paths.

uppercase-const

A common pattern is to use an upper-, snake-case name for constants. This makes them easy to pick out, and most syntax highlighters will provide a special color

Install

npm install eslint-plugin-do-this

Use

Add the plugin to your ESLint configuration:

"plugins": [
    "do-this"
]

Then, enable the rules you want:

"rules": {
    "do-this/no-inhuman-const": "error",
    "do-this/no-multiple-exit": "error",
    "do-this/uppercase-const": "error"
}

Install

npm i eslint-plugin-do-this

DownloadsWeekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

17 kB

Total Files

14

Last publish

Collaborators

  • avatar