Mana ESLint + Prettier Configuration
Abstract
These are our shared settings for ESLint and Prettier. This ESLint configuration lints and formats our code so it follows our shared style guide. It uses ESLint to lint and fix Javascript, and Prettier to fix issues and format our code consistently.
Installation
Install the package with:
yarn add eslint-config-mana --dev
eslint-config-mana
requires you to take care of it's peerDependencies
. Install the correct version of each peerDependencies
package, which are listed with the following command:
npx install-peerdeps --dev eslint-config-mana
ESLint Configuration
Now add eslint-config-mana
to your .eslintrc.js
:
module.exports = {
extends: ['eslint-config-mana'],
}
Prettier Configuration
This is how you can use or extend the eslint-config-mana
Prettier config in your app:
module.exports = require('eslint-config-mana/.prettierrc.js')
module.exports = {
...require('eslint-config-mana/.prettierrc.js'),
semi: true,
bracketSameLine: false,
}
Notes