const Applause = require('applause');

module.exports = {
  // Here, you can strip out any non-JS content
  // and split into multiple strings to lint.
  preprocess(text, fileName) {
    const applause = Applause.create({
      patterns: [
        {
          match: /native\s+function\s+(\w+)\s*\(\)/g,
          replacement: 'var $1 = function() {}'
        }
      ]
    });

    const substitute = applause.replace(text);
    return [substitute.content];
  },
  // `messages` argument contains two-dimensional array of Message objects
  // where each top-level array item contains array of lint messages related
  // to the text that was returned in array from preprocess() method.
  postprocess(messages, fileName) {
    const message = messages[0];
    return message;
  }
};

@@ -429,16 +429,37 @@
   return
+ substitute.content ?
  %5Bsubsti
@@ -471,16 +471,25 @@
 content%5D
+ : %5Btext%5D
 ;%0A  %7D,%0A 

Return original text if it contains no native function declarations.