Skip to content

Commit 0ea3bb3

Browse files
authored
Update dependecies and lint (#2489)
1 parent 7c6fd25 commit 0ea3bb3

6 files changed

Lines changed: 193 additions & 350 deletions

File tree

eslint.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import globals from 'globals';
22
import esLintjs from '@eslint/js';
3+
import { defineConfig } from 'eslint/config';
34
import tseslint from 'typescript-eslint';
45
import prettier from 'eslint-config-prettier';
56

@@ -8,13 +9,13 @@ const tsconfigTsFiles = ['**/*.{ts,mts}']; // match "include" in tsconfig.ts.jso
89
const tsconfigJsFiles = ['*.{js,mjs}', 'lib/**/*.{js,mjs}']; // match "include" in tsconfig.js.json
910

1011
// Using tseslint.config adds some type safety and `extends` to simplify customising config array.
11-
export default tseslint.config(
12+
export default defineConfig(
1213
// Add recommended rules.
1314
esLintjs.configs.recommended,
1415
// tseslint with different setup for js/ts
1516
{
1617
files: tsconfigJsFiles,
17-
extends: [...tseslint.configs.recommended],
18+
extends: [tseslint.configs.recommended],
1819
languageOptions: {
1920
parserOptions: { project: './tsconfig.js.json' },
2021
},
@@ -25,7 +26,7 @@ export default tseslint.config(
2526
},
2627
{
2728
files: tsconfigTsFiles,
28-
extends: [...tseslint.configs.recommended],
29+
extends: [tseslint.configs.recommended],
2930
languageOptions: {
3031
parserOptions: { project: './tsconfig.ts.json' },
3132
},

lib/command.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
12131213

12141214
_executeSubCommand(subcommand, args) {
12151215
args = args.slice();
1216-
let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
12171216
const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];
12181217

12191218
function findFile(baseDir, baseName) {
@@ -1274,7 +1273,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
12741273
executableFile = localFile || executableFile;
12751274
}
12761275

1277-
launchWithNode = sourceExt.includes(path.extname(executableFile));
1276+
const launchWithNode = sourceExt.includes(path.extname(executableFile));
12781277

12791278
let proc;
12801279
if (process.platform !== 'win32') {

lib/suggestSimilar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function editDistance(a, b) {
2424
// fill matrix
2525
for (let j = 1; j <= b.length; j++) {
2626
for (let i = 1; i <= a.length; i++) {
27-
let cost = 1;
27+
let cost;
2828
if (a[i - 1] === b[j - 1]) {
2929
cost = 0;
3030
} else {

0 commit comments

Comments
 (0)