Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Lint, Laugh, Love

Lint, Laugh, Love

Josh Smith

June 02, 2018
Tweet

Other Decks in Programming

Transcript

  1. There’s not really a “silver bullet” that can entirely fix

    these issues. It’s a nuanced problem that involves all stakeholders coordinating with each other on the timeline of the product and how it fulfills business needs. It also requires developers with different skill levels and varying experiences in previous roles to work closely together, learn from each other, make compromises on personal views, and view projects in both the immediate and the long term. Hopefully your work environment includes management that can enable this kind of culture that empowers developers to take proactive measures and to voice concerns not only about their own area of expertise, but also address problems across silos and have an impact on the overall mission of the company.
  2. // simple-mistake.js function getHallAndOates() { var darylHall = 'vocals/keyboard' var

    johnOats = 'guitar/backup vocals' // return the greatest songwriting // duo of all time return darylHall + johnOates } getHallAndOates()
  3. # CLI eslint --rule 'no-unused-vars: 2' ./simple-mistake.js # Output /simple-mistake.js

    5:9 error 'johnOats' is assigned a value but never used no-unused-vars ✖ 1 problem (1 error, 0 warnings)
  4. // security-issue.js function blindTrust() { var superSafeText = prompt('Hello', '')

    if (superSafeText !== null) { // Some people just want to // watch the world burn eval(superSafeText) } } blindTrust()
  5. # CLI eslint --rule 'no-eval: 2' ./security-issue.js # Output /security-issue.js

    8:9 error eval can be harmful no-eval ✖ 1 problem (1 error, 0 warnings)
  6. // stylistic-issue.js // this is the same function as before,

    // but with tabs instead of spaces function getHallAndOates() { var darylHall = 'vocals/keyboard' var johnOats = 'guitar/backup vocals' // return the greatest songwriting // duo of all time return darylHall + johnOates } getHallAndOates()
  7. # CLI eslint --rule 'no-tabs: 2' ./stylistic-issue.js # Output /stylistic-issue.js

    5:9 error Unexpected tab character no-tabs ✖ 1 problem (1 error, 0 warnings)