When modifying existing code, update the touched lines to follow StandardJS conventions while preserving the style of untouched code. This ensures gradual, consistent adoption of StandardJS formatting.
When modifying existing code, update the touched lines to follow StandardJS conventions while preserving the style of untouched code. This ensures gradual, consistent adoption of StandardJS formatting.
Key StandardJS rules to apply:
Example of updating code to StandardJS:
// Before
var express = require('../..'),
bodyParser = require('body-parser'),
session = require('express-session');
app.get('/', function(req, res){
res.send('Hello form root route.');
});
// After
const express = require('../..')
const bodyParser = require('body-parser')
const session = require('express-session')
app.get('/', function (req, res) {
res.send('Hello from root route.')
})
Only update lines you’re actively modifying - don’t reformat entire files just for style consistency. This enables gradual adoption while maintaining codebase stability.
Enter the URL of a public GitHub repository