Коммит
a402b78851
|
@ -0,0 +1,27 @@
|
|||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
# Download and cache dependencies
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-dependencies-{{ checksum "package.json" }}
|
||||
# fallback to using the latest cache if no exact match is found
|
||||
- v1-dependencies-
|
||||
|
||||
- run: npm install
|
||||
|
||||
- run: make lint
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: v1-dependencies-{{ checksum "package.json" }}
|
|
@ -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,2 +1,3 @@
|
|||
.DS_Store
|
||||
/shield-study-js-errors.xpi
|
||||
node_modules
|
||||
|
|
3
Makefile
3
Makefile
|
@ -13,6 +13,9 @@ build: shield-study-js-errors.xpi
|
|||
clean:
|
||||
rm -f shield-study-js-errors.xpi
|
||||
|
||||
lint:
|
||||
./node_modules/.bin/eslint extension
|
||||
|
||||
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.
|
||||
|
|
|
@ -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() {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -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"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче