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

12 lines
501 B
JavaScript

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