Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -1,9 +1,9 @@
'use strict'
const t = require('tap')
const test = t.test
const { test } = require('node:test')
const fs = require('node:fs')
const path = require('node:path')
const { loadESLint } = require('eslint')
const { code } = require('../../build/build-error-serializer')
@@ -15,12 +15,13 @@ test('check generated code syntax', async (t) => {
t.plan(1)
// standard is a esm, we import it like this
const { default: standard } = await import('standard')
const result = await standard.lintText(code)
const Eslint = await loadESLint({ useFlatConfig: true })
const eslint = new Eslint()
const result = await eslint.lintText(code)
// if there are any invalid syntax
// fatal count will be greater than 0
t.equal(result[0].fatalErrorCount, 0)
t.assert.strictEqual(result[0].fatalErrorCount, 0)
})
const isPrepublish = !!process.env.PREPUBLISH
@@ -31,5 +32,5 @@ test('ensure the current error serializer is latest', { skip: !isPrepublish }, a
const current = await fs.promises.readFile(path.resolve('lib/error-serializer.js'))
// line break should not be a problem depends on system
t.equal(unifyLineBreak(current), unifyLineBreak(code))
t.assert.strictEqual(unifyLineBreak(current), unifyLineBreak(code))
})