Skip to content

Commit 01cc18e

Browse files
ESLint: Added eol-last rule (#2902)
1 parent 212dc1c commit 01cc18e

24 files changed

+21
-23
lines changed

.eslintrc.js

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ module.exports = {
99
// stylistic rules
1010
'brace-style': ['warn', '1tbs', { allowSingleLine: true }],
1111
'curly': ['warn', 'all'],
12+
'eol-last': 'warn',
13+
'no-multiple-empty-lines': ['warn', { max: 2, maxBOF: 0, maxEOF: 0 }],
1214
'no-tabs': ['warn', { allowIndentationTabs: true }],
1315
'no-var': 'error',
1416
'one-var': ['warn', 'never'],

components/prism-abap.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-ada.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Prism.languages.ada = {
1616
'punctuation': /\.\.?|[,;():]/,
1717
'char': /'.'/,
1818
'variable': /\b[a-z](?:[_a-z\d])*\b/i
19-
};
19+
};

components/prism-arff.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Prism.languages.arff = {
77
'keyword': /@(?:attribute|data|end|relation)\b/i,
88
'number': /\b\d+(?:\.\d+)?\b/,
99
'punctuation': /[{},]/
10-
};
10+
};

components/prism-bbcode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ Prism.languages.bbcode = {
2626
}
2727
};
2828

29-
Prism.languages.shortcode = Prism.languages.bbcode;
29+
Prism.languages.shortcode = Prism.languages.bbcode;

components/prism-brainfuck.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Prism.languages.brainfuck = {
1717
},
1818
'operator': /[.,]/,
1919
'comment': /\S+/
20-
};
20+
};

components/prism-csp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ Prism.languages.csp = {
2626
pattern: /(?:'unsafe-(?:allow-redirects|dynamic|eval|hash-attributes|hashed-attributes|hashes|inline)'|\*)/i,
2727
alias: 'function'
2828
}
29-
};
29+
};

components/prism-dot.js

-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@
7474
Prism.languages.gv = Prism.languages.dot;
7575

7676
}(Prism));
77-

components/prism-haxe.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ Prism.languages.insertBefore('haxe', 'keyword', {
4242
}
4343
});
4444
Prism.languages.haxe['string'].inside['interpolation'].inside.rest = Prism.languages.haxe;
45-
delete Prism.languages.haxe['class-name'];
45+
delete Prism.languages.haxe['class-name'];

components/prism-icon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Prism.languages.icon = {
1717
'function': /(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
1818
'operator': /[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
1919
'punctuation': /[\[\](){},;]/
20-
};
20+
};

components/prism-keyman.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Prism.languages.keyman = {
1111
'number': /\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i, // U+####, x###, d### characters and numbers
1212
'operator': /[+>\\,()]/,
1313
'tag': /\$(?:keyman|kmfl|weaver|keymanweb|keymanonly):/i // prefixes
14-
};
14+
};

components/prism-mizar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ Prism.languages.mizar = {
99
'number': /(?:\b|-)\d+\b/,
1010
'operator': /\.\.\.|->|&|\.?=/,
1111
'punctuation': /\(#|#\)|[,:;\[\](){}]/
12-
};
12+
};

components/prism-neon.js

-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,3 @@ Prism.languages.neon = {
3838
},
3939
'punctuation': /[,:=[\]{}()-]/,
4040
};
41-

components/prism-nim.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ Prism.languages.nim = {
3030
lookbehind: true
3131
},
3232
'punctuation': /[({\[]\.|\.[)}\]]|[`(){}\[\],:]/
33-
};
33+
};

components/prism-php-extras.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ Prism.languages.insertBefore('php', 'variable', {
88
punctuation: /::|\\/
99
}
1010
}
11-
});
11+
});

components/prism-powerquery.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ Prism.languages.powerquery = {
5252
};
5353

5454
Prism.languages.pq = Prism.languages['powerquery'];
55-
Prism.languages.mscript = Prism.languages['powerquery'];
55+
Prism.languages.mscript = Prism.languages['powerquery'];

components/prism-soy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@
9393
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'soy');
9494
});
9595

96-
}(Prism));
96+
}(Prism));

components/prism-stylus.js

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@
117117
},
118118

119119

120-
121120
// A selector can contain parentheses only as part of a pseudo-element
122121
// It can span multiple lines.
123122
// It must end with a comma or an accolade or have indented content.

components/prism-v.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@
7676
}
7777
}
7878
});
79-
}(Prism));
79+
}(Prism));

components/prism-wasm.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ Prism.languages.wasm = {
2828
'variable': /\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,
2929
'number': /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
3030
'punctuation': /[()]/
31-
};
31+
};

components/prism-xojo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Prism.languages.xojo = {
1414
'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,
1515
'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,
1616
'punctuation': /[.,;:()]/
17-
};
17+
};

tests/helper/util.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
const { RegExpParser } = require('regexpp');
32

43

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
'&#x278a;': '<span class="token entity" title="&#x278a;">&amp;#x278a;</span>',
33
'&#182;': '<span class="token entity" title="&#182;">&amp;#182;</span>'
4-
};
4+
};

tests/languages/groovy/string-interpolation_feature.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ module.exports = {
2525
'\'$foo ${42}\'': '<span class="token string">\'$foo ${42}\'</span>',
2626
// Triple single quoted string: no interpolation
2727
'\'\'\'$foo ${42}\'\'\'': '<span class="token string">\'\'\'$foo ${42}\'\'\'</span>'
28-
};
28+
};

0 commit comments

Comments
 (0)