Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2024-12-03 18:37:29 +00:00
parent 49f7b34c3d
commit 5261a1223f
1640 changed files with 174830 additions and 182292 deletions

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
':function[async=true][generator=true]'(node) {
context.report(node, `Async Generators are not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'ForOfStatement[await=true]'(node) {
context.report(node, `Async Iteration is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'Literal[bigint]'(node) {
context.report(node, `BigInts are not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
BindExpression(node) {
context.report(node, `The Bind Operator is not supported in ${badBrowser}`)

View file

@ -0,0 +1,10 @@
'use strict';
module.exports = (context, badBrowser) => ({
StaticBlock(node) {
context.report(
node,
`Class Static Blocks are not supported in ${badBrowser}`
);
},
});

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
// Ignore type annotations that don't assign
'ClassProperty[computed=true]:not([typeAnnotation]:not([value]))'(node) {

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
DoExpression(node) {
context.report(node, `Do Expressions are not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'ImportExpression, CallExpression[callee.type="Import"]'(node) {
context.report(node, `Dynamic import is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
const objectPatternHasDefaults = node =>
node.type === 'ObjectPattern' && node.properties.some(prop => prop.value.type === 'AssignmentPattern')

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'AssignmentExpression[operator="**="], BinaryExpression[operator="**"]'(node) {
context.report(node, `Exponentiation Operator is not supported in ${badBrowser}`)

View file

@ -0,0 +1,13 @@
'use strict';
module.exports = (context, badBrowser) => {
const { sourceCode = context.getSourceCode() } = context;
return {
'Program:exit' (node) {
const [comment] = sourceCode.getAllComments();
if (comment && comment.type === 'Shebang') {
context.report(node, `Hashbang comments are not supported in ${badBrowser}`)
}
}
}
}

View file

@ -0,0 +1,13 @@
'use strict';
module.exports = (context, badBrowser) => ({
'AssignmentExpression[operator="||="]'(node) {
context.report(node, `Logical assignment operators are not supported in ${badBrowser}`)
},
'AssignmentExpression[operator="&&="]'(node) {
context.report(node, `Logical assignment operators are not supported in ${badBrowser}`)
},
'AssignmentExpression[operator="??="]'(node) {
context.report(node, `Logical assignment operators are not supported in ${badBrowser}`)
}
})

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'LogicalExpression[operator="??"]'(node) {
context.report(node, `the Nullish Coalescing Operator is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = {
meta: {
fixable: 'code'

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'ObjectExpression > SpreadElement'(node) {
context.report(node, `Object Rest/Spread is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'CatchClause:not([param])'(node) {
context.report(node, `Optional Catch Parameters are not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
OptionalMemberExpression(node) {
context.report(node, `Optional Chaining is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'BinaryExpression[operator="|>"]'(node) {
context.report(node, `The Pipeline Operator is not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
ClassPrivateProperty(node) {
context.report(node, `Private Class Fields are not supported in ${badBrowser}`)

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
// Ignore type annotations that don't assign
'ClassProperty[static=false]:not([typeAnnotation]:not([value]))'(node) {

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
// Ignore type annotations that don't assign
'ClassProperty[static=true]:not([typeAnnotation]:not([value]))'(node) {

View file

@ -0,0 +1,30 @@
'use strict';
const hasDuplicateNamedGroups = s => /(\(\?<[_$\w]*?)>.*?\1>/.test(s)
module.exports = (context, badBrowser) => ({
'Literal[regex]'(node) {
if (hasDuplicateNamedGroups(node.regex.pattern)) {
context.report(node, `RegExp duplicate named groups are not supported in ${badBrowser}`)
}
},
'CallExpression[callee.name="RegExp"], NewExpression[callee.name="RegExp"]'(node) {
const [source] = node.arguments;
if (
source &&
(
(
source.type === 'Literal' &&
typeof source.value === 'string' &&
hasDuplicateNamedGroups(source.value)
) ||
(
source.type === 'TemplateLiteral' &&
source.quasis.some(({value: {raw}}) => hasDuplicateNamedGroups(raw))
)
)
) {
context.report(node, `RegExp duplicate named groups are not supported in ${badBrowser}`)
}
}
})

View file

@ -1,4 +1,6 @@
const hasLookbehind = s => s.includes('(?<=') || s.includes('(?<!)')
'use strict';
const hasLookbehind = s => s.includes('(?<=') || s.includes('(?<!')
module.exports = (context, badBrowser) => ({
'Literal[regex]'(node) {

View file

@ -1,3 +1,5 @@
'use strict';
const hasNamedGroup = s => /\(\?<[_$\w]/.test(s)
module.exports = (context, badBrowser) => ({

View file

@ -1,3 +1,5 @@
'use strict';
module.exports = (context, badBrowser) => ({
'Literal[regex]'(node) {
if (node.regex.flags.includes('s')) {
@ -7,13 +9,13 @@ module.exports = (context, badBrowser) => ({
'CallExpression[callee.name="RegExp"], NewExpression[callee.name="RegExp"]'(node) {
const [, flags] = node.arguments;
if (
flags &&
flags &&
(
(
flags.type === 'Literal' &&
typeof flags.value === 'string' &&
flags.value.includes('s')
) ||
) ||
(
flags.type === 'TemplateLiteral' &&
flags.quasis.some(({value: {raw}}) => raw.includes('s'))

View file

@ -0,0 +1,28 @@
'use strict';
module.exports = (context, badBrowser) => ({
'Literal[regex]'(node) {
if (node.regex.flags.includes('v')) {
context.report(node, `RegExp "v" flag is not supported in ${badBrowser}`)
}
},
'CallExpression[callee.name="RegExp"], NewExpression[callee.name="RegExp"]'(node) {
const [, flags] = node.arguments;
if (
flags &&
(
(
flags.type === 'Literal' &&
typeof flags.value === 'string' &&
flags.value.includes('v')
) ||
(
flags.type === 'TemplateLiteral' &&
flags.quasis.some(({value: {raw}}) => raw.includes('v'))
)
)
) {
context.report(node, `RegExp "v" flag is not supported in ${badBrowser}`)
}
}
})

View file

@ -0,0 +1,20 @@
'use strict';
const functionTypes = new Set([
'FunctionDeclaration',
'FunctionExpression',
'ArrowFunctionExpression',
]);
module.exports = (context, badBrowser) => ({
AwaitExpression(node) {
let currentNode = node;
while (currentNode.parent) {
currentNode = currentNode.parent;
if (functionTypes.has(currentNode.type) && currentNode.async) {
return;
}
}
context.report(node, `Top-level await is not supported in ${badBrowser}`)
},
})