mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-26 09:33:35 +00:00
And enable the import/unambiguous ESLint rule as a check on our
partition between scripts and modules. After this commit, if you add
a new file and get this error:
✖ 1:1 This module could be parsed as a valid script. import/unambiguous
* For a module, add an `import` or `export` declaration to make the
file unambiguously a module (the empty `export {};` declaration
suffices).
* For a script, add the file to the xo overrides section of
package.json that marks it "sourceType": "script", and add a 'use
strict' declaration.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
20 lines
506 B
JavaScript
20 lines
506 B
JavaScript
#!/usr/bin/env node
|
|
'use strict';
|
|
const {exec} = require('child_process');
|
|
const path = require('path');
|
|
|
|
const isWindows = process.platform === 'win32';
|
|
const command = path.join(__dirname, `reinstall-node-modules${isWindows ? '.cmd' : ''}`);
|
|
|
|
const proc = exec(command, error => {
|
|
if (error) {
|
|
console.error(error);
|
|
}
|
|
});
|
|
|
|
proc.stdout.on('data', data => console.log(data.toString()));
|
|
proc.stderr.on('data', data => console.error(data.toString()));
|
|
proc.on('exit', code => {
|
|
process.exit(code);
|
|
});
|