1.0.6 • Published 10 months ago

eslint-config-clarity v1.0.6

Weekly downloads
34
License
MIT
Repository
-
Last release
10 months ago

eslint-config-clarity

Collection of ESLint configs to ensure code consistency and clarity!

Installation

To install this into your project, you'll need to install the main package, along with all of its peer dependencies.

As of npm@7, you can simply run npm i --save-dev eslint-config-clarity and it will install the package as well as its peer dependencies for you.

Else if you have npm version 5 or above, you can simply run the following command, for either npm or yarn:

npx install-peerdeps --dev eslint-config-clarity

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

These are the recommended configurations to use as they combine the base presets together with themselves and other ESLint settings to provide reasonable defaults.

  • 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 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 project.

Base Presets

These are ESLint configurations which contain only the rules intended for that particular use case, plus any bare needs for it to function on its own (for example, a parser neded for it to work). It is recommended to use the regular presets, however there may be cases in which you need to customise special functionality for the rules, in which case you'd use these.

  • clarity/base The default base configuration. Provides rules for general JavaScript projects.
  • clarity/react-base Base configuration that provides rules for React and React Hooks.
  • clarity/vue-base Base configuration that provides rules for Vue files & components.
  • clarity/typescript-base Base configuration that provides rules for TypeScript files. Intended to also be used in conjunction with the default base configuration.

License

This repository is licensed under the MIT License.

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

11 months ago

1.0.2

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago

1.0.0-beta.8

1 year ago

1.0.0-rc.4.2

2 years ago

1.0.0-rc.4.1

2 years ago

1.0.0-rc.5

2 years ago

1.0.0-beta.6

2 years ago

1.0.0-beta.7

2 years ago

1.0.0-rc.3

2 years ago

1.0.0-rc.4

2 years ago

1.0.0-rc.1

2 years ago

1.0.0-rc.2

2 years ago

1.0.0-rc.0

2 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.0

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.1

4 years ago

0.4.2

4 years ago

0.4.0

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.13

4 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago