gd-configs

6.1.3 • Public • Published

gd-configs

Package with my personal configs for various projects


Build Status version downloads MIT License

PRs Welcome Code of Conduct

Watch on GitHub Star on GitHub Tweet

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

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 just require 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

For semantic-release configs, add the following:

module.exports = require('gd-configs/semantic-release')

LICENSE

MIT

Package Sidebar

Install

npm i gd-configs

Weekly Downloads

13

Version

6.1.3

License

MIT

Unpacked Size

25 kB

Total Files

19

Last publish

Collaborators

  • gabrielduartem