async scan()

in src/scanners/json.js [15:43]


  async scan() {
    const json = await this.getContents();

    if (
      this.filename.endsWith(MESSAGES_JSON) &&
      this.filename.startsWith(LOCALES_DIRECTORY)
    ) {
      const localeMessagesJSONParser = new LocaleMessagesJSONParser(
        json,
        this.options.collector,
        this.options.addonMetadata,
        { filename: this.filename }
      );
      localeMessagesJSONParser.parse();
    } else {
      const jsonParser = new JSONParser(
        json,
        this.options.collector,
        this.options.addonMetadata,
        { filename: this.filename }
      );
      jsonParser.parse();
    }

    return {
      linterMessages: [],
      scannedFiles: [this.filename],
    };
  }