README
Dotfiles
This project contains configuration shared between sleepstation projects for the following libraries.
eslint
styleint
prettier
husky
commitlint
Install this library using npm
npm i @sleepstation/dotfiles
Then use its dotfiles in the project as follows
ESLint
Eslint uses its own extension API. A project's .eslintrc.js
should extend this config like this:
module.exports = {
extends: './node_modules/@sleepstation/dotfiles/src/eslintrc.js',
}
Stylelint
Stylelint uses its own extension API. A project's .stylelintrc.js
should extend this config like this:
module.exports = {
extends: './node_modules/@sleepstation/dotfiles/src/stylelintrc.js',
}
Prettier
A project's .prettierrc.js
should look like this:
const baseConfig = require('@sleepstation/dotfiles/src/prettierrc')
const { merge } = require('ramda')
module.exports = merge(baseConfig, {
// Add overrides here
})
Commitlint
A project's .commitlintrc.js
should look like this:
const baseConfig = require(`@sleepstation/dotfiles/src/commitlintrc`)
const { merge } = require(`ramda`)
module.exports = merge(baseConfig, {
// Add overrides here
})
Husky
A project's .huskyrc.js
should look like this:
const baseConfig = require(`@sleepstation/dotfiles/src/huskyrc`)
const { merge } = require(`ramda`)
module.exports = merge(baseConfig, {
// Add overrides here
})
Modifications
Try to avoid making local modifications unless they are for very localised problems. Any configuration or rules you find could be improved should be changed here and the package republished so all dependents use the same set of dotfiles and apply the same set of rules to code so that code across all Sleepstation projects is linted and formatted identically.