2.0.0-23 • Published 3 months ago

@dudeofawesome/create-configs v2.0.0-23

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

@dudeofawesome/create-configs

A script to create configuration files to conform to code style standards.

Usage

  1. Create your config files.

    $ npm init @dudeofawesome/configs
  2. Answer the prompted questions.

  3. Verify settings match the type of project you're working on.

    ESLint in particular has a bunch of settings that will vary based on the type of project you're working on.

    We provide some other eslint configs for different environments:

Consider adding some editor settings

  • VS Code

    Handled by this script

  • Vim

    let g:prettier#autoformat_config_present = 1
    let g:prettier#autoformat_require_pragma = 0

Consider installing editor plugins

This will automatically apply formatting and linting to your files as you work.

Formatting a pre-existing project

If you'd like to maintain git-blame information, you can use the following method (with varying amounts of success):

  1. Make sure you've got a clean working tree
  2. Run Prettier

    prettier -w
  3. Commit changes

    git add .
    git commit --author="Prettier (see commit msg) <software@iunu.com>" \
    -m "🎨 format with prettier (see message)" -m \
    'To see the original author of a line with `git blame`, use:
    
    ```bash
    git config blame.ignoreRevsFile .git-blame-ignore-revs
    ```
    
    This will configure git to ignore this commit when looking at history for `blame`.'
  4. Add formatting commit hash to .git-blame-ignore-revs

    This makes git blame ignore the formatting commit so you can see the actual author of the line.

  5. Commit .git-blame-ignore-revs

    git add .git-blame-ignore-revs
    git commit -m "🔧 add git-blame-ignore-revs" -m \
    'Run the following command to ignore the repo-wide prettier format
    
    ```bash
    git config blame.ignoreRevsFile .git-blame-ignore-revs
    ```'
  6. Setup git to ignore the formatting commit

    git config blame.ignoreRevsFile .git-blame-ignore-revs
2.0.0-23

3 months ago

2.0.0-22

3 months ago

2.0.0-21

3 months ago

2.0.0-20

3 months ago

2.0.0-19

3 months ago

2.0.0-18

3 months ago

2.0.0-17

3 months ago

2.0.0-16

3 months ago

2.0.0-15

3 months ago

2.0.0-14

3 months ago

2.0.0-13

3 months ago

2.0.0-12

4 months ago

2.0.0-11

4 months ago

2.0.0-10

5 months ago

2.0.0-9

6 months ago

2.0.0-8

6 months ago

2.0.0-7

7 months ago

2.0.0-6

7 months ago

2.0.0-5

7 months ago

2.0.0-4

7 months ago

2.0.0-3

7 months ago

2.0.0-2

7 months ago

2.0.0-1

7 months ago

2.0.0-0

7 months ago