Skip to content

An ESLint config heavily inspired by eslint-config-hardcore, but with a few tweaks to make it compatible with VueJs. The ruleset has been slightly tweaked to my personal liking as well.

alexkramer98/eslint-config-evil-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eslint-config-evil-vue

What is it?

This is a config package for ESLint heavily inspired by https://github.com/EvgenyOrekhov/eslint-config-hardcore (version 19.10.1). A little stricter - thus: evil - but still very useful and compatible with VueJS.

What rules have changed as opposed to eslint-config-hardcore?

  • Removed eslint-plugin-putout.
  • Added VueJS support:
    • Uses plugin:vue/recommended for the strictest out-of-the-box Vue config.
    • Added Vuex support (made an exception for the state variable name) for some conflicting rules.
    • import '@/...' is encouraged.
    • Disabled import/no-anonymous-default-export for Vue components.
    • Changed all enabled rules of vue:recommended from warn to error.
  • Enforces single quotes instead of double quotes.
  • Uses 4 space indents instead of 2.
  • Semicolon is not allowed.
  • Loops of any kind are not allowed.
  • Require early return where applicable.
  • Console statements are allowed (generates a warning instead of an error), but only in the development environment. (You can/should use husky to lint your code using the production environment in a pre-commit hook.)
  • @TODO: comments are allowed (warning for dev, error for production)
  • Imports cannot be relative. Use @ for modules or @/ for the project root instead.
  • Require optional chaining where applicable.

Split rules

The rules are split over corresponding files. This makes it easier to locate rules and make changes.

License

MIT

About

An ESLint config heavily inspired by eslint-config-hardcore, but with a few tweaks to make it compatible with VueJs. The ruleset has been slightly tweaked to my personal liking as well.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published