Skip to content

A prettier plugin for the Ruby programming language

License

Notifications You must be signed in to change notification settings

clarkdave/plugin-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prettier-ruby

This is a work in progress plugin for prettier that supports the Ruby programming language. Under the hood it uses the ripperjs package (which in turn uses Ruby's own ripper library) which allows this package to maintain parity with the existing Ruby parser.

Status

There are a lot of node types to support still, as well as tests to write for each. Below is the list of types and their current status.

Incomplete:

  • BEGIN
  • END
  • alias_error
  • arg_ambiguous
  • assign_error
  • class_name_error
  • command_call
  • excessed_comma
  • heredoc_dedent
  • magic_comment
  • operator_ambiguous
  • param_error
  • parse_error
  • string_dvar
  • var_alias

Complete:

  • alias
  • aref
  • aref_field
  • arg_paren
  • args_add
  • args_add_block
  • args_add_star
  • args_new
  • array
  • assign
  • assoc_new
  • assoc_splat
  • assoclist_from_args
  • bare_assoc_hash
  • begin
  • binary
  • block_var
  • blockarg
  • bodystmt
  • brace_block
  • break
  • call
  • case
  • class
  • command
  • const_path_field
  • const_path_ref
  • const_ref
  • def
  • defs
  • defined
  • do_block
  • dot2
  • dot3
  • dyna_symbol
  • else
  • elsif
  • ensure
  • fcall
  • field
  • for
  • hash
  • if
  • if_mod
  • ifop
  • kwrest_param
  • lambda
  • massign
  • method_add_arg
  • method_add_block
  • mlhs_add
  • mlhs_add_post
  • mlhs_add_star
  • mlhs_new
  • mlhs_paren
  • module
  • mrhs_add
  • mrhs_add_star
  • mrhs_new
  • mrhs_new_from_args
  • next
  • opassign
  • params
  • paren
  • program
  • qsymbols_add
  • qsymbols_new
  • qwords_add
  • qwords_new
  • redo
  • regexp_add
  • regexp_literal
  • regexp_new
  • rescue
  • rescue_mod
  • rest_param
  • retry
  • return
  • return0
  • sclass
  • stmts_add
  • stmts_new
  • string_add
  • string_concat
  • string_content
  • string_embexpr
  • string_literal
  • super
  • symbol
  • symbol_literal
  • symbols_add
  • symbols_new
  • top_const_field
  • top_const_ref
  • unary
  • undef
  • unless
  • unless_mod
  • until
  • until_mod
  • var_field
  • var_ref
  • vcall
  • void_stmt
  • when
  • while
  • while_mod
  • word_add
  • word_new
  • words_add
  • words_new
  • xstring_add
  • xstring_literal
  • xstring_new
  • yield
  • yield0
  • zsuper

About

A prettier plugin for the Ruby programming language

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 55.7%
  • Ruby 44.1%
  • Shell 0.2%