diaspora/diaspora

View on GitHub

Showing 3,786 of 4,306 total issues

Rule doesn't have all its properties in alphabetical ordered.
Open

ul.as-selections li.as-original {

Outlines should only be modified using :focus.
Open

ul.as-selections li.as-original input {

Rule doesn't have all its properties in alphabetical ordered.
Open

ul.as-list {

Rule doesn't have all its properties in alphabetical ordered.
Open

ul.as-selections li.as-original input {

Rule doesn't have all its properties in alphabetical ordered.
Open

.qq-upload-spinner {

Strings must use doublequote.
Open

      return $(':input', this).clearForm();
Severity: Minor
Found in lib/assets/javascripts/clear-form.js by eslint

Enforce Quote Style (quotes)

(fixable) The --fix option on the [command line](../user-guide/command-line-interface#fix) automatically fixes problems reported by this rule.

JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

```js /eslint-env es6/

var double = "double"; var single = 'single'; var backtick = backtick; // ES6 only ```

Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

Many codebases require strings to be defined in a consistent manner.

Rule Details

This rule is aimed at ensuring consistency of string quotes and as such will report a problem when an inconsistent style is found.

The rule configuration takes up to two options:

  1. The first option is "double", "single" or "backtick" for double-quotes, single-quotes or backticks respectively. The default is "double".
  2. The second option takes two options:
    1. "avoidEscape": When using "avoidEscape", this rule will not report a problem when a string is using single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. For example, if you specify "double" and "avoidEscape", the string 'He said, "hi!"' is not considered a problem because using double quotes for that string would require escaping the double quotes inside of the string. This option is off by default.
    2. "allowTemplateLiterals": when using "allowTemplateLiterals", this rule will not report a problem when a string is using backticks and option one is either "double" or "single".

When using "single" or "double", template literals that don't contain a substitution, don't contain a line break and aren't tagged templates, are flagged as problems, even with the "avoidEscape" option. However they are not problems when "allowTemplateLiterals" is used.

Configuration looks like this:

js [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}]

Deprecation notice: The avoid-escape option is a deprecated syntax and you should use the object form instead.

The following patterns are considered problems:

```js /eslint quotes: ["error", "double"]/

var single = 'single'; var unescaped = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single"]/

var double = "double"; var unescaped = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/

var single = 'single'; var double = "double"; var unescaped = 'a string containing backticks'; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var single = 'single'; var double = "double"; ```

The following patterns are not considered problems:

```js /eslint quotes: ["error", "double"]/ /eslint-env es6/

var double = "double"; var backtick = back\ntick; // backticks are allowed due to newline var backtick = tagbacktick; // backticks are allowed due to tag ```

```js /eslint quotes: ["error", "single"]/ /eslint-env es6/

var single = 'single'; var backtick = back${x}tick; // backticks are allowed due to substitution ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"allowTemplateLiterals": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"allowTemplateLiterals": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/ /eslint-env es6/

var backtick = backtick; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var double = "a string containing backtick quotes" ```

When Not To Use It

If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

Extra space before value for key 'BACKSPACE'.
Open

  BACKSPACE:      8,
Severity: Minor
Found in lib/assets/javascripts/keycodes.js by eslint

enforce consistent spacing between keys and values in object literal properties (key-spacing)

This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

Rule Details

This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

Options

This rule has an object option:

  • "beforeColon": false (default) disallows spaces between the key and the colon in object literals
  • "beforeColon": true requires at least one space between the key and the colon in object literals
  • "afterColon": true (default) requires at least one space between the colon and the value in object literals
  • "afterColon": false disallows spaces between the colon and the value in object literals
  • "mode": strict (default) enforces exactly one space before or after colons in object literals
  • "mode": minimum enforces one or more spaces before or after colons in object literals
  • "align": "value" enforces horizontal alignment of values in object literals
  • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
  • "singleLine" specifies a spacing style for single-line object literals
  • "multiLine" specifies a spacing style for multi-line object literals

Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

beforeColon

Examples of incorrect code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo" : 42 }; ```

Examples of correct code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo" : 42 }; ```

afterColon

Examples of incorrect code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo":42 }; ```

Examples of correct code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo":42 }; ```

mode

Examples of incorrect code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "mode": "minimum" } option:

```js /eslint key-spacing: ["error", { "mode": "minimum" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

align

Examples of incorrect code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42, fg : foo() }; ```

Examples of correct code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42,

fg: foo(),
h:  function() {
    return this.a;
},
ijkl: 'Non-consecutive lines form a new group'

};

var obj = { a: "foo", longPropertyName: "bar" }; ```

Examples of incorrect code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat : 2 * 2 }); ```

singleLine and multiLine

Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

js /*eslint "key-spacing": [2, { "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" } }]*/ var obj = { one: 1, "two": 2, three: 3 }; var obj2 = { "two" : 2, three : 3 };

When Not To Use It

If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

Extra space before value for key 'SHIFT'.
Open

  SHIFT:         16,
Severity: Minor
Found in lib/assets/javascripts/keycodes.js by eslint

enforce consistent spacing between keys and values in object literal properties (key-spacing)

This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

Rule Details

This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

Options

This rule has an object option:

  • "beforeColon": false (default) disallows spaces between the key and the colon in object literals
  • "beforeColon": true requires at least one space between the key and the colon in object literals
  • "afterColon": true (default) requires at least one space between the colon and the value in object literals
  • "afterColon": false disallows spaces between the colon and the value in object literals
  • "mode": strict (default) enforces exactly one space before or after colons in object literals
  • "mode": minimum enforces one or more spaces before or after colons in object literals
  • "align": "value" enforces horizontal alignment of values in object literals
  • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
  • "singleLine" specifies a spacing style for single-line object literals
  • "multiLine" specifies a spacing style for multi-line object literals

Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

beforeColon

Examples of incorrect code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo" : 42 }; ```

Examples of correct code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo" : 42 }; ```

afterColon

Examples of incorrect code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo":42 }; ```

Examples of correct code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo":42 }; ```

mode

Examples of incorrect code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "mode": "minimum" } option:

```js /eslint key-spacing: ["error", { "mode": "minimum" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

align

Examples of incorrect code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42, fg : foo() }; ```

Examples of correct code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42,

fg: foo(),
h:  function() {
    return this.a;
},
ijkl: 'Non-consecutive lines form a new group'

};

var obj = { a: "foo", longPropertyName: "bar" }; ```

Examples of incorrect code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat : 2 * 2 }); ```

singleLine and multiLine

Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

js /*eslint "key-spacing": [2, { "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" } }]*/ var obj = { one: 1, "two": 2, three: 3 }; var obj2 = { "two" : 2, three : 3 };

When Not To Use It

If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

Extra space before value for key 'PAGEUP'.
Open

  PAGEUP:        33,
Severity: Minor
Found in lib/assets/javascripts/keycodes.js by eslint

enforce consistent spacing between keys and values in object literal properties (key-spacing)

This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

Rule Details

This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

Options

This rule has an object option:

  • "beforeColon": false (default) disallows spaces between the key and the colon in object literals
  • "beforeColon": true requires at least one space between the key and the colon in object literals
  • "afterColon": true (default) requires at least one space between the colon and the value in object literals
  • "afterColon": false disallows spaces between the colon and the value in object literals
  • "mode": strict (default) enforces exactly one space before or after colons in object literals
  • "mode": minimum enforces one or more spaces before or after colons in object literals
  • "align": "value" enforces horizontal alignment of values in object literals
  • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
  • "singleLine" specifies a spacing style for single-line object literals
  • "multiLine" specifies a spacing style for multi-line object literals

Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

beforeColon

Examples of incorrect code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo" : 42 }; ```

Examples of correct code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo" : 42 }; ```

afterColon

Examples of incorrect code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo":42 }; ```

Examples of correct code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo":42 }; ```

mode

Examples of incorrect code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "mode": "minimum" } option:

```js /eslint key-spacing: ["error", { "mode": "minimum" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

align

Examples of incorrect code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42, fg : foo() }; ```

Examples of correct code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42,

fg: foo(),
h:  function() {
    return this.a;
},
ijkl: 'Non-consecutive lines form a new group'

};

var obj = { a: "foo", longPropertyName: "bar" }; ```

Examples of incorrect code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat : 2 * 2 }); ```

singleLine and multiLine

Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

js /*eslint "key-spacing": [2, { "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" } }]*/ var obj = { one: 1, "two": 2, three: 3 }; var obj2 = { "two" : 2, three : 3 };

When Not To Use It

If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

Extra space before value for key 'INSERT'.
Open

  INSERT:        45,
Severity: Minor
Found in lib/assets/javascripts/keycodes.js by eslint

enforce consistent spacing between keys and values in object literal properties (key-spacing)

This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

Rule Details

This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

Options

This rule has an object option:

  • "beforeColon": false (default) disallows spaces between the key and the colon in object literals
  • "beforeColon": true requires at least one space between the key and the colon in object literals
  • "afterColon": true (default) requires at least one space between the colon and the value in object literals
  • "afterColon": false disallows spaces between the colon and the value in object literals
  • "mode": strict (default) enforces exactly one space before or after colons in object literals
  • "mode": minimum enforces one or more spaces before or after colons in object literals
  • "align": "value" enforces horizontal alignment of values in object literals
  • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
  • "singleLine" specifies a spacing style for single-line object literals
  • "multiLine" specifies a spacing style for multi-line object literals

Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

