Files
codeql-action/node_modules/eslint-plugin-escompat/lib/rules/no-computed-public-class-fields.js
2023-01-18 21:00:07 +00:00

10 lines
431 B
JavaScript

module.exports = (context, badBrowser) => ({
// Ignore type annotations that don't assign
'ClassProperty[computed=true]:not([typeAnnotation]:not([value]))'(node) {
context.report(node, `Computed Class Fields are not supported in ${badBrowser}`)
},
'PropertyDefinition[computed=true]:not([typeAnnotation]:not([value]))'(node) {
context.report(node, `Computed Class Fields are not supported in ${badBrowser}`)
}
})