amilajack / babel-plugin-fail-explicit Goto Github PK
View Code? Open in Web Editor NEWA babel plugin that prevents coercion and silent failure in JavaScript
License: MIT License
A babel plugin that prevents coercion and silent failure in JavaScript
License: MIT License
const some = {}
const { foo } = some
// ^^^ Fails silently
const some = {}
const foo = safePropertyAccess(['foo'], some)
// TypeError: Property "foo" does not exist in "Object"
Not 100% sure what the code's intention is, but I think you want to apply it only to operations like +, -, *, ..., but not apply it to comparisons.
I would definitely rather whitelist the supported operators than blacklisting the unsupported ones, since there is a real chance you miss something or tomorrow someone adds a new operator that breaks stuff.
Consider '<', for instance. It's also a comparison, but maybe I missed your intention here ๐
The user should not have to see the stack trace of the plugin. This should be removed
This issue provides visibility into Renovate updates and their statuses. Learn more
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@babel/cli
, @babel/core
, @babel/helper-module-imports
, @babel/plugin-transform-modules-commonjs
, @babel/plugin-transform-modules-umd
, @babel/plugin-transform-runtime
, @babel/preset-env
, @babel/preset-flow
, @babel/traverse
, @babel/types
)There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option 'packageRules[2].node' should be a json object, Invalid configuration option: author, Invalid configuration option: babel, Invalid configuration option: bugs, Invalid configuration option: engineStrict, Invalid configuration option: eslintConfig, Invalid configuration option: files, Invalid configuration option: homepage, Invalid configuration option: jest, Invalid configuration option: keywords, Invalid configuration option: license, Invalid configuration option: main, Invalid configuration option: name, Invalid configuration option: packageRules[0].@babel/helper-module-imports, Invalid configuration option: packageRules[0].safe-access-check, Invalid configuration option: packageRules[1].@babel/cli, Invalid configuration option: packageRules[1].@babel/core, Invalid configuration option: packageRules[1].@babel/plugin-transform-modules-commonjs, Invalid configuration option: packageRules[1].@babel/plugin-transform-modules-umd, Invalid configuration option: packageRules[1].@babel/plugin-transform-runtime, Invalid configuration option: packageRules[1].@babel/preset-env, Invalid configuration option: packageRules[1].@babel/preset-flow, Invalid configuration option: packageRules[1].@babel/traverse, Invalid configuration option: packageRules[1].@babel/types, Invalid configuration option: packageRules[1].babel-eslint, Invalid configuration option: packageRules[1].babel-plugin-add-module-exports, Invalid configuration option: packageRules[1].babel-plugin-transform-async-to-bluebird, Invalid configuration option: packageRules[1].babel-plugin-transform-promise-to-bluebird, Invalid configuration option: packageRules[1].cross-env, Invalid configuration option: packageRules[1].eslint, Invalid configuration option: packageRules[1].eslint-config-bliss, Invalid configuration option: packageRules[1].flow-bin, Invalid configuration option: packageRules[1].flow-typed, Invalid configuration option: packageRules[1].jest, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: version, The "node" object can only be configured at the top level of a config but was found inside "packageRules[2]"
On registry https://registry.npmjs.org/
, the "latest" version (v6.24.1) of dependency babel-preset-es2015
has the following deprecation notice:
๐ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.
Affected package file(s): package.json
If you don't care about this, you can close this issue and not be warned about babel-preset-es2015
's deprecation again. If you would like to completely disable all future deprecation warnings then add the following to your config:
"suppressNotifications": ["deprecationWarningIssues"]
I have no idea how to do this because I never used coveralls before ๐ข Would really appreciate some help with this ๐
Write tests that evaluate the generated code and check for TypError's
safeCoerce
-> _safeCoerce
. Helps avoid possible naming collisions
On registry https://registry.npmjs.org/
, the "latest" version (v6.24.1) of dependency babel-preset-es2015
has the following deprecation notice:
๐ Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
Marking the latest version of an npm package as deprecated results in the entire package being considered deprecated, so contact the package author you think this is a mistake.
Affected package file(s): package.json
If you don't care about this, you can close this issue and not be warned about babel-preset-es2015
's deprecation again. If you would like to completely disable all future deprecation warnings then add the following to your config:
"suppressNotifications": ["deprecationWarningIssues"]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.