New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@putout/plugin-madrun

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-madrun

putout plugin adds ability to find and remove process.exit

  • 12.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
increased by8.93%
Maintainers
1
Weekly downloads
 
Created
Source

@putout/plugin-madrun NPM version

🐊Putout plugin adds ability to fix issues with madrun config file.

Install

npm i putout @putout/plugin-madrun -D

Rules

{
    "rules": {
        "madrun/add-function": "on",
        "madrun/add-fix-lint": "on",
        "madrun/add-run": "on",
        "madrun/call-run": "on",
        "madrun/convert-run-argument": "on",
        "madrun/convert-run-to-cut-env": "on",
        "madrun/rename-series-to-run": "on",
        "madrun/rename-eslint-to-putout": "on",
        "madrun/set-lint-dot": "on",
        "madrun/convert-to-async": "on",
        "madrun/convert-nyc-to-c8": "on",
        "madrun/set-report-lcov": "on",
        "madrun/remove-check-duplicates-from-test": "on"
    }
}

add-function

❌ Incorrect code example

module.exports = {
    hello: 'world',
};

✅ Correct code Example

module.exports = {
    hello: () => 'world',
};

add-fix-lint

❌ Incorrect code example

const {run} = require('madrun');

module.exports = {
    lint: 'putout lib test',
};

✅ Correct code Example

const {run} = require('madrun');

module.exports = {
    'lint': 'putout lib test',
    'fix:lint': run('lint', '--fix'),
};

add-run

❌ Incorrect code example

module.exports = {
    lint: 'putout lib test',
};

✅ Correct code Example

const {run} = require('madrun');

module.exports = {
    lint: 'putout lib test',
};

convert-run-argument

❌ Incorrect code example

module.exports = {
    hello: () => run(['a']),
};

✅ Correct code Example

module.exports = {
    hello: () => run('a'),
};

convert-run-to-cut-env

❌ Incorrect code example

export default {
    'test': () => [env, 'npm test'],
    'test:only': () => 'npm test',
    'coverage': async () => [env, await run('test')],
    'coverage:only': async () => [env, await run('test:only')],
};

✅ Correct code Example

export default {
    'test': () => [env, 'npm test'],
    'test:only': () => 'npm test',
    'coverage': async () => [env, await cutEnv('test')],
    'coverage:only': async () => [env, await run('test:only')],
};

rename-eslint-to-putout

❌ Incorrect code example

module.exports = {
    lint: 'eslint lib test --ignore test/fixture',
};

✅ Correct code Example

module.exports = {
    lint: 'putout lib test',
};

set-lint-dot

❌ Incorrect code example

module.exports = {
    lint: 'putout lib test',
};

✅ Correct code Example

module.exports = {
    lint: 'putout .',
};

convert-to-async

❌ Incorrect code example

module.exports = {
    lint: () => String(run('hello')),
};

✅ Correct code Example

module.exports = {
    lint: async () => String(await run('hello')),
};

convert-nyc-to-c8

❌ Incorrect code example

export default {
    coverage: () => 'nyc npm test',
    report: () => `nyc report --reporter=text-lcov | coveralls`,
};

✅ Correct code Example

export default {
    coverage: () => 'c8 npm test',
    report: 'c8 report --reporter=lcov',
};

set-report-lcov

❌ Incorrect code example

export default {
    'report': () => `c8 report --reporter=text-lcov | coveralls || true`,
};

✅ Correct code Example

export default {
    report: 'c8 report --reporter=lcov',
};

remove-check-duplicates-from-test

❌ Incorrect code example

export default {
    'test': () => 'tape -d *.js',
};

✅ Correct code Example

export default {
    'test': () => 'tape *.js',
};

declare

❌ Incorrect code example

export default {
    'coverage': async () => [env, `c8 ${await cutEnv('test')}`],
};

✅ Correct code Example

import {cutEnv} from 'madrun';
export default {
    'coverage': async () => [env, `c8 ${await cutEnv('test')}`],
};

License

MIT

Keywords

FAQs

Package last updated on 11 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc