Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #134 from pdehaan/issue-132-fix-eslint-commands
Browse files Browse the repository at this point in the history
Fix ESLint commands
  • Loading branch information
gregglind authored Apr 10, 2018
2 parents b31601e + f17c4fd commit 20086d8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
],
overrides: [
{
files: "src/**",
files: "webExtensionApis/**",
env: {
browser: true,
webextensions: true,
Expand All @@ -40,14 +40,22 @@ module.exports = {
"comma-dangle": ["error", "always-multiline"],
eqeqeq: "error",
indent: ["warn", 2, { SwitchCase: 1 }],
"max-len": [
"warn",
{
code: 80,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
},
],
"no-console": "warn",
"no-var": "error",
"no-shadow": "error",
"no-unused-vars": "error",
"no-var": "error",
"prefer-const": "warn",
"prefer-spread": "error",
semi: ["error", "always"],
"valid-jsdoc": "warn",
"max-len": ["warn", 80],
},
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"scripts": {
"build": "cd webExtensionApis/study && webpack",
"docformat": "doctoc --title '**Contents**' docs/*.md && prettier '**/*.md' --write",
"eslint": "eslint src --ext jsm --ext js --ext json",
"eslint": "eslint webExtensionApis --ext jsm --ext js --ext json",
"eslint-fix": "npm run eslint -- --fix",
"format": "prettier '**/*.{css,js,jsm,json,md}' --trailing-comma=all --ignore-path=.eslintignore --write",
"lint": "npm-run-all lint:*",
Expand Down
4 changes: 4 additions & 0 deletions webExtensionApis/prefs/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"use strict";

/* global ExtensionAPI:false */

ChromeUtils.import("resource://gre/modules/Services.jsm");

/*
const PREFERENCES_PREFIX = "";
function get(key, type = "char") {
Expand Down Expand Up @@ -32,6 +35,7 @@ function set(key, type, value) {
}
throw new Error(`Unknown type: ${type}`);
}
*/

/* https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/functions.html */
this.prefs = class extends ExtensionAPI {
Expand Down
2 changes: 2 additions & 0 deletions webExtensionApis/study/src/jsonschema.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-env commonjs */

const Ajv = require("ajv/dist/ajv.min.js");
const ajv = new Ajv();

Expand Down
2 changes: 1 addition & 1 deletion webExtensionApis/study/src/studyUtilsBootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ this.Bootstrap = function(studySetup, studyUtils) {
studySetup.addon = { id, version };
studyUtils.setup(studySetup);
// TODO bdanforth: patch studyUtils to setLoggingLevel as part of setup method
//studyUtils.setLoggingLevel(...);
// studyUtils.setLoggingLevel(...);
},

// choose the variation for this particular user, then set it.
Expand Down

0 comments on commit 20086d8

Please sign in to comment.