beforeColon

Examples of incorrect code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo" : 42 }; ```

Examples of correct code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo" : 42 }; ```

afterColon

Examples of incorrect code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo":42 }; ```

Examples of correct code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo":42 }; ```

mode

Examples of incorrect code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "mode": "minimum" } option:

```js /eslint key-spacing: ["error", { "mode": "minimum" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

align

Examples of incorrect code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42, fg : foo() }; ```

Examples of correct code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42,

fg: foo(),
h:  function() {
    return this.a;
},
ijkl: 'Non-consecutive lines form a new group'

};

var obj = { a: "foo", longPropertyName: "bar" }; ```

Examples of incorrect code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat : 2 * 2 }); ```

singleLine and multiLine

Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

js /*eslint "key-spacing": [2, { "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" } }]*/ var obj = { one: 1, "two": 2, three: 3 }; var obj2 = { "two" : 2, three : 3 };

When Not To Use It

If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

Extra space before value for key '9'.
Open

  9:             57,
Severity: Minor
Found in lib/assets/javascripts/keycodes.js by eslint

enforce consistent spacing between keys and values in object literal properties (key-spacing)

This rule enforces spacing around the colon in object literal properties. It can verify each property individually, or it can ensure horizontal alignment of adjacent properties in an object literal.

Rule Details

This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.

Options

This rule has an object option:

  • "beforeColon": false (default) disallows spaces between the key and the colon in object literals
  • "beforeColon": true requires at least one space between the key and the colon in object literals
  • "afterColon": true (default) requires at least one space between the colon and the value in object literals
  • "afterColon": false disallows spaces between the colon and the value in object literals
  • "mode": strict (default) enforces exactly one space before or after colons in object literals
  • "mode": minimum enforces one or more spaces before or after colons in object literals
  • "align": "value" enforces horizontal alignment of values in object literals
  • "align": "colon" enforces horizontal alignment of both colons and values in object literals.
  • "singleLine" specifies a spacing style for single-line object literals
  • "multiLine" specifies a spacing style for multi-line object literals

Please note that you can either use the top-level options or the grouped options (singleLine and multiLine) but not both.

beforeColon

Examples of incorrect code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo" : 42 }; ```

Examples of correct code for this rule with the default { "beforeColon": false } option:

```js /eslint key-spacing: ["error", { "beforeColon": false }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "beforeColon": true } option:

```js /eslint key-spacing: ["error", { "beforeColon": true }]/

var obj = { "foo" : 42 }; ```

afterColon

Examples of incorrect code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo":42 }; ```

Examples of correct code for this rule with the default { "afterColon": true } option:

```js /eslint key-spacing: ["error", { "afterColon": true }]/

var obj = { "foo": 42 }; ```

Examples of incorrect code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo": 42 }; ```

Examples of correct code for this rule with the { "afterColon": false } option:

```js /eslint key-spacing: ["error", { "afterColon": false }]/

var obj = { "foo":42 }; ```

mode

Examples of incorrect code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the default { "mode": "strict" } option:

