@putout/plugin-strict-mode
putout plugin adds ability to find and remove console.log calls
Last updated 5 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-strict-mode 
SYNC missed versions from official npm registry.

@putout/plugin-strict-mode NPM version

Strict mode makes several changes to normal JavaScript semantics:

  • Eliminates some JavaScript silent errors by changing them to throw errors.
  • Fixes mistakes that make it difficult for JavaScript engines to perform optimizations: strict mode code can sometimes be made to run faster than identical code that's not strict mode.
  • Prohibits some syntax likely to be defined in future versions of ECMAScript.

(c) MDN

????Putout plugin adds ability to add strict mode to CommonJS, and remove from ESM, where it enabled by default. Moved to @putout/plugin-nodejs.

Install

npm i @putout/plugin-strict-mode -D

Rule

{
    "rules": {
        "strict-mode/add-missing": "on",
        "strict-mode/remove-useless": "on"
    }
}

❌ Example of incorrect code

ESM:

'strict mode';

import a from 'b';

CommonJS:

const a = require('b');

✅ Example of correct code

ESM:

import a from 'b';

CommonJS:

'strict mode';

const a = require('b');

License

MIT

Current Tags

  • 10.0.2                                ...           latest (2 years ago)

27 Versions

  • 10.0.2                                ...           2 years ago
  • 10.0.1                                ...           2 years ago
  • 10.0.0                                ...           2 years ago
  • 9.0.0                                ...           3 years ago
  • 8.0.0                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 5.2.0                                ...           4 years ago
  • 5.1.0                                ...           4 years ago
  • 5.0.0                                ...           4 years ago
  • 4.1.1                                ...           4 years ago
  • 4.1.0                                ...           4 years ago
  • 4.0.0                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.2.5                                ...           6 years ago
  • 1.2.4                                ...           6 years ago
  • 1.2.3                                ...           6 years ago
  • 1.2.2                                ...           6 years ago
  • 1.2.1                                ...           7 years ago
  • 1.2.0                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (8)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |