0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/doctool/test-deprecation-codes.js
Antoine du Hamel bd462ad81b
test: add lint rule to enforce trailing commas
Only activated on some subfolders to minimize the diff, ideally this
rule would be applied gradually to the entire codebase in follow-up
commits.

PR-URL: https://github.com/nodejs/node/pull/45468
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2022-11-17 13:02:11 +00:00

29 lines
497 B
JavaScript

'use strict';
require('../common');
const path = require('path');
const { spawn } = require('child_process');
const script = path.join(
__dirname,
'..',
'..',
'tools',
'doc',
'deprecationCodes.mjs',
);
const mdPath = path.join(
__dirname,
'..',
'..',
'doc',
'api',
'deprecations.md',
);
const cp = spawn(process.execPath, [script, mdPath], { encoding: 'utf-8', stdio: 'inherit' });
cp.on('error', (err) => { throw err; });
cp.on('exit', (code) => process.exit(code));