Yup, we should definitely do styling rules, too!


On Tue, Jul 16, 2013 at 6:22 PM, Ilya Volodin <notifications@github.com>wrote:

> In lib/eslint.js:
>
> > @@ -149,6 +152,29 @@ module.exports = (function() {
> >
> >      };
> >
> > +    /**
> > +     * Gets all tokens that are related to the given node.
> > +     * @param {ASTNode} [node] The AST node to get the text for.
> > +     * @param {int} [beforeCount] The number of characters before the node to retrieve.
> > +     * @param {int} [afterCount] The number of characters after the node to retrieve.
> > +     * @returns {Object[]} Array of objects representing tokens.
> > +     */
> > +    api.getTokens = function(node, beforeCount, afterCount) {
> > +        if (node)
> > +        {
>
> I want that rule in the eslint!:-) No joke, I would love to add some
> styling rules too. But they have to be highly customizable. My company
> actually requires that in JS opening bracket should be on the new line.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/nzakas/eslint/pull/49/files#r5233050>
> .
>



-- 

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3