mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
4b9267f375
commit
ea929465a8
29 changed files with 42 additions and 19 deletions
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
|
@ -14,9 +14,9 @@ jobs:
|
|||
with:
|
||||
node-version: 16.x
|
||||
- name: Install Redrun
|
||||
run: npm i redrun -g
|
||||
run: bun i redrun -g --no-save
|
||||
- name: NPM Install
|
||||
run: npm install
|
||||
run: bun i --no-save
|
||||
- name: Lint
|
||||
run: redrun lint
|
||||
- name: Build
|
||||
|
|
|
|||
7
.github/workflows/nodejs.yml
vendored
7
.github/workflows/nodejs.yml
vendored
|
|
@ -14,14 +14,17 @@ jobs:
|
|||
- 20.x
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install Redrun
|
||||
run: npm i redrun -g
|
||||
run: bun i redrun -g --no-save
|
||||
- name: Install
|
||||
run: npm install
|
||||
run: bun i --no-save
|
||||
- name: Lint
|
||||
run: redrun fix:lint
|
||||
- uses: actions/cache@v3
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import process from 'node:process';
|
||||
import {
|
||||
run,
|
||||
cutEnv,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const {
|
|||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
|
||||
const {env} = process;
|
||||
const {env} = require('process');
|
||||
const isDev = env.NODE_ENV === 'development';
|
||||
|
||||
const extractCSS = (a) => new ExtractTextPlugin(`${a}.css`);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const {env} = process;
|
||||
const {env} = require('process');
|
||||
|
||||
const isDev = env.NODE_ENV === 'development';
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,10 @@ const WebpackBar = require('webpackbar');
|
|||
|
||||
const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin');
|
||||
|
||||
const dir = './client';
|
||||
const dirModules = './client/modules';
|
||||
const {env} = require('process');
|
||||
const modules = './modules';
|
||||
|
||||
const {env} = process;
|
||||
const dirModules = './client/modules';
|
||||
const dir = './client';
|
||||
const {NODE_ENV} = env;
|
||||
const isDev = NODE_ENV === 'development';
|
||||
|
||||
|
|
|
|||
4
HELP.md
4
HELP.md
|
|
@ -669,7 +669,7 @@ npm i cloudcmd express socket.io -S
|
|||
And create `index.js`:
|
||||
|
||||
```js
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import cloudcmd from 'cloudcmd';
|
||||
import {Server} from 'socket.io';
|
||||
import express from 'express';
|
||||
|
|
@ -722,7 +722,7 @@ server.listen(port);
|
|||
Here is example with two `Config Managers`:
|
||||
|
||||
```js
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import cloudcmd from 'cloudcmd';
|
||||
import {Server} from 'socket.io';
|
||||
import express from 'express';
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ npm i cloudcmd express socket.io -S
|
|||
And create `index.js`:
|
||||
|
||||
```js
|
||||
import http from 'http';
|
||||
import http from 'node:http';
|
||||
import cloudcmd from 'cloudcmd';
|
||||
import {Server} from 'socket.io';
|
||||
import express from 'express';
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import {createRequire} from 'module';
|
||||
import {promisify} from 'util';
|
||||
import {createRequire} from 'node:module';
|
||||
import {promisify} from 'node:util';
|
||||
import tryToCatch from 'try-to-catch';
|
||||
import {createSimport} from 'simport';
|
||||
import parse from 'yargs-parser';
|
||||
import process from 'node:process';
|
||||
import exit from '../server/exit.js';
|
||||
import {
|
||||
createConfig,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
import {promisify} from 'util';
|
||||
import {promisify} from 'node:util';
|
||||
import tryToCatch from 'try-to-catch';
|
||||
import {createSimport} from 'simport';
|
||||
import minor from 'minor';
|
||||
import _place from 'place';
|
||||
import rendy from 'rendy';
|
||||
import shortdate from 'shortdate';
|
||||
import process from 'node:process';
|
||||
|
||||
const simport = createSimport(import.meta.url);
|
||||
const place = promisify(_place);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
/* global DOM */
|
||||
const Emitify = require('emitify');
|
||||
const inherits = require('inherits');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
require('../css/main.css');
|
||||
require('../css/nojs.css');
|
||||
require('../css/columns/name-size-date.css');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const codegen = require('codegen.macro');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
const currify = require('currify');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const DIR = `${__dirname}/`;
|
||||
const DIR_COMMON = `${DIR}../common/`;
|
||||
const path = require('path');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const path = require('path');
|
||||
|
||||
const {test, stub} = require('supertape');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const readFilesSync = require('@cloudcmd/read-files-sync');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const test = require('supertape');
|
||||
const {promisify} = require('util');
|
||||
const tryToCatch = require('try-to-catch');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
const snake = require('just-snake-case');
|
||||
|
||||
const {env} = process;
|
||||
const {env} = require('process');
|
||||
const up = (a) => a.toUpperCase();
|
||||
|
||||
module.exports = parse;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const test = require('supertape');
|
||||
const env = require('./env');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const getMessage = (a) => a?.message || a;
|
||||
|
||||
module.exports = (...args) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const {test, stub} = require('supertape');
|
||||
|
||||
const exit = require('./exit');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const net = require('net');
|
||||
const repl = require('repl');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const DIR = '../';
|
||||
const DIR_COMMON = `${DIR}../common/`;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const format = require('format-io');
|
||||
|
||||
const {version} = require('../../package');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const {test, stub} = require('supertape');
|
||||
|
||||
const info = require('./info');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import cloudcmd from './cloudcmd.js';
|
||||
import http from 'http';
|
||||
import {promisify} from 'util';
|
||||
import http from 'node:http';
|
||||
import {promisify} from 'node:util';
|
||||
import currify from 'currify';
|
||||
import squad from 'squad';
|
||||
import tryToCatch from 'try-to-catch';
|
||||
|
|
@ -12,6 +12,7 @@ import opn from 'open';
|
|||
import express from 'express';
|
||||
import {Server} from 'socket.io';
|
||||
import tryRequire from 'tryrequire';
|
||||
import process from 'node:process';
|
||||
|
||||
const bind = (f, self) => f.bind(self);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const http = require('http');
|
||||
const os = require('os');
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const test = require('supertape');
|
||||
const fs = require('fs');
|
||||
const {reRequire} = require('mock-require');
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
const process = require('process');
|
||||
const test = require('supertape');
|
||||
const env = require('../../server/env');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue