Skip to content

Commit

Permalink
Upgrade dependencies (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning authored Nov 15, 2023
1 parent 17697ff commit 0fbdb4c
Show file tree
Hide file tree
Showing 8 changed files with 744 additions and 859 deletions.
8 changes: 8 additions & 0 deletions .changeset/blue-doors-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@zazen/cli': minor
---

Upgrade dependencies

- Upgrade `eslint` to 8.53.0
- Upgrade `prettier` to 3.1.0
14 changes: 14 additions & 0 deletions .changeset/five-balloons-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@zazen/eslint-config': minor
---

Upgrade dependencies

- Upgrade @rushstack/eslint-patch to 1.5.1
- Upgrade @typescript-eslint/eslint-plugin to 6.11.0
- Upgrade @typescript-eslint/parser to 6.11.0
- Upgrade eslint-config-prettier to 9.0.0
- Upgrade eslint-config-xo-typescript to 1.0.1
- Upgrade eslint-plugin-etc to 2.0.3
- Upgrade eslint-plugin-n to 16.3.1
- Upgrade eslint-plugin-unicorn to 49.0.0
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
]
},
"devDependencies": {
"@changesets/changelog-github": "0.4.7",
"@changesets/cli": "2.25.0",
"@changesets/changelog-github": "0.4.8",
"@changesets/cli": "2.26.2",
"@zazen/eslint-config": "6.3.0",
"eslint": "8.36.0",
"eslint": "8.53.0",
"husky": "8.0.3",
"lint-staged": "13.2.3",
"prettier": "3.0.2",
"prettier-plugin-packagejson": "2.4.5",
"typescript": "5.1.6"
"lint-staged": "15.1.0",
"prettier": "3.1.0",
"prettier-plugin-packagejson": "2.4.6",
"typescript": "5.2.2"
},
"packageManager": "pnpm@8.6.12",
"engines": {
Expand Down
20 changes: 10 additions & 10 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
"test": "ava"
},
"dependencies": {
"consola": "2.15.3",
"esbuild-register": "3.3.3",
"eslint": "8.36.0",
"execa": "6.1.0",
"consola": "3.2.3",
"esbuild-register": "3.5.0",
"eslint": "8.53.0",
"execa": "8.0.1",
"outdent": "0.8.0",
"prettier": "3.0.2",
"prettier": "3.1.0",
"sade": "1.8.1"
},
"devDependencies": {
"@types/sade": "1.7.4",
"ava": "4.3.3",
"esbuild": "0.15.12",
"esm-utils": "4.1.0",
"get-bin-path": "10.0.0"
"@types/sade": "1.7.7",
"ava": "5.3.1",
"esbuild": "0.19.5",
"esm-utils": "4.2.1",
"get-bin-path": "11.0.0"
}
}
12 changes: 0 additions & 12 deletions packages/eslint-config/__tests__/package.json

This file was deleted.

97 changes: 51 additions & 46 deletions packages/eslint-config/__tests__/test.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
// Import { createRequire } from 'node:module'
import { createRequire } from 'node:module'

import test from 'ava'
// Import { ESLint } from 'eslint'
// import isPlainObj from 'is-plain-obj'
import { ESLint } from 'eslint'
import isPlainObj from 'is-plain-obj'

// const require = createRequire(import.meta.url)
// const hasRule = (errors, ruleId) =>
// errors.some((error) => error.ruleId === ruleId)
const require = createRequire(import.meta.url)
const hasRule = (errors, ruleId) =>
errors.some((error) => error.ruleId === ruleId)

// async function runEslint(string, config) {
// let eslint = new ESLint({
// useEslintrc: false,
// overrideConfig: config,
// })
async function runEslint(string, config) {
let eslint = new ESLint({
useEslintrc: false,
overrideConfig: {
...config,
rules: {
'unicorn/expiring-todo-comments': 'off',
},
},
})

// let [firstResult] = await eslint.lintText(string)
let [firstResult] = await eslint.lintText(string)

// return firstResult.messages
// }
return firstResult.messages
}

test('no op', async (t) => {
/**
Expand All @@ -27,35 +32,35 @@ test('no op', async (t) => {
t.true(true)
})

// Test('main', async (t) => {
// let config = require('../index.js')

// t.true(isPlainObj(config))
// t.true(isPlainObj(config.rules))

// let errors = await runEslint(
// "'use strict';\nfunction q() { const foo = 'FOO' }\n",
// config,
// )
// t.true(hasRule(errors, 'prefer-let/prefer-let'), JSON.stringify(errors))
// })

// test('node', async (t) => {
// let config = require('../node.js')

// t.true(isPlainObj(config))
// t.true(isPlainObj(config.rules))

// let errors = await runEslint(
// "import path from 'path'\nimport foo from './utils/foo'\n",
// {
// parserOptions: { sourceType: 'module', ecmaVersion: 2020 },
// ...config,
// },
// )
// /** @todo Figure out why this rule isn't being caught in tests. */
// t.false(
// hasRule(errors, 'n/file-extension-in-import'),
// JSON.stringify(errors),
// )
// })
test.skip('main', async (t) => {
let config = require('../index.js')

t.true(isPlainObj(config))
t.true(isPlainObj(config.rules))

let errors = await runEslint(
"'use strict';\nfunction q() { const foo = 'FOO' }\n",
config,
)
t.true(hasRule(errors, 'prefer-let/prefer-let'), JSON.stringify(errors))
})

test.skip('node', async (t) => {
let config = require('../node.js')

t.true(isPlainObj(config))
t.true(isPlainObj(config.rules))

let errors = await runEslint(
"import path from 'path'\nimport foo from './utils/foo'\n",
{
parserOptions: { sourceType: 'module', ecmaVersion: 2020 },
...config,
},
)
/** @todo Figure out why this rule isn't being caught in tests. */
t.false(
hasRule(errors, 'n/file-extension-in-import'),
JSON.stringify(errors),
)
})
18 changes: 9 additions & 9 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
"test": "ava"
},
"dependencies": {
"@rushstack/eslint-patch": "1.2.0",
"@typescript-eslint/eslint-plugin": "5.55.0",
"@typescript-eslint/parser": "5.55.0",
"eslint-config-prettier": "8.7.0",
"@rushstack/eslint-patch": "1.5.1",
"@typescript-eslint/eslint-plugin": "6.11.0",
"@typescript-eslint/parser": "6.11.0",
"eslint-config-prettier": "9.0.0",
"eslint-config-xo": "0.43.1",
"eslint-config-xo-typescript": "0.56.0",
"eslint-plugin-etc": "2.0.2",
"eslint-config-xo-typescript": "1.0.1",
"eslint-plugin-etc": "2.0.3",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-n": "15.6.1",
"eslint-plugin-n": "16.3.1",
"eslint-plugin-prefer-let": "3.0.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-unicorn": "46.0.0"
"eslint-plugin-unicorn": "49.0.0"
},
"devDependencies": {
"ava": "5.2.0",
"ava": "5.3.1",
"is-plain-obj": "4.1.0"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 0fbdb4c

Please sign in to comment.