Skip to content

Commit

Permalink
chore(W-17692101): eslint 9 (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley authored Jan 29, 2025
1 parent 9f5a76d commit e464572
Show file tree
Hide file tree
Showing 8 changed files with 545 additions and 300 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion bin/dev.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
// eslint-disable-next-line node/shebang

async function main() {
const {execute} = await import('@oclif/core')
await execute({development: true, dir: import.meta.url})
Expand Down
1 change: 0 additions & 1 deletion bin/run.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env node

// eslint-disable-next-line node/shebang
async function main() {
const {execute} = await import('@oclif/core')
await execute({dir: import.meta.url})
Expand Down
9 changes: 9 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {includeIgnoreFile} from '@eslint/compat'
import oclif from 'eslint-config-oclif'
import prettier from 'eslint-config-prettier'
import path from 'node:path'
import {fileURLToPath} from 'node:url'

const gitignorePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '.gitignore')

export default [includeIgnoreFile(gitignorePath), ...oclif, prettier]
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^19",
"@eslint/compat": "^1.2.5",
"@oclif/prettier-config": "^0.2.1",
"@oclif/test": "^4",
"@types/chai": "^4.3.16",
"@types/mocha": "^10.0.10",
"@types/node": "^18",
"chai": "^4.5.0",
"commitlint": "^19",
"eslint": "^8.57.1",
"eslint-config-oclif": "^5.2.2",
"eslint-config-oclif-typescript": "^3.1.13",
"eslint-config-prettier": "^9.1.0",
"eslint": "^9.19.0",
"eslint-config-oclif": "^6.0.0",
"eslint-config-prettier": "^10.0.1",
"husky": "^9.1.7",
"lint-staged": "^15",
"mocha": "^10.8.2",
Expand Down Expand Up @@ -53,7 +53,7 @@
"build": "shx rm -rf lib && tsc",
"clean": "shx rm -f oclif.manifest.json",
"compile": "tsc",
"lint": "eslint . --ext .ts",
"lint": "eslint",
"postpack": "yarn run clean",
"posttest": "yarn lint",
"prepack": "yarn build && oclif manifest && oclif readme",
Expand Down
5 changes: 1 addition & 4 deletions src/commands/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ export default class HelpCommand extends Command {
static args = {
command: Args.string({description: 'Command to show help for.', required: false}),
}

static description = 'Display help for <%= config.bin %>.'

static flags = {
'nested-commands': Flags.boolean({
char: 'n',
description: 'Include all nested commands in the output.',
}),
}

static strict = false

async run(): Promise<void> {
const {argv, flags} = await this.parse(HelpCommand)
const Help = await loadHelpClass(this.config);
const Help = await loadHelpClass(this.config)
const help = new Help(this.config, {all: flags['nested-commands']})
await help.showHelp(argv as string[])
}
Expand Down
814 changes: 529 additions & 285 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit e464572

Please sign in to comment.