Socket
Socket
Sign inDemoInstall

eslint-plugin-es

Package Overview
Dependencies
90
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.1 to 4.0.0

lib/configs/no-new-in-es2015.js

173

lib/index.js
/**
* DON'T EDIT THIS FILE.
* This file was generated automatically by 'scripts/update-index.js'.
* This file was generated automatically by 'scripts/update-lib-index.js'.
*/
"use strict"
const { printWarningOfDeprecatedConfig } = require("./utils")
module.exports = {
configs: {
"no-2019": {
rules: {
"es/no-json-superset": "error",
"es/no-optional-catch-binding": "error",
"es/no-regexp-unicode-property-escapes-2019": "error",
},
"no-new-in-es5": require("./configs/no-new-in-es5"),
"no-new-in-es2015": require("./configs/no-new-in-es2015"),
"no-new-in-es2016": require("./configs/no-new-in-es2016"),
"no-new-in-es2017": require("./configs/no-new-in-es2017"),
"no-new-in-es2018": require("./configs/no-new-in-es2018"),
"no-new-in-es2019": require("./configs/no-new-in-es2019"),
"no-new-in-es2020": require("./configs/no-new-in-es2020"),
"no-new-in-esnext": require("./configs/no-new-in-esnext"),
"restrict-to-es3": require("./configs/restrict-to-es3"),
"restrict-to-es5": require("./configs/restrict-to-es5"),
"restrict-to-es2015": require("./configs/restrict-to-es2015"),
"restrict-to-es2016": require("./configs/restrict-to-es2016"),
"restrict-to-es2017": require("./configs/restrict-to-es2017"),
"restrict-to-es2018": require("./configs/restrict-to-es2018"),
"restrict-to-es2019": require("./configs/restrict-to-es2019"),
get "no-5"() {
printWarningOfDeprecatedConfig("no-5")
return this["no-new-in-es5"]
},
"no-2018": {
rules: {
"es/no-async-iteration": "error",
"es/no-malformed-template-literals": "error",
"es/no-regexp-lookbehind-assertions": "error",
"es/no-regexp-named-capture-groups": "error",
"es/no-regexp-s-flag": "error",
"es/no-regexp-unicode-property-escapes": "error",
"es/no-rest-spread-properties": "error",
},
get "no-2015"() {
printWarningOfDeprecatedConfig("no-2015")
return this["no-new-in-es2015"]
},
"no-2017": {
rules: {
"es/no-async-functions": "error",
"es/no-atomics": "error",
"es/no-object-entries": "error",
"es/no-object-getownpropertydescriptors": "error",
"es/no-object-values": "error",
"es/no-shared-array-buffer": "error",
"es/no-trailing-function-commas": "error",
},
get "no-2016"() {
printWarningOfDeprecatedConfig("no-2016")
return this["no-new-in-es2016"]
},
"no-2016": {
rules: {
"es/no-exponential-operators": "error",
},
get "no-2017"() {
printWarningOfDeprecatedConfig("no-2017")
return this["no-new-in-es2017"]
},
"no-2015": {
rules: {
"es/no-array-from": "error",
"es/no-array-of": "error",
"es/no-arrow-functions": "error",
"es/no-binary-numeric-literals": "error",
"es/no-block-scoped-functions": "error",
"es/no-block-scoped-variables": "error",
"es/no-classes": "error",
"es/no-computed-properties": "error",
"es/no-default-parameters": "error",
"es/no-destructuring": "error",
"es/no-for-of-loops": "error",
"es/no-generators": "error",
"es/no-map": "error",
"es/no-math-acosh": "error",
"es/no-math-asinh": "error",
"es/no-math-atanh": "error",
"es/no-math-cbrt": "error",
"es/no-math-clz32": "error",
"es/no-math-cosh": "error",
"es/no-math-expm1": "error",
"es/no-math-fround": "error",
"es/no-math-hypot": "error",
"es/no-math-imul": "error",
"es/no-math-log10": "error",
"es/no-math-log1p": "error",
"es/no-math-log2": "error",
"es/no-math-sign": "error",
"es/no-math-sinh": "error",
"es/no-math-tanh": "error",
"es/no-math-trunc": "error",
"es/no-modules": "error",
"es/no-new-target": "error",
"es/no-number-epsilon": "error",
"es/no-number-isfinite": "error",
"es/no-number-isinteger": "error",
"es/no-number-isnan": "error",
"es/no-number-issafeinteger": "error",
"es/no-number-maxsafeinteger": "error",
"es/no-number-minsafeinteger": "error",
"es/no-number-parsefloat": "error",
"es/no-number-parseint": "error",
"es/no-object-assign": "error",
"es/no-object-getownpropertysymbols": "error",
"es/no-object-is": "error",
"es/no-object-setprototypeof": "error",
"es/no-object-super-properties": "error",
"es/no-octal-numeric-literals": "error",
"es/no-promise": "error",
"es/no-property-shorthands": "error",
"es/no-proxy": "error",
"es/no-reflect": "error",
"es/no-regexp-u-flag": "error",
"es/no-regexp-y-flag": "error",
"es/no-rest-parameters": "error",
"es/no-set": "error",
"es/no-spread-elements": "error",
"es/no-string-fromcodepoint": "error",
"es/no-string-raw": "error",
"es/no-subclassing-builtins": "error",
"es/no-symbol": "error",
"es/no-template-literals": "error",
"es/no-typed-arrays": "error",
"es/no-unicode-codepoint-escapes": "error",
"es/no-weak-map": "error",
"es/no-weak-set": "error",
},
get "no-2018"() {
printWarningOfDeprecatedConfig("no-2018")
return this["no-new-in-es2018"]
},
"no-5": {
rules: {
"es/no-accessor-properties": "error",
"es/no-array-isarray": "error",
"es/no-date-now": "error",
"es/no-json": "error",
"es/no-keyword-properties": "error",
"es/no-object-defineproperties": "error",
"es/no-object-defineproperty": "error",
"es/no-object-freeze": "error",
"es/no-object-getownpropertydescriptor": "error",
"es/no-object-getownpropertynames": "error",
"es/no-object-getprototypeof": "error",
"es/no-object-isextensible": "error",
"es/no-object-isfrozen": "error",
"es/no-object-issealed": "error",
"es/no-object-keys": "error",
"es/no-object-preventextensions": "error",
"es/no-object-seal": "error",
"es/no-trailing-commas": "error",
},
get "no-2019"() {
printWarningOfDeprecatedConfig("no-2019")
return this["no-new-in-es2019"]
},

@@ -155,8 +71,11 @@ },

"no-exponential-operators": require("./rules/no-exponential-operators"),
"no-export-ns-from": require("./rules/no-export-ns-from"),
"no-for-of-loops": require("./rules/no-for-of-loops"),
"no-generators": require("./rules/no-generators"),
"no-global-this": require("./rules/no-global-this"),
"no-import-meta": require("./rules/no-import-meta"),
"no-json": require("./rules/no-json"),
"no-json-superset": require("./rules/no-json-superset"),
"no-json": require("./rules/no-json"),
"no-keyword-properties": require("./rules/no-keyword-properties"),
"no-logical-assignment-operators": require("./rules/no-logical-assignment-operators"),
"no-malformed-template-literals": require("./rules/no-malformed-template-literals"),

@@ -174,5 +93,5 @@ "no-map": require("./rules/no-map"),

"no-math-imul": require("./rules/no-math-imul"),
"no-math-log10": require("./rules/no-math-log10"),
"no-math-log1p": require("./rules/no-math-log1p"),
"no-math-log2": require("./rules/no-math-log2"),
"no-math-log10": require("./rules/no-math-log10"),
"no-math-sign": require("./rules/no-math-sign"),

@@ -184,2 +103,3 @@ "no-math-sinh": require("./rules/no-math-sinh"),

"no-new-target": require("./rules/no-new-target"),
"no-nullish-coalescing-operators": require("./rules/no-nullish-coalescing-operators"),
"no-number-epsilon": require("./rules/no-number-epsilon"),

@@ -194,2 +114,3 @@ "no-number-isfinite": require("./rules/no-number-isfinite"),

"no-number-parseint": require("./rules/no-number-parseint"),
"no-numeric-separators": require("./rules/no-numeric-separators"),
"no-object-assign": require("./rules/no-object-assign"),

@@ -200,2 +121,3 @@ "no-object-defineproperties": require("./rules/no-object-defineproperties"),

"no-object-freeze": require("./rules/no-object-freeze"),
"no-object-fromentries": require("./rules/no-object-fromentries"),
"no-object-getownpropertydescriptor": require("./rules/no-object-getownpropertydescriptor"),

@@ -218,4 +140,6 @@ "no-object-getownpropertydescriptors": require("./rules/no-object-getownpropertydescriptors"),

"no-optional-catch-binding": require("./rules/no-optional-catch-binding"),
"no-optional-chaining": require("./rules/no-optional-chaining"),
"no-promise": require("./rules/no-promise"),
"no-promise-all-settled": require("./rules/no-promise-all-settled"),
"no-promise": require("./rules/no-promise"),
"no-promise-any": require("./rules/no-promise-any"),
"no-property-shorthands": require("./rules/no-property-shorthands"),

@@ -228,4 +152,4 @@ "no-proxy": require("./rules/no-proxy"),

"no-regexp-u-flag": require("./rules/no-regexp-u-flag"),
"no-regexp-unicode-property-escapes": require("./rules/no-regexp-unicode-property-escapes"),
"no-regexp-unicode-property-escapes-2019": require("./rules/no-regexp-unicode-property-escapes-2019"),
"no-regexp-unicode-property-escapes": require("./rules/no-regexp-unicode-property-escapes"),
"no-regexp-y-flag": require("./rules/no-regexp-y-flag"),

@@ -248,3 +172,4 @@ "no-rest-parameters": require("./rules/no-rest-parameters"),

"no-weak-set": require("./rules/no-weak-set"),
"no-weakrefs": require("./rules/no-weakrefs"),
},
}

@@ -56,2 +56,16 @@ /**

},
printWarningOfDeprecatedConfig(configId) {
if (!process) {
return
}
const newConfigId = configId.replace("no-", "no-new-in-es")
process.emitWarning(
`"plugin:es/${configId}" has been deprecated in favor of "plugin:es/${newConfigId}".`,
{
type: "DeprecationWarning",
code: "ESLINT_PLUGIN_ES_LEGACY_CONFIG",
}
)
},
}
{
"name": "eslint-plugin-es",
"version": "3.0.1",
"version": "4.0.0",
"description": "ESLint plugin about ECMAScript syntactic features.",

@@ -20,9 +20,9 @@ "engines": {

"devDependencies": {
"@mysticatea/eslint-plugin": "^11.0.0",
"@mysticatea/eslint-plugin": "^13.0.0",
"@vuepress/plugin-pwa": "^1.2.0",
"acorn": "^7.1.0",
"babel-eslint": "^10.0.1",
"codecov": "^3.5.0",
"eslint": "^6.2.2",
"eslint4b": "^6.2.2",
"codecov": "3.7.0",
"eslint": "^7.10.0",
"eslint4b": "^7.10.0",
"espree": "^7.0.0",

@@ -36,3 +36,3 @@ "globals": "^12.0.0",

"semver": "^6.3.0",
"vue-eslint-editor": "^0.2.0",
"vue-eslint-editor": "^1.1.0",
"vuepress": "^1.2.0"

@@ -53,4 +53,6 @@ },

"update:url": "npm run -s lint -- --fix",
"update:configs": "node scripts/update-lib-configs",
"update:index": "node scripts/update-lib-index",
"update:doc": "node scripts/update-docs-readme",
"update:ruledocs": "node scripts/update-docs-rules",
"update:index": "node scripts/update-index",
"preversion": "npm test",

@@ -57,0 +59,0 @@ "version": "run-s update:* docs:build && git add .",

@@ -14,6 +14,6 @@ # eslint-plugin-es

[Espree](https://github.com/eslint/espree#readme), the default parser of [ESLint](https://eslint.org/), has supported `ecmaVersion` option.
However, it doesn't support to enable each syntactic feature individually.
However, the error messages of new syntax are not readable (e.g., "unexpected token" or something like).
This plugin lets us disable each syntactic feature individually.
So we can enable arbitrary syntactic features with the combination of `ecmaVersion` and this plugin.
When we use this plugin along with the latest `ecmaVersion` option value, it tells us the readable error message for the new syntax, such as "ES2020 BigInt is forbidden."
Plus, this plugin lets us disable each syntactic feature individually.

@@ -28,2 +28,5 @@ ## 📖 Usage

- We will release a new minor version to add new rules when TC39 decided to advance proposals to Stage 4. In the minor releases, we don't update configs.
- We will release a new major version to update configs when new ECMAScript snapshots are available.
## 📰 Changelog

@@ -30,0 +33,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc