How to use @putout/plugin-strict-mode - 1 common examples

To help you get started, we’ve selected a few @putout/plugin-strict-mode examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coderaiser / putout / packages / plugin-madrun / lib / add-run / index.spec.js View on Github external
'use strict';

const strictMode = require('@putout/plugin-strict-mode');
const removeUnusedExpressions = require('@putout/plugin-remove-unused-expressions');
const test = require('@putout/test')(__dirname, {
    'add-run': require('.'),
});

const {add} = strictMode.rules;

test('madrun: add run: report', (t) => {
    t.report('no-run', 'run should be declared');
    t.end();
});

test('madrun: add run: transform: exists', (t) => {
    t.transform('no-run');
    t.end();
});

test('madrun: add run: transform: exists', (t) => {
    t.noTransform('run');
    t.end();
});

@putout/plugin-strict-mode

🐊Putout plugin adds ability to add or remove strict mode directive

MIT
Latest version published 9 months ago

Package Health Score

67 / 100
Full package analysis

Popular @putout/plugin-strict-mode functions