eslint-config-clarity
eslint-config-clarity
Collection of ESLint configs to ensure code consistency and clarity!
Installation
Simply install the eslint-config-clarity package through your package manager,
alongside ESLint and Prettier. No need to mess around with peer dependencies or
anything.
$ yarn add -D eslint-config-clarity eslint prettier
# or
$ npm i --save-dev eslint-config-clarity eslint prettier
If you have a TypeScript project and plan on using a TypeScript config, make
sure that's installed. You will also need to install
eslint-import-resolver-typescript yourself, for path resolution to work.
After installing the config and required packages, simply add
"extends": "clarity" to your .eslintrc, or specify the name of one of the
presets depending on the project.
Integrations
It is recommended to copy the .vscode (if using
VSCode), .editorconfig,
and .prettierrc to your project's directory, and also install
the extensions recommended in
.vscode/extensions.json.
The VSCode settings will enable ESLint for JavaScript and TypeScript files, and sets Prettier as the default formatter for several filetypes, as well as enabling auto-fix and auto-formatting on save.
If you're not using VSCode as your code editor, it is recommended that you find equivalent plugins and settings for your editor of choice.
Presets
- clarity The default configuration provided by this package, for use with any regular JavaScript project.
- clarity/react Configuration for use with any JavaScript + React project.
- clarity/vue Configuration for use with any JavaScript + Vue 3 project.
- clarity/vue-2 Configuration for use with any JavaScript + Vue 2 project.
- clarity/typescript Configuration for use with any regular TypeScript project.
- clarity/react-typescript Configuration for use with any TypeScript + React project.
- clarity/vue-typescript Configuration for use with any TypeScript + Vue 3 project.
- clarity/vue-2-typescript Configuration for use with any TypeScript + Vue 2 project.
Base Presets
Presets ending with -base are used to reduce duplication, and contain just the
rules that strictly pertain to their name (e.g. TypeScript rules in
typescript-base, Vue rules in vue-base) which then get extended in the full
configs in various combinations depending on what's needed.
License
This repository is licensed under the MIT License.
Related Packages
ESLint standard config for Vue.js version 3 projects with Typescript support
DevilTea's opinionated ESLint flat config for JavaScript, TypeScript, and Vue.
Shared ESLint (flat config) and Prettier configs for TypeScript, React, Vue and...
Version History
| Version | Released | License |
|---|---|---|
| 1.0.6 | MIT | |
| 1.0.5 | MIT | |
| 1.0.4 | MIT | |
| 1.0.3 | MIT | |
| 1.0.2 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT | |
| 0.6.1 | MIT | |
| 0.6.0 | MIT | |
| 0.5.0 | MIT | |
| 0.4.8 | MIT | |
| 0.4.7 | MIT | |
| 0.4.6 | MIT | |
| 0.4.5 | MIT | |
| 0.4.4 | MIT | |
| 0.4.3 | MIT | |
| 0.4.2 | MIT | |
| 0.4.1 | MIT | |
| 0.4.0 | MIT | |
| 0.3.3 | MIT | |
| 0.3.2 | MIT | |
| 0.3.1 | MIT | |
| 0.3.0 | MIT | |
| 0.2.13 | MIT | |
| 0.2.12 | MIT | |
| 0.2.11 | MIT | |
| 0.2.10 | MIT | |
| 0.2.9 | MIT | |
| 0.2.8 | MIT | |
| 0.2.7 | MIT |
Showing the latest 30 of 43. See every release on npm
Pre-releases (10)
| Version | Released | License |
|---|---|---|
| 1.0.0-rc.5 | MIT | |
| 1.0.0-rc.4.2 | MIT | |
| 1.0.0-rc.4 | MIT | |
| 1.0.0-rc.3 | MIT | |
| 1.0.0-rc.2 | MIT | |
| 1.0.0-rc.1 | MIT | |
| 1.0.0-rc.0 | MIT | |
| 1.0.0-beta.8 | MIT | |
| 1.0.0-beta.7 | MIT | |
| 1.0.0-beta.6 | MIT |