EditorConfig – Escape the coding style hell



EditorConfig – Escape the coding style hell

0 0


editorconfig-presentation

EditorConfig Presentation

On Github groupsky / editorconfig-presentation

EditorConfig

Escape the coding style hell

Presented by Geno Roupsky

A nice formatted code

function linkify( selector ) {
  if( supports3DTransforms ) {

    var nodes = document.querySelectorAll( selector );

    for( var i = 0, len = nodes.length; i < len; i++ ) {
      var node = nodes[i];

      if( !node.className ) {
        node.className += ' roll';
      }
    }
  }
}
					

After a few edits

function linkify( selector ) {
		if( !supports3DTransforms ) {
			return;
		}

				var nodes = document.querySelectorAll( selector );
  for( var i = 0, len = nodes.length; i < len; i++ ) {
						var node = nodes[i];
			if( !node.className ) {
    node.className += ' roll';
  }
    if ( !node.id ) {
			node.id = 'azi';
		}
}
}
}
	

Solutions?

  • Coding guidelines

  • Manual configuration of editor

  • .editorconfig

EditorConfig to the rescue

  • Automatic
  • Available
  • Extendable

Stellar Links

THE END

BY Geno Roupsky