codeql-action/node_modules/eslint-plugin-escompat/lib/rules/no-computed-public-class-fields.js
2024-12-03 18:37:29 +00:00

11 lines
446 B
JavaScript

'use strict';
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}`)
}
})