зеркало из
1
0
Форкнуть 0
This commit is contained in:
Michael Kelly 2017-12-04 16:15:14 -08:00
Родитель 13ae70492b
Коммит ea87348404
7 изменённых файлов: 1556 добавлений и 3 удалений

24
.eslintrc.js Normal file
Просмотреть файл

@ -0,0 +1,24 @@
"use strict";
module.exports = {
extends: [
"plugin:mozilla/recommended",
],
plugins: [
"mozilla",
],
parserOptions: {
sourceType: "module"
},
rules: {
"no-return-await": ["off"],
"valid-jsdoc": ["error", {
requireReturn: false,
requireParamDescription: false,
requireReturnDescription: false,
}],
},
};

1
.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,3 @@
.DS_Store
/shield-study-js-errors.xpi
node_modules

Просмотреть файл

@ -13,6 +13,9 @@ build: shield-study-js-errors.xpi
clean:
rm -f shield-study-js-errors.xpi
lint:
npm run lint
shield-study-js-errors.xpi: $(EXTENSION_FILES)
pushd extension; \
zip -r shield-study-js-errors.xpi ./*; \

Просмотреть файл

@ -50,6 +50,13 @@ Nightly:
- `xpinstall.signatures.required`
- `extensions.allow-non-mpc-extensions`
Linting can be run on the add-on using `make lint`:
```sh
$ npm install # If they haven't been installed yet
$ make lint
```
## License
Shield Study: JavaScript Errors is licensed under the MPLv2. See the `LICENSE`
file for details.

6
extension/bootstrap.js поставляемый
Просмотреть файл

@ -28,12 +28,12 @@ function generateFingerprint(error) {
this.install = function() {};
this.startup = function() {
logger = Log.repository.getLogger('shield-study-js-errors');
logger = Log.repository.getLogger("shield-study-js-errors");
logger.addAppender(new Log.ConsoleAppender(new Log.BasicFormatter()));
logger.level = Services.prefs.getIntPref(
"extensions.shield-study-js-errors@shield.mozilla.org.logLevel",
Log.Level.Warn,
);;
);
ErrorReporting.startup();
@ -58,7 +58,7 @@ this.startup = function() {
addClientId: true,
addEnvironment: true,
});
})
});
};
this.shutdown = function() {

1501
package-lock.json сгенерированный Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

17
package.json Normal file
Просмотреть файл

@ -0,0 +1,17 @@
{
"title": "Shield Study: JavaScript Errors",
"version": "0.1.0",
"description": "A Shield study to test collecting JavaScript errors thrown by Firefox chrome code",
"private": true,
"author": "Michael Kelly <mkelly@mozilla.com>",
"repository": "https://github.com/mozilla/shield-study-js-errors",
"license": "MPL-2.0",
"scripts": {
"lint": "eslint extension || true"
},
"devDependencies": {
"eslint": "^4.12.1",
"eslint-plugin-mozilla": "^0.4.9",
"eslint-plugin-no-unsanitized": "^2.0.2"
}
}