eslint-config-evil-vue
Version:
eslint-config-hardcore inspired ultra strict VueJS compatible ESLint config
35 lines (25 loc) • 1.52 kB
Markdown
# 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](LICENSE)