Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(W-17692101): eslint 9 #821

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .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-commands": "^3.3.3",
"@oclif/plugin-help": "^6",
"@oclif/prettier-config": "^0.2.1",
Expand All @@ -23,10 +24,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 @@ -64,7 +64,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
1 change: 1 addition & 0 deletions test/closest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import utils from '../src/utils.js'

describe('closest', () => {
const possibilities = ['abc', 'def', 'ghi', 'jkl', 'jlk']

it('exact match', () => {
expect(utils.closest('abc', possibilities)).to.equal('abc')
})
Expand Down
814 changes: 529 additions & 285 deletions yarn.lock

Large diffs are not rendered by default.

Loading