chore: lint

This commit is contained in:
coderaiser 2023-09-04 15:43:38 +03:00
parent 4b9267f375
commit ea929465a8
29 changed files with 42 additions and 19 deletions

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,4 @@
import process from 'node:process';
import {
run,
cutEnv,

View file

@ -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`);

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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,

View file

@ -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);

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
/* global DOM */
const Emitify = require('emitify');
const inherits = require('inherits');

View file

@ -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');

View file

@ -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');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const DIR = `${__dirname}/`;
const DIR_COMMON = `${DIR}../common/`;
const path = require('path');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const path = require('path');
const {test, stub} = require('supertape');

View file

@ -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');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const test = require('supertape');
const {promisify} = require('util');
const tryToCatch = require('try-to-catch');

View file

@ -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;

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const test = require('supertape');
const env = require('./env');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const getMessage = (a) => a?.message || a;
module.exports = (...args) => {

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const {test, stub} = require('supertape');
const exit = require('./exit');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const net = require('net');
const repl = require('repl');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const DIR = '../';
const DIR_COMMON = `${DIR}../common/`;

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const format = require('format-io');
const {version} = require('../../package');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const {test, stub} = require('supertape');
const info = require('./info');

View file

@ -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);

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const http = require('http');
const os = require('os');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const test = require('supertape');
const fs = require('fs');
const {reRequire} = require('mock-require');

View file

@ -1,5 +1,6 @@
'use strict';
const process = require('process');
const test = require('supertape');
const env = require('../../server/env');