package
Collection of ESLint configs to ensure code consistency and clarity!
npm install eslint-config-clarityGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Latest published Jul 27, 2023
latest
Estimated unpacked size across 64 packages.
26.7 MB+
Includes dependencies.
^9.3.1
10.4.2
^7.33.0
7.37.5
^2.27.5
2.32.0
^6.7.1
6.10.2
^5.0.0
5.5.7
^1.3.2
1.16.1
8.72.2
7.1.1
8.72.2
Collection of ESLint configs to ensure code consistency and clarity!
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 prettierIf 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.
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 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.
This repository is licensed under the MIT License.