-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Load yargs as CJS due to strange compatibility issues * Keep line number parsing code as CJS because it attempts to lazy-load dependencies * Shared workers are always loaded through a dynamic import * Shared worker filenames must now be file:// URLs, but you can provide a URL instance * Test file paths within shared workers are now file:// URLs * Error serialization and code excerpts now support ESM * Title prefixes in the reporters now correctly skip all test file extensions, not just `js`
- Loading branch information
1 parent
c3b385d
commit 6f459e6
Showing
436 changed files
with
2,141 additions
and
2,093 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"ignores": [ | ||
"media/**", | ||
"test/config/fixtures/config-errors/test.js", | ||
"test-tap/fixture/snapshots/test-sourcemaps/build/**", | ||
"test-tap/fixture/report/edgecases/ast-syntax-error.cjs" | ||
], | ||
"rules": { | ||
"import/no-anonymous-default-export": "off", | ||
"import/no-mutable-exports": "off", | ||
"import/order": [ | ||
"error", | ||
{ | ||
"alphabetize": { | ||
"order": "asc" | ||
}, | ||
"newlines-between": "always" | ||
} | ||
], | ||
"import/newline-after-import": "error", | ||
"node/no-unsupported-features/es-syntax": "off", | ||
"no-use-extend-native/no-use-extend-native": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": "index.d.ts", | ||
"rules": { | ||
"@typescript-eslint/member-ordering": "off", | ||
"@typescript-eslint/method-signature-style": "off", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off", | ||
"@typescript-eslint/prefer-function-type": "off", | ||
"@typescript-eslint/unified-signatures": "off" | ||
} | ||
}, | ||
{ | ||
"files": "plugin.d.ts", | ||
"rules": { | ||
"node/prefer-global/url": "off" | ||
} | ||
}, | ||
{ | ||
"files": "test-{d,tap}/**/*.ts", | ||
"rules": { | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-unsafe-call": "off", | ||
"@typescript-eslint/no-unsafe-member-access": "off", | ||
"@typescript-eslint/no-unsafe-return": "off", | ||
"@typescript-eslint/no-unused-vars": "off", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "off", | ||
"import/extensions": "off", | ||
"no-unused-vars": "off" | ||
} | ||
}, | ||
{ | ||
"files": "test-tap/**/*.js", | ||
"rules": { | ||
"promise/prefer-await-to-then": "off", | ||
"unicorn/error-message": "off", | ||
"unicorn/no-array-reduce": "off", | ||
"unicorn/prevent-abbreviations": "off" | ||
} | ||
}, | ||
{ | ||
"files": [ | ||
"test-tap/fixture/**", | ||
"test/**/fixtures/**" | ||
], | ||
"rules": { | ||
"ava/no-todo-test": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"import/no-unresolved": "off" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/usr/bin/env node | ||
import * as cli from '../lib/cli.js'; // eslint-disable-line import/extensions | ||
cli.run(); | ||
import run from '../lib/cli.js'; | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import test from '../lib/worker/main.cjs'; | ||
|
||
export default test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
'use strict'; | ||
const chalk = require('chalk'); | ||
import chalk from 'chalk'; | ||
|
||
let ctx = null; | ||
exports.get = () => { | ||
if (!ctx) { | ||
throw new Error('Chalk has not yet been configured'); | ||
} | ||
let instance = new chalk.Instance(); | ||
export default instance; | ||
|
||
return ctx; | ||
}; | ||
export {instance as chalk}; | ||
|
||
exports.set = options => { | ||
if (ctx) { | ||
let configured = false; | ||
export function set(options) { | ||
if (configured) { | ||
throw new Error('Chalk has already been configured'); | ||
} | ||
|
||
ctx = new chalk.Instance(options); | ||
return ctx; | ||
}; | ||
configured = true; | ||
instance = new chalk.Instance(options); | ||
} |
Oops, something went wrong.