Skip to content

Commit

Permalink
Add a lint rule for enforcing ellipsis (#6692)
Browse files Browse the repository at this point in the history
* Add a lint rule for enforcing ellipsi

* Testing: Expand translate lint to include all functions
  • Loading branch information
danielbachhuber authored May 10, 2018
1 parent 2af2c2f commit b761e6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ module.exports = {
selector: 'CallExpression[callee.name=/^(invokeMap|get|has|hasIn|invoke|result|set|setWith|unset|update|updateWith)$/] > Literal:nth-child(2)',
message: 'Always pass an array as the path argument',
},
{
selector: 'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] Literal[value=/\\.{3}/]',
message: 'Use ellipsis character (…) in place of three dots',
},
],
},
overrides: [
Expand Down
2 changes: 1 addition & 1 deletion components/server-side-render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ServerSideRender extends Component {
return (
<div key="loading" className="wp-block-embed is-loading">

<p>{ __( 'Loading...' ) }</p>
<p>{ __( 'Loading' ) }</p>
</div>
);
}
Expand Down

0 comments on commit b761e6c

Please sign in to comment.