Nanoribbons of molybdenum disulfide (MoS2) are interesting one-dimensional (1D) nanostructures with intriguing electronic properties, consisting of a semiconducting bulk bounded by edges with metallic character. Edges of similar character can also be expected in other transition-metal dichalcogenide (TMDC) nanostructures. We report first-principles electronic structure calculations for the total energy and the band structure of four representative TMDCs, MoS2, MoSe2, WS2, WSe2, in various 1D nanoribbon configurations. We compare the thermodynamic stability and the electronic structure of the 2D bulk and 35 different quasi-1D nanoribbons for each of the four materials. In each case, we consider the reconstructions of the zigzag metal-terminated edge by adding different amounts of chalcogen adatoms. The 1D structures we investigated have positive edge energies when the chalcogen chemical potential is close to the energy of the bulk chalcogen phase, and negative edge energies for higher chemical potential values. We find that the reconstruction with two chalcogen adatoms per edge metal atom is the most stable under usual experimental conditions and that all 1D nanoribbon structures exhibit metallic character.