mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
test: add trailing line breaks to conformance fixtures (#5541)
Continuation of #5537. Ensure all conformance fixture files have a trailing line break.
This commit is contained in:
parent
d8b29e752a
commit
dc924892cc
57 changed files with 57 additions and 57 deletions
|
|
@ -8,4 +8,4 @@ const B = () => { return B };
|
|||
|
||||
const C = function () {}
|
||||
|
||||
const D = () => `${''}`;
|
||||
const D = () => `${''}`;
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ const F = {
|
|||
b: `b`
|
||||
},
|
||||
array: [`a`, , { b: `\n` }],
|
||||
} as const
|
||||
} as const
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ class AsyncClassBad {
|
|||
async method() {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
export {}
|
||||
|
|
|
|||
|
|
@ -8,4 +8,4 @@ export const bar: (this: ThisType2) => void = function() {}
|
|||
|
||||
import { type InferType1, type InferType2 } from 'infer';
|
||||
|
||||
export type F<X extends InferType1> = X extends infer U extends InferType2 ? U : never
|
||||
export type F<X extends InferType1> = X extends infer U extends InferType2 ? U : never
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
type A = string;
|
||||
export function a(): A {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import * as a from "mod";
|
||||
import * as a from "mod";
|
||||
|
|
|
|||
|
|
@ -31,4 +31,4 @@ namespace qux {
|
|||
|
||||
qux.woo = 42;
|
||||
|
||||
export default qux;
|
||||
export default qux;
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ function a(a: any): any {}
|
|||
|
||||
|
||||
function b(a: number): number {};
|
||||
function b(a: string): string {};
|
||||
function b(a: string): string {};
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ export function fooBad([a, b] = [1, 2]): number {
|
|||
|
||||
export const fooBad2 = ({a, b} = { a: 1, b: 2 }): number => {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@ class GeneratorClassBad {
|
|||
yield 50;
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,4 @@ const unaryB = -1_2n;
|
|||
// UnaryExpression
|
||||
const unaryC = +"str"
|
||||
const unaryD = typeof "str"
|
||||
const unaryE = {E: -"str"} as const
|
||||
const unaryE = {E: -"str"} as const
|
||||
|
|
|
|||
|
|
@ -29,4 +29,4 @@ function qux() {
|
|||
function quux() {
|
||||
return `${''}`
|
||||
}
|
||||
// Inferred type is string
|
||||
// Inferred type is string
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ export let GOOD = `useCssV${v}ars`
|
|||
|
||||
export const BAD = `useCssV${v}ars`
|
||||
|
||||
export let BAD2 = `useCssV${v}ars` as const
|
||||
export let BAD2 = `useCssV${v}ars` as const
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ import {T} from 'bar'
|
|||
|
||||
export interface I {
|
||||
prop: {[key in K]: T}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ const { c, d } = { c: 1, d: 2 };
|
|||
const [ e ] = [4];
|
||||
export { c, d, e }
|
||||
|
||||
export const { f, g } = { f: 5, g: 6 };
|
||||
export const { f, g } = { f: 5, g: 6 };
|
||||
|
|
|
|||
|
|
@ -23,4 +23,4 @@ class ClsBad {
|
|||
}
|
||||
set a(v) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const FOO = 'FOO'
|
||||
export const FOO = 'FOO'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import * as deepDep from './deprecated'
|
||||
export { deepDep }
|
||||
export { deepDep }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const e = "e"
|
||||
export const e = "e"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import * as b from './b'
|
||||
export { b }
|
||||
export { b }
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import * as d from './d'
|
||||
export { d }
|
||||
export { d }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const e = "e"
|
||||
export const e = "e"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import * as b from './b'
|
||||
export default b
|
||||
export default b
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
no js here!
|
||||
no js here!
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export default "Users"
|
||||
export default "Users"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// bar.js
|
||||
export { default as foo } from './foo'
|
||||
export { default as foo } from './foo'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
// foo.js
|
||||
module.exports = { foo: 'foo' }
|
||||
module.exports = { foo: 'foo' }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
exports.parserOptions = {
|
||||
sourceType: 'module',
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export { test } from './issue210.js'
|
||||
export { test } from './issue210.js'
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ export function Baz2() {
|
|||
<span>Baz2</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export * from "./baz.jsx";
|
||||
export { Qux1, Qux2 } from "./qux.jsx";
|
||||
export { Qux1, Qux2 } from "./qux.jsx";
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ export function Qux2() {
|
|||
<p>Qux1</p>
|
||||
</div>
|
||||
);;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export * from './named.jsx'
|
||||
export * from './named.jsx'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export bar from './bar'
|
||||
export foo from './default-export'
|
||||
export foo from './default-export'
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
export const me = 'awesome'
|
||||
export { me as soGreat } from './narcissist'
|
||||
export { me as soGreat } from './narcissist'
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import { destructured } from './file-destructured-1';
|
||||
import { destructured } from './file-destructured-1';
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
import { h3 as h0 } from './file-h'
|
||||
import { h3 as h0 } from './file-h'
|
||||
|
|
|
|||
2
crates/oxc_linter/fixtures/import/node_modules/es6-module/index.js
generated
vendored
2
crates/oxc_linter/fixtures/import/node_modules/es6-module/index.js
generated
vendored
|
|
@ -1 +1 @@
|
|||
export const foo = 'bar'
|
||||
export const foo = 'bar'
|
||||
|
|
|
|||
2
crates/oxc_linter/fixtures/import/node_modules/eslint-import-resolver-foo/index.js
generated
vendored
2
crates/oxc_linter/fixtures/import/node_modules/eslint-import-resolver-foo/index.js
generated
vendored
|
|
@ -1 +1 @@
|
|||
../../foo-bar-resolver-v2.js
|
||||
../../foo-bar-resolver-v2.js
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
import { a } from '../named-exports'
|
||||
export { a }
|
||||
export { a }
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export function someThing() {}
|
||||
export function someThing() {}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
boo!
|
||||
boo!
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import App from './App';
|
||||
|
||||
export const x = App
|
||||
export const x = App
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@ export function hello() {
|
|||
|
||||
export function unused() {
|
||||
console.log('im unused!!');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
module.exports = {}
|
||||
module.exports = {}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
let Component = () => <div></div>;
|
||||
<Component></Component>
|
||||
<Component></Component>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
let A = {};
|
||||
|
||||
<A.B.C></A.B.C>;
|
||||
<A.B.C></A.B.C>;
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ try {
|
|||
}
|
||||
|
||||
const unresolved = e;
|
||||
const dontReference2 = a;
|
||||
const dontReference2 = a;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ class Foo {
|
|||
get x: () => {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
class Foo {
|
||||
set x: (v: number) => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,4 +59,4 @@ export type LocalInterface =
|
|||
& import("pkg", { with: {} }).ImportInterface;
|
||||
|
||||
export const a = (null as any as import("pkg", { with: {} }).RequireInterface);
|
||||
export const b = (null as any as import("pkg", { with: {} }).ImportInterface);
|
||||
export const b = (null as any as import("pkg", { with: {} }).ImportInterface);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
class a { const enum b(); }
|
||||
class a { const enum b(); }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
Test: {
|
||||
Test: console.log('Test');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
type A = import("foo", {with: {type: "json"}})
|
||||
type A = import("foo", {with: {type: "json"}})
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
const A = <const T extends F>() => {};
|
||||
const B = <const T extends keyof F>() => {};
|
||||
const B = <const T extends keyof F>() => {};
|
||||
|
|
|
|||
|
|
@ -142,4 +142,4 @@ process.on('unhandledRejection', () => {
|
|||
// Don't exit when a test does this
|
||||
})
|
||||
|
||||
server.listen(32055, () => {});
|
||||
server.listen(32055, () => {});
|
||||
|
|
|
|||
Loading…
Reference in a new issue