```js /eslint key-spacing: ["error", { "mode": "strict" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "mode": "minimum" } option:

```js /eslint key-spacing: ["error", { "mode": "minimum" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

align

Examples of incorrect code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42, fg : foo() }; ```

Examples of correct code for this rule with the { "align": "value" } option:

```js /eslint key-spacing: ["error", { "align": "value" }]/

var obj = { a: value, bcde: 42,

fg: foo(),
h:  function() {
    return this.a;
},
ijkl: 'Non-consecutive lines form a new group'

};

var obj = { a: "foo", longPropertyName: "bar" }; ```

Examples of incorrect code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat: 2 * 2 }); ```

Examples of correct code for this rule with the { "align": "colon" } option:

```js /eslint key-spacing: ["error", { "align": "colon" }]/

call({ foobar: 42, bat : 2 * 2 }); ```

singleLine and multiLine

Examples of correct code for this rule with sample { "singleLine": { }, "multiLine": { } } options:

js /*eslint "key-spacing": [2, { "singleLine": { "beforeColon": false, "afterColon": true }, "multiLine": { "beforeColon": true, "afterColon": true, "align": "colon" } }]*/ var obj = { one: 1, "two": 2, three: 3 }; var obj2 = { "two" : 2, three : 3 };

When Not To Use It

If you have another convention for property spacing that might not be consistent with the available options, or if you want to permit multiple styles concurrently you can safely disable this rule. Source: http://eslint.org/docs/rules/

Rule doesn't have all its properties in alphabetical ordered.
Open

ul.as-selections li:hover.as-selection-item {

Rule doesn't have all its properties in alphabetical ordered.
Open

li.as-result-item em {

Unexpected token '0\9' at line 176, col 15.
Open

  margin-top: 0\9;

Rule doesn't have all its properties in alphabetical ordered.
Open

.qq-upload-drop-area span {

Rule doesn't have all its properties in alphabetical ordered.
Open

li.as-message {

Strings must use doublequote.
Open

    if ($(this).is('form')) {
Severity: Minor
Found in lib/assets/javascripts/clear-form.js by eslint

Enforce Quote Style (quotes)

(fixable) The --fix option on the [command line](../user-guide/command-line-interface#fix) automatically fixes problems reported by this rule.

JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

```js /eslint-env es6/

var double = "double"; var single = 'single'; var backtick = backtick; // ES6 only ```

Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

Many codebases require strings to be defined in a consistent manner.

Rule Details

This rule is aimed at ensuring consistency of string quotes and as such will report a problem when an inconsistent style is found.

The rule configuration takes up to two options:

  1. The first option is "double", "single" or "backtick" for double-quotes, single-quotes or backticks respectively. The default is "double".
  2. The second option takes two options:
    1. "avoidEscape": When using "avoidEscape", this rule will not report a problem when a string is using single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. For example, if you specify "double" and "avoidEscape", the string 'He said, "hi!"' is not considered a problem because using double quotes for that string would require escaping the double quotes inside of the string. This option is off by default.
    2. "allowTemplateLiterals": when using "allowTemplateLiterals", this rule will not report a problem when a string is using backticks and option one is either "double" or "single".

When using "single" or "double", template literals that don't contain a substitution, don't contain a line break and aren't tagged templates, are flagged as problems, even with the "avoidEscape" option. However they are not problems when "allowTemplateLiterals" is used.

Configuration looks like this:

js [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}]

Deprecation notice: The avoid-escape option is a deprecated syntax and you should use the object form instead.

The following patterns are considered problems:

```js /eslint quotes: ["error", "double"]/

var single = 'single'; var unescaped = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single"]/

var double = "double"; var unescaped = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/

var single = 'single'; var double = "double"; var unescaped = 'a string containing backticks'; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var single = 'single'; var double = "double"; ```

The following patterns are not considered problems:

```js /eslint quotes: ["error", "double"]/ /eslint-env es6/

var double = "double"; var backtick = back\ntick; // backticks are allowed due to newline var backtick = tagbacktick; // backticks are allowed due to tag ```

```js /eslint quotes: ["error", "single"]/ /eslint-env es6/

var single = 'single'; var backtick = back${x}tick; // backticks are allowed due to substitution ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"allowTemplateLiterals": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"allowTemplateLiterals": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/ /eslint-env es6/

var backtick = backtick; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var double = "a string containing backtick quotes" ```

When Not To Use It

If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

Strings must use doublequote.
Open

    if ($(this).hasClass('clear_on_submit') || $(this).is(':text') || $(this).is(':password') || $(this).is('textarea')) {
Severity: Minor
Found in lib/assets/javascripts/clear-form.js by eslint

Enforce Quote Style (quotes)

(fixable) The --fix option on the [command line](../user-guide/command-line-interface#fix) automatically fixes problems reported by this rule.

JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

```js /eslint-env es6/

var double = "double"; var single = 'single'; var backtick = backtick; // ES6 only ```

Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

Many codebases require strings to be defined in a consistent manner.

Rule Details

This rule is aimed at ensuring consistency of string quotes and as such will report a problem when an inconsistent style is found.

The rule configuration takes up to two options:

  1. The first option is "double", "single" or "backtick" for double-quotes, single-quotes or backticks respectively. The default is "double".
  2. The second option takes two options:
    1. "avoidEscape": When using "avoidEscape", this rule will not report a problem when a string is using single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. For example, if you specify "double" and "avoidEscape", the string 'He said, "hi!"' is not considered a problem because using double quotes for that string would require escaping the double quotes inside of the string. This option is off by default.
    2. "allowTemplateLiterals": when using "allowTemplateLiterals", this rule will not report a problem when a string is using backticks and option one is either "double" or "single".

When using "single" or "double", template literals that don't contain a substitution, don't contain a line break and aren't tagged templates, are flagged as problems, even with the "avoidEscape" option. However they are not problems when "allowTemplateLiterals" is used.

Configuration looks like this:

js [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}]

Deprecation notice: The avoid-escape option is a deprecated syntax and you should use the object form instead.

The following patterns are considered problems:

```js /eslint quotes: ["error", "double"]/

var single = 'single'; var unescaped = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single"]/

var double = "double"; var unescaped = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/

var single = 'single'; var double = "double"; var unescaped = 'a string containing backticks'; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var single = 'single'; var double = "double"; ```

The following patterns are not considered problems:

```js /eslint quotes: ["error", "double"]/ /eslint-env es6/

var double = "double"; var backtick = back\ntick; // backticks are allowed due to newline var backtick = tagbacktick; // backticks are allowed due to tag ```

```js /eslint quotes: ["error", "single"]/ /eslint-env es6/

var single = 'single'; var backtick = back${x}tick; // backticks are allowed due to substitution ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"allowTemplateLiterals": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"allowTemplateLiterals": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/ /eslint-env es6/

var backtick = backtick; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var double = "a string containing backtick quotes" ```

When Not To Use It

If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

Strings must use doublequote.
Open

    } else if ($(this).is('select')) {
Severity: Minor
Found in lib/assets/javascripts/clear-form.js by eslint

Enforce Quote Style (quotes)

(fixable) The --fix option on the [command line](../user-guide/command-line-interface#fix) automatically fixes problems reported by this rule.

JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

```js /eslint-env es6/

var double = "double"; var single = 'single'; var backtick = backtick; // ES6 only ```

Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

Many codebases require strings to be defined in a consistent manner.

Rule Details

This rule is aimed at ensuring consistency of string quotes and as such will report a problem when an inconsistent style is found.

The rule configuration takes up to two options:

  1. The first option is "double", "single" or "backtick" for double-quotes, single-quotes or backticks respectively. The default is "double".
  2. The second option takes two options:
    1. "avoidEscape": When using "avoidEscape", this rule will not report a problem when a string is using single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. For example, if you specify "double" and "avoidEscape", the string 'He said, "hi!"' is not considered a problem because using double quotes for that string would require escaping the double quotes inside of the string. This option is off by default.
    2. "allowTemplateLiterals": when using "allowTemplateLiterals", this rule will not report a problem when a string is using backticks and option one is either "double" or "single".

When using "single" or "double", template literals that don't contain a substitution, don't contain a line break and aren't tagged templates, are flagged as problems, even with the "avoidEscape" option. However they are not problems when "allowTemplateLiterals" is used.

Configuration looks like this:

js [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}]

Deprecation notice: The avoid-escape option is a deprecated syntax and you should use the object form instead.

The following patterns are considered problems:

```js /eslint quotes: ["error", "double"]/

var single = 'single'; var unescaped = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single"]/

var double = "double"; var unescaped = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/

var single = 'single'; var double = "double"; var unescaped = 'a string containing backticks'; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var single = 'single'; var double = "double"; ```

The following patterns are not considered problems:

```js /eslint quotes: ["error", "double"]/ /eslint-env es6/

var double = "double"; var backtick = back\ntick; // backticks are allowed due to newline var backtick = tagbacktick; // backticks are allowed due to tag ```

```js /eslint quotes: ["error", "single"]/ /eslint-env es6/

var single = 'single'; var backtick = back${x}tick; // backticks are allowed due to substitution ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"allowTemplateLiterals": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"allowTemplateLiterals": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/ /eslint-env es6/

var backtick = backtick; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var double = "a string containing backtick quotes" ```

When Not To Use It

If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

Strings must use doublequote.
Open

      $(this).val('');
Severity: Minor
Found in lib/assets/javascripts/clear-form.js by eslint

Enforce Quote Style (quotes)

(fixable) The --fix option on the [command line](../user-guide/command-line-interface#fix) automatically fixes problems reported by this rule.

JavaScript allows you to define strings in one of three ways: double quotes, single quotes, and backticks (as of ECMAScript 6). For example:

```js /eslint-env es6/

var double = "double"; var single = 'single'; var backtick = backtick; // ES6 only ```

Each of these lines creates a string and, in some cases, can be used interchangeably. The choice of how to define strings in a codebase is a stylistic one outside of template literals (which allow embedded of expressions to be interpreted).

Many codebases require strings to be defined in a consistent manner.

Rule Details

This rule is aimed at ensuring consistency of string quotes and as such will report a problem when an inconsistent style is found.

The rule configuration takes up to two options:

  1. The first option is "double", "single" or "backtick" for double-quotes, single-quotes or backticks respectively. The default is "double".
  2. The second option takes two options:
    1. "avoidEscape": When using "avoidEscape", this rule will not report a problem when a string is using single-quotes or double-quotes so long as the string contains a quote that would have to be escaped otherwise. For example, if you specify "double" and "avoidEscape", the string 'He said, "hi!"' is not considered a problem because using double quotes for that string would require escaping the double quotes inside of the string. This option is off by default.
    2. "allowTemplateLiterals": when using "allowTemplateLiterals", this rule will not report a problem when a string is using backticks and option one is either "double" or "single".

When using "single" or "double", template literals that don't contain a substitution, don't contain a line break and aren't tagged templates, are flagged as problems, even with the "avoidEscape" option. However they are not problems when "allowTemplateLiterals" is used.

Configuration looks like this:

js [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}]

Deprecation notice: The avoid-escape option is a deprecated syntax and you should use the object form instead.

The following patterns are considered problems:

```js /eslint quotes: ["error", "double"]/

var single = 'single'; var unescaped = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single"]/

var double = "double"; var unescaped = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/

var single = 'single'; var double = "double"; var unescaped = 'a string containing backticks'; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var single = 'single'; var double = "double"; ```

The following patterns are not considered problems:

```js /eslint quotes: ["error", "double"]/ /eslint-env es6/

var double = "double"; var backtick = back\ntick; // backticks are allowed due to newline var backtick = tagbacktick; // backticks are allowed due to tag ```

```js /eslint quotes: ["error", "single"]/ /eslint-env es6/

var single = 'single'; var backtick = back${x}tick; // backticks are allowed due to substitution ```

```js /eslint quotes: ["error", "double", {"avoidEscape": true}]/

var single = 'a string containing "double" quotes'; ```

```js /eslint quotes: ["error", "single", {"avoidEscape": true}]/

var double = "a string containing 'single' quotes"; ```

```js /eslint quotes: ["error", "double", {"allowTemplateLiterals": true}]/

var single = 'single'; var single = single; ```

```js /eslint quotes: ["error", "single", {"allowTemplateLiterals": true}]/

var double = "double"; var double = double; ```

```js /eslint quotes: ["error", "backtick"]/ /eslint-env es6/

var backtick = backtick; ```

```js /eslint quotes: ["error", "backtick", {"avoidEscape": true}]/

var double = "a string containing backtick quotes" ```

When Not To Use It

If you do not need consistency in your string styles, you can safely disable this rule. Source: http://eslint.org/docs/rules/

Severity
Category
Status
Source