gd-configs
Package with my personal configs for various projects
!Build Statusbuild-badgebuild !versionversion-badgepackage !downloadsdownloads-badgenpmtrends !MIT Licenselicense-badgelicense
!PRs Welcomeprs-badgeprs !Code of Conductcoc-badgecoc
!Watch on GitHubgithub-watch-badgegithub-watch !Star on GitHubgithub-star-badgegithub-star !Tweettwitter-badgetwitter
Installation
This module is distributed via npmnpm which is bundled with nodenode and should be installed as one of your project'sdevDependencies
:npm install --save-dev gd-configs
The problem
I have some open source projects which share most of the same config for building, linting, etc, so I have to practically copy/paste the same files over and over again. It's even worse when I want to add a new config, like a new eslint rule or something like that, because I have to go over all the repos and change the config there.This solution
With this package, I group all of my most common configs for my projects, and on the projects which needs the configs, I justrequire
this package, so I don't have to copy/paste the same configs over and over, and staying up-to-date with changes is a breeze, as I just have to add the new config on this package, and then install the updated version where is needed.Usage
.eslintrc.js
The config you need to require depends on the type of the project, so you need to export one of the following on your.eslintrc.js
file:module.exports = require('gd-configs/eslint')
module.exports = require('gd-configs/eslint/web')
module.exports = require('gd-configs/eslint/ts')
module.exports = require('gd-configs/eslint/ts/web')
.prettierrc.js
module.exports = require('gd-configs/prettier')
tsconfig.json
For node projects:{
"extends": "./node_modules/gd-configs/typescript/base.json"
}
For web projects:
{
"extends": "./node_modules/gd-configs/typescript/web.json"
}
release.config.js
Forsemantic-release
configs, add the following:module.exports = require('gd-configs/semantic-release')