Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/LandrAudio/linting-and-formatting
- Owner: LandrAudio
- Created: 2019-03-12T15:54:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T17:05:53.000Z (10 months ago)
- Last Synced: 2024-05-13T20:44:36.973Z (6 months ago)
- Topics: configs, eslint, frontend, prettier, stylelint
- Language: JavaScript
- Homepage:
- Size: 1.06 MB
- Stars: 5
- Watchers: 16
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
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!