Skip to content

Commit 48f4b95

Browse files
committed
chore(sync): re-cascade oxlint plugin (oxfmt-formatted bodies)
Earlier cascade landed pre-format bodies; this picks up the oxfmt-normalized versions. Source: socket-repo-template@HEAD.
1 parent aff0d54 commit 48f4b95

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.config/oxlint-plugin/rules/no-console-prefer-logger.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ const rule = {
5656
// Only flag when console.<method> is the callee of a call
5757
// (skip e.g. `typeof console.log` or destructuring).
5858
const parent = node.parent
59-
if (!parent || parent.type !== 'CallExpression' || parent.callee !== node) {
59+
if (
60+
!parent ||
61+
parent.type !== 'CallExpression' ||
62+
parent.callee !== node
63+
) {
6064
return
6165
}
6266

.config/oxlint-plugin/rules/no-dynamic-import-outside-bundle.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const rule = {
3131
},
3232
messages: {
3333
dynamic:
34-
"Dynamic import() in {{file}} — favor a static `import` statement at the top of the file. Dynamic import is only valid in bundled code (src/, .config/, packages/). If lazy resolution is required, justify it explicitly.",
34+
'Dynamic import() in {{file}} — favor a static `import` statement at the top of the file. Dynamic import is only valid in bundled code (src/, .config/, packages/). If lazy resolution is required, justify it explicitly.',
3535
},
3636
schema: [
3737
{
@@ -54,10 +54,7 @@ const rule = {
5454
const bundledRoots = options.bundledRoots || DEFAULT_BUNDLED_ROOTS
5555
const filename = context.physicalFilename || context.filename
5656
const cwd = context.cwd || process.cwd()
57-
const relative = path
58-
.relative(cwd, filename)
59-
.split(path.sep)
60-
.join('/')
57+
const relative = path.relative(cwd, filename).split(path.sep).join('/')
6158

6259
const inBundled = bundledRoots.some(root => relative.startsWith(root))
6360

0 commit comments

Comments
 (0)