Skip to content

Commit

Permalink
ESLint: Added eol-last rule (#2902)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored May 25, 2021
1 parent 212dc1c commit 01cc18e
Show file tree
Hide file tree
Showing 24 changed files with 21 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module.exports = {
// stylistic rules
'brace-style': ['warn', '1tbs', { allowSingleLine: true }],
'curly': ['warn', 'all'],
'eol-last': 'warn',
'no-multiple-empty-lines': ['warn', { max: 2, maxBOF: 0, maxEOF: 0 }],
'no-tabs': ['warn', { allowIndentationTabs: true }],
'no-var': 'error',
'one-var': ['warn', 'never'],
Expand Down
2 changes: 1 addition & 1 deletion components/prism-abap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-ada.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Prism.languages.ada = {
'punctuation': /\.\.?|[,;():]/,
'char': /'.'/,
'variable': /\b[a-z](?:[_a-z\d])*\b/i
};
};
2 changes: 1 addition & 1 deletion components/prism-arff.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Prism.languages.arff = {
'keyword': /@(?:attribute|data|end|relation)\b/i,
'number': /\b\d+(?:\.\d+)?\b/,
'punctuation': /[{},]/
};
};
2 changes: 1 addition & 1 deletion components/prism-bbcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Prism.languages.bbcode = {
}
};

Prism.languages.shortcode = Prism.languages.bbcode;
Prism.languages.shortcode = Prism.languages.bbcode;
2 changes: 1 addition & 1 deletion components/prism-brainfuck.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Prism.languages.brainfuck = {
},
'operator': /[.,]/,
'comment': /\S+/
};
};
2 changes: 1 addition & 1 deletion components/prism-csp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Prism.languages.csp = {
pattern: /(?:'unsafe-(?:allow-redirects|dynamic|eval|hash-attributes|hashed-attributes|hashes|inline)'|\*)/i,
alias: 'function'
}
};
};
1 change: 0 additions & 1 deletion components/prism-dot.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@
Prism.languages.gv = Prism.languages.dot;

}(Prism));

2 changes: 1 addition & 1 deletion components/prism-haxe.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ Prism.languages.insertBefore('haxe', 'keyword', {
}
});
Prism.languages.haxe['string'].inside['interpolation'].inside.rest = Prism.languages.haxe;
delete Prism.languages.haxe['class-name'];
delete Prism.languages.haxe['class-name'];
2 changes: 1 addition & 1 deletion components/prism-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Prism.languages.icon = {
'function': /(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,
'operator': /[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,
'punctuation': /[\[\](){},;]/
};
};
2 changes: 1 addition & 1 deletion components/prism-keyman.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Prism.languages.keyman = {
'number': /\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i, // U+####, x###, d### characters and numbers
'operator': /[+>\\,()]/,
'tag': /\$(?:keyman|kmfl|weaver|keymanweb|keymanonly):/i // prefixes
};
};
2 changes: 1 addition & 1 deletion components/prism-mizar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Prism.languages.mizar = {
'number': /(?:\b|-)\d+\b/,
'operator': /\.\.\.|->|&|\.?=/,
'punctuation': /\(#|#\)|[,:;\[\](){}]/
};
};
1 change: 0 additions & 1 deletion components/prism-neon.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ Prism.languages.neon = {
},
'punctuation': /[,:=[\]{}()-]/,
};

2 changes: 1 addition & 1 deletion components/prism-nim.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Prism.languages.nim = {
lookbehind: true
},
'punctuation': /[({\[]\.|\.[)}\]]|[`(){}\[\],:]/
};
};
2 changes: 1 addition & 1 deletion components/prism-php-extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Prism.languages.insertBefore('php', 'variable', {
punctuation: /::|\\/
}
}
});
});
2 changes: 1 addition & 1 deletion components/prism-powerquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Prism.languages.powerquery = {
};

Prism.languages.pq = Prism.languages['powerquery'];
Prism.languages.mscript = Prism.languages['powerquery'];
Prism.languages.mscript = Prism.languages['powerquery'];
2 changes: 1 addition & 1 deletion components/prism-soy.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'soy');
});

}(Prism));
}(Prism));
1 change: 0 additions & 1 deletion components/prism-stylus.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
},



// A selector can contain parentheses only as part of a pseudo-element
// It can span multiple lines.
// It must end with a comma or an accolade or have indented content.
Expand Down
2 changes: 1 addition & 1 deletion components/prism-v.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
}
}
});
}(Prism));
}(Prism));
2 changes: 1 addition & 1 deletion components/prism-wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Prism.languages.wasm = {
'variable': /\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,
'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/,
'punctuation': /[()]/
};
};
2 changes: 1 addition & 1 deletion components/prism-xojo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Prism.languages.xojo = {
'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,
'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,
'punctuation': /[.,;:()]/
};
};
1 change: 0 additions & 1 deletion tests/helper/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const { RegExpParser } = require('regexpp');


Expand Down
2 changes: 1 addition & 1 deletion tests/languages/asciidoc/entity_feature.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
'&#x278a;': '<span class="token entity" title="&#x278a;">&amp;#x278a;</span>',
'&#182;': '<span class="token entity" title="&#182;">&amp;#182;</span>'
};
};
2 changes: 1 addition & 1 deletion tests/languages/groovy/string-interpolation_feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ module.exports = {
'\'$foo ${42}\'': '<span class="token string">\'$foo ${42}\'</span>',
// Triple single quoted string: no interpolation
'\'\'\'$foo ${42}\'\'\'': '<span class="token string">\'\'\'$foo ${42}\'\'\'</span>'
};
};

0 comments on commit 01cc18e

Please sign in to comment.