mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
ESLintify Part 1 (#837)
* ESLint-ify * Allow empty try/catch * Escape regexp
This commit is contained in:
parent
128dbfca0a
commit
e8e3f42685
44 changed files with 466 additions and 555 deletions
|
@ -25,8 +25,8 @@ module.exports = function translatePlugin(babel) {
|
|||
description = attributes[i].value.value;
|
||||
}
|
||||
}
|
||||
/* use an expression container if inside a jsxelement */
|
||||
if (path.findParent(path => true).node.type === 'JSXElement') {
|
||||
/* use an expression container if inside a JSXElement */
|
||||
if (path.findParent(() => true).node.type === 'JSXElement') {
|
||||
path.replaceWith(
|
||||
t.jSXExpressionContainer(
|
||||
t.callExpression(t.identifier('translate'), [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue