eslint-plugin-escompat
Advanced tools
Comparing version 3.3.3 to 3.3.4
@@ -5,5 +5,6 @@ const path = require('path') | ||
const {version,homepage} = require('../package.json') | ||
const createRule = (name, browserstring, description, {fixable = null, schema = [], ts = null} = {}) => { | ||
const createRule = (name, browserstring, description, {ts = null} = {}) => { | ||
const rule = require(`./rules/${name}`) | ||
module.exports.rules[name] = { | ||
meta: { | ||
meta: Object.assign({ | ||
type: 'problem', | ||
@@ -15,7 +16,7 @@ docs: { | ||
}, | ||
fixable, | ||
schema, | ||
fixable: false, | ||
schema: [], | ||
deprecated: false, | ||
replacedBy: null, | ||
}, | ||
}, rule.meta || {}), | ||
create(context) { | ||
@@ -27,3 +28,4 @@ let browsers = browserslist(browserstring) | ||
if (badBrowsers) { | ||
return require(`./rules/${name}`)(context, badBrowsers) | ||
const create = typeof rule === 'function' ? rule : rule.create | ||
return create(context, badBrowsers) | ||
} | ||
@@ -76,3 +78,3 @@ return {} | ||
// ES2021 | ||
createRule('no-numeric-separators', 'edge < 79, safari < 13, firefox < 68, chrome < 75', 'disallow use of numeric seperators like 1_000_000', {fixable: true, ts:2021}) | ||
createRule('no-numeric-separators', 'edge < 79, safari < 13, firefox < 68, chrome < 75', 'disallow use of numeric seperators like 1_000_000', {ts:2021}) | ||
@@ -79,0 +81,0 @@ // ES2022 |
{ | ||
"name": "eslint-plugin-escompat", | ||
"version": "3.3.3", | ||
"version": "3.3.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18947
313