Skip to content

Commit

Permalink
chore(W-17692101): eslint 9 (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley authored Jan 29, 2025
1 parent cfc0ebf commit 3faaf8f
Show file tree
Hide file tree
Showing 9 changed files with 555 additions and 279 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
19 changes: 19 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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,
{
files: ['test/**/*.ts'],
rules: {
'import/no-named-as-default-member': 'off',
},
},
]
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"devDependencies": {
"@commitlint/config-conventional": "^19",
"@eslint/compat": "^1.2.5",
"@oclif/plugin-help": "^6",
"@oclif/prettier-config": "^0.2.1",
"@oclif/test": "^4.1.8",
Expand All @@ -22,10 +23,9 @@
"@types/sinon": "^17.0.3",
"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 @@ -63,7 +63,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
2 changes: 0 additions & 2 deletions src/commands/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function mergePrototype(result: Command.Class, command: Command.Class): Command.

export default class Commands extends Command {
static description = 'List all <%= config.bin %> commands.'

static enableJsonFlag = true

static flags = {
columns: Flags.custom<Column>({
char: 'c',
Expand Down
2 changes: 0 additions & 2 deletions test/commands/commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class AnotherTestCommand extends TestCommand {
public static args = {
arg1: Args.string(),
}

public static circularObj = obj

public static enableJsonFlag = true

public async run() {
Expand Down
794 changes: 530 additions & 264 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit 3faaf8f

Please sign in to comment.