Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/LandrAudio/linting-and-formatting

Configuration files for Eslint, Prettier and Stylelint for LANDR projects
https://github.com/LandrAudio/linting-and-formatting

configs eslint frontend prettier stylelint

Last synced: 3 months ago
JSON representation

Configuration files for Eslint, Prettier and Stylelint for LANDR projects

Awesome Lists containing this project

README

        

# Linting & Formatting

[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)

Monorepo to hold all shareable linting and formatting configurations.

[eslint-config-landr](./packages/eslint-config-landr) - ESLint configuration for linting JavaScript and TypeScript code

[prettier-config-landr](./packages/prettier-config-landr) - Prettier configuration for formatting all code

[stylelint-config-landr](./packages/stylelint-config-landr) - Stylelint configuration for linting CSS and Sass code

## Editor Setup

When using both ESLint and Prettier in a project, it's nice to have files automatically have ESLint errors fixed on save as well as have non JavaScript/TypeScript files formatted on save. This section explains how to set that up in an editor.

### VS Code

The easiest and recommended way of integrating with linters is to let Prettier do the formatting and configure the linter to not deal with formatting rules. You can find instructions on how to configure each linter on the Prettier docs site. You can then use each of the linting extensions as you normally would.

- ESLint: [Extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- Stylelint: [Extension](https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint)

You can enable Auto-Fix on Save for ESLint or Stylelint and still have formatting and quick fixes:

```
"editor.codeActionsOnSave": {
// For ESLint
"source.fixAll.eslint": true,
// For Stylelint
"source.fixAll.stylelint": true
}
```

## Releasing

We use [Auto](https://intuit.github.io/auto/) and [Lerna](https://lerna.js.org/) to automatically bump our packages versions based on the [Conventional Commits](https://www.conventionalcommits.org/) convention.

- A commit starting with `fix:` will do a `PATCH` release
- A commit starting with `feat:` will do a `MINOR` release
- A commit starting with `BREAKING CHANGE:` will do a `MAJOR` release

### Semantic version increment rules

#### Patch releases (1.0.X):

- Bump dependencies to patch or minor releases
- Fixes not impacting the configs or adding new rules

#### Minor releases (1.X):

- Adding exceptions to rules (ex: disable a default rule)
- Changing linting rules (ex: `{ printWidth: 80 }` -> `{ printWidth: 120 }`)

#### Major releases(X):

- Breaking changes in repo
- Bump dependencies to major releases

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Benoit Deziel

🚧 πŸ“– πŸš‡ πŸ’»

hjack-landr

🚧 πŸš‡ πŸ’»

David Martinez

🚧 πŸ’»

rpdeshaies

πŸ“– πŸš‡ πŸ’»

Maxime PΓ©loquin

πŸ’»

Corentin Ardeois

πŸ“– πŸ’»

vbeausoleil

πŸš‡ πŸ’»



Ronan

πŸš‡

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!