Northern Pileated Marmoset

    @pob/pretty-eslint-config

    3.2.0 • Public • Published

    @pob/pretty-eslint-config

    prettier and sort eslint config

    Install

    npm install --save @pob/pretty-eslint-config

    Usage

    Bin

    directly

    yarn pretty-eslint-config .eslintrc.json

    with lint-staged

    {
      "lint-staged": {
        ".eslintrc.json": ["pretty-eslint-config"]
      }
    }

    Lib

    overrideSync

    const { overrideSync } = require('@pob/pretty-eslint-config');
    
    overrideSync('.eslintrc.json');

    writeSync

    const fs = require('fs');
    const { writeSync } = require('@pob/pretty-eslint-config');
    
    const eslintConfig = JSON.parse(fs.readFileSync('.eslintrc.json', 'utf-8'));
    writeSync(eslintConfig, '.eslintrc.json');

    default

    const fs = require('fs');
    const prettyEslintConfig = require('@pob/pretty-eslint-config');
    
    // parsing yourself
    const eslintConfig = JSON.parse(fs.readFileSync('.eslintrc.json', 'utf-8'));
    fs.writeFileSync(prettyEslintConfig(eslintConfig), '.eslintrc.json');
    
    // let prettyPkg parse
    const eslintConfig = fs.readFileSync('.eslintrc.json', 'utf-8');
    fs.writeFileSync(prettyEslintConfig(eslintConfig), '.eslintrc.json');

    Keywords

    none

    Install

    npm i @pob/pretty-eslint-config

    DownloadsWeekly Downloads

    61

    Version

    3.2.0

    License

    ISC

    Unpacked Size

    9.58 kB

    Total Files

    9

    Last publish

    Collaborators

    • churpeau