+
+ );
}
diff --git a/fixtures/output/no-markdown-with-formatters/typescript.ts b/fixtures/output/no-markdown-with-formatters/typescript.ts
index 29016e3855..1c175a1517 100644
--- a/fixtures/output/no-markdown-with-formatters/typescript.ts
+++ b/fixtures/output/no-markdown-with-formatters/typescript.ts
@@ -1,84 +1,82 @@
// Define a TypeScript interface
interface Person {
- name: string
- age: number
+ name: string;
+ age: number;
}
// Create an array of objects with the defined interface
const people: Person[] = [
- { name: 'Alice', age: 30 },
- { name: 'Bob', age: 25 },
- { name: 'Charlie', age: 35 },
-]
+ { name: "Alice", age: 30 },
+ { name: "Bob", age: 25 },
+ { name: "Charlie", age: 35 },
+];
// eslint-disable-next-line no-console
-const log = console.log
+const log = console.log;
// Use a for...of loop to iterate over the array
for (const person of people) {
- log(`Hello, my name is ${person.name} and I am ${person.age} years old.`)
+ log(`Hello, my name is ${person.name} and I am ${person.age} years old.`);
}
// Define a generic function
-function identity< T >(arg: T): T {
- return arg
+function identity(arg: T): T {
+ return arg;
}
// Use the generic function with type inference
-const result = identity(
- 'TypeScript is awesome',
-)
-log(result)
+const result = identity("TypeScript is awesome");
+log(result);
// Use optional properties in an interface
interface Car {
- make: string
- model?: string
+ make: string;
+ model?: string;
}
// Create objects using the interface
-const car1: Car = { make: 'Toyota' }
+const car1: Car = { make: "Toyota" };
const car2: Car = {
- make: 'Ford',
- model: 'Focus',
-}
+ make: "Ford",
+ model: "Focus",
+};
// Use union types
-type Fruit = 'apple' | 'banana' | 'orange'
-const favoriteFruit: Fruit = 'apple'
+type Fruit = "apple" | "banana" | "orange";
+const favoriteFruit: Fruit = "apple";
// Use a type assertion to tell TypeScript about the type
-const inputValue: any = '42'
-const numericValue = inputValue as number
+const inputValue: any = "42";
+const numericValue = inputValue as number;
// Define a class with access modifiers
class Animal {
- private name: string
+ private name: string;
constructor(name: string) {
- this.name = name
+ this.name = name;
}
protected makeSound(sound: string) {
- log(`${this.name} says ${sound}`)
+ log(`${this.name} says ${sound}`);
}
}
// Extend a class
class Dog extends Animal {
constructor(private alias: string) {
- super(alias)
+ super(alias);
}
bark() {
- this.makeSound('Woof!')
+ this.makeSound("Woof!");
}
}
-const dog = new Dog('Buddy')
-dog.bark()
+const dog = new Dog("Buddy");
+dog.bark();
function fn(): string {
- return `hello${1}`
+ return `hello${1}`;
}
-log(car1, car2, favoriteFruit, numericValue, fn())
+log(car1, car2, favoriteFruit, numericValue, fn());
diff --git a/fixtures/output/no-style/javascript.js b/fixtures/output/no-style/javascript.js
index 9ee4a7ca32..ebb98c3ab7 100644
--- a/fixtures/output/no-style/javascript.js
+++ b/fixtures/output/no-style/javascript.js
@@ -1,30 +1,30 @@
// This file is generated by ChatGPT
// eslint-disable-next-line no-console
-const log = console.log
+const log = console.log;
// Define a class using ES6 class syntax
class Person {
constructor(name, age) {
this.name = name;
- this.age = age;
+ this.age = age;
}
-// Define a method within the class
-sayHello() {
- log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
-}
+ // Define a method within the class
+ sayHello() {
+ log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
+ }
}
// Create an array of objects
const people = [
- new Person('Alice', 30),
- new Person('Bob', 25),
- new Person('Charlie', 35)
+ new Person("Alice", 30),
+ new Person("Bob", 25),
+ new Person("Charlie", 35),
];
// Use the forEach method to iterate over the array
-people.forEach(person => {
+people.forEach((person) => {
person.sayHello();
});
@@ -36,7 +36,10 @@ const multilineString = `
// Use destructuring assignment to extract values from an object
const { name, age } = people[0];
-log(`First person in the array is ${name} and they are ${age} years old.`, multilineString);
+log(
+ `First person in the array is ${name} and they are ${age} years old.`,
+ multilineString
+);
// Use the spread operator to create a new array
const numbers = [1, 2, 3];
@@ -46,27 +49,23 @@ log(newNumbers);
// Use a try-catch block for error handling
try {
// Attempt to parse an invalid JSON string
- JSON.parse('invalid JSON');
+ JSON.parse("invalid JSON");
} catch (error) {
- console.error('Error parsing JSON:', error.message);
+ console.error("Error parsing JSON:", error.message);
}
// Use a ternary conditional operator
-const isEven = num => num % 2 === 0;
+const isEven = (num) => num % 2 === 0;
const number = 7;
-log(`${number} is ${isEven(number) ? 'even' : 'odd'}.`);
+log(`${number} is ${isEven(number) ? "even" : "odd"}.`);
// Use a callback function with setTimeout for asynchronous code
setTimeout(() => {
- log('This code runs after a delay of 2 seconds.');
+ log("This code runs after a delay of 2 seconds.");
}, 2000);
-let a, b, c, d, foo
+let a, b, c, d, foo;
-if (a
- || b
- || c || d
- || (d && b)
- ) {
- foo()
- }
+if (a || b || c || d || (d && b)) {
+ foo();
+}
diff --git a/fixtures/output/no-style/jsx.jsx b/fixtures/output/no-style/jsx.jsx
index ce5c0332a0..5fe8bfd271 100644
--- a/fixtures/output/no-style/jsx.jsx
+++ b/fixtures/output/no-style/jsx.jsx
@@ -1,21 +1,34 @@
export function HelloWorld({
- greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
+ greeting = "hello",
+ greeted = '"World"',
+ silent = false,
+ onMouseOver,
+}) {
+ if (!greeting) {
+ return null;
+ }
- if(!greeting){
- return null};
-
- // TODO: Don't use random in render
- const num = Math.floor (Math.random() * 1e+7).toString()
- .replace(/\.\d+/g, "")
-
- return
+ );
}
diff --git a/fixtures/output/no-style/typescript.ts b/fixtures/output/no-style/typescript.ts
index 1cf34cafb5..db36442584 100644
--- a/fixtures/output/no-style/typescript.ts
+++ b/fixtures/output/no-style/typescript.ts
@@ -1,18 +1,18 @@
// Define a TypeScript interface
-interface Person {
- name: string; age: number;
+interface Person {
+ name: string;
+ age: number;
}
// Create an array of objects with the defined interface
const people: Person[] = [
- { name: 'Alice', age: 30 },
- { name: 'Bob', age: 25 },
- { name: 'Charlie',
- age: 35 }
+ { name: "Alice", age: 30 },
+ { name: "Bob", age: 25 },
+ { name: "Charlie", age: 35 },
];
// eslint-disable-next-line no-console
-const log = console.log
+const log = console.log;
// Use a for...of loop to iterate over the array
for (const person of people) {
@@ -20,13 +20,12 @@ for (const person of people) {
}
// Define a generic function
-function identity< T >(arg: T): T {
+function identity(arg: T): T {
return arg;
}
// Use the generic function with type inference
-const result = identity(
- 'TypeScript is awesome');
+const result = identity("TypeScript is awesome");
log(result);
// Use optional properties in an interface
@@ -36,16 +35,18 @@ interface Car {
}
// Create objects using the interface
-const car1: Car = { make: 'Toyota' };
-const car2: Car = {
- make: 'Ford', model: 'Focus' };
+const car1: Car = { make: "Toyota" };
+const car2: Car = {
+ make: "Ford",
+ model: "Focus",
+};
// Use union types
-type Fruit = 'apple' | 'banana' | 'orange';
-const favoriteFruit: Fruit = 'apple';
+type Fruit = "apple" | "banana" | "orange";
+const favoriteFruit: Fruit = "apple";
// Use a type assertion to tell TypeScript about the type
-const inputValue: any = '42';
+const inputValue: any = "42";
const numericValue = inputValue as number;
// Define a class with access modifiers
@@ -65,16 +66,15 @@ class Dog extends Animal {
super(alias);
}
bark() {
- this.makeSound('Woof!');
+ this.makeSound("Woof!");
}
}
-const dog = new Dog('Buddy');
+const dog = new Dog("Buddy");
dog.bark();
const fn = (): string => {
- return `hello${ 1}`
-}
-
-log(car1, car2, favoriteFruit, numericValue, fn())
+ return `hello${1}`;
+};
+log(car1, car2, favoriteFruit, numericValue, fn());
diff --git a/fixtures/output/no-style/vue-ts.vue b/fixtures/output/no-style/vue-ts.vue
index 944abcf50c..8a94fc878a 100644
--- a/fixtures/output/no-style/vue-ts.vue
+++ b/fixtures/output/no-style/vue-ts.vue
@@ -1,9 +1,9 @@
@@ -19,9 +19,7 @@ const _zero = doubled.value + counter.value
{{ greeting }}
-
+
Counter: {{ counter }}
diff --git a/fixtures/output/tab-double-quotes/javascript.js b/fixtures/output/tab-double-quotes/javascript.js
index 3918d13886..ebb98c3ab7 100644
--- a/fixtures/output/tab-double-quotes/javascript.js
+++ b/fixtures/output/tab-double-quotes/javascript.js
@@ -1,73 +1,71 @@
// This file is generated by ChatGPT
// eslint-disable-next-line no-console
-const log = console.log
+const log = console.log;
// Define a class using ES6 class syntax
class Person {
- constructor(name, age) {
- this.name = name
- this.age = age
- }
+ constructor(name, age) {
+ this.name = name;
+ this.age = age;
+ }
- // Define a method within the class
- sayHello() {
- log(`Hello, my name is ${this.name} and I am ${this.age} years old.`)
- }
+ // Define a method within the class
+ sayHello() {
+ log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
+ }
}
// Create an array of objects
const people = [
- new Person("Alice", 30),
- new Person("Bob", 25),
- new Person("Charlie", 35),
-]
+ new Person("Alice", 30),
+ new Person("Bob", 25),
+ new Person("Charlie", 35),
+];
// Use the forEach method to iterate over the array
people.forEach((person) => {
- person.sayHello()
-})
+ person.sayHello();
+});
// Use a template literal to create a multiline string
const multilineString = `
This is a multiline string
that spans multiple lines.
-`
+`;
// Use destructuring assignment to extract values from an object
-const { name, age } = people[0]
-log(`First person in the array is ${name} and they are ${age} years old.`, multilineString)
+const { name, age } = people[0];
+log(
+ `First person in the array is ${name} and they are ${age} years old.`,
+ multilineString
+);
// Use the spread operator to create a new array
-const numbers = [1, 2, 3]
-const newNumbers = [...numbers, 4, 5]
-log(newNumbers)
+const numbers = [1, 2, 3];
+const newNumbers = [...numbers, 4, 5];
+log(newNumbers);
// Use a try-catch block for error handling
try {
- // Attempt to parse an invalid JSON string
- JSON.parse("invalid JSON")
-}
-catch (error) {
- console.error("Error parsing JSON:", error.message)
+ // Attempt to parse an invalid JSON string
+ JSON.parse("invalid JSON");
+} catch (error) {
+ console.error("Error parsing JSON:", error.message);
}
// Use a ternary conditional operator
-const isEven = num => num % 2 === 0
-const number = 7
-log(`${number} is ${isEven(number) ? "even" : "odd"}.`)
+const isEven = (num) => num % 2 === 0;
+const number = 7;
+log(`${number} is ${isEven(number) ? "even" : "odd"}.`);
// Use a callback function with setTimeout for asynchronous code
setTimeout(() => {
- log("This code runs after a delay of 2 seconds.")
-}, 2000)
+ log("This code runs after a delay of 2 seconds.");
+}, 2000);
-let a, b, c, d, foo
+let a, b, c, d, foo;
-if (a
- || b
- || c || d
- || (d && b)
-) {
- foo()
+if (a || b || c || d || (d && b)) {
+ foo();
}
diff --git a/fixtures/output/tab-double-quotes/jsx.jsx b/fixtures/output/tab-double-quotes/jsx.jsx
index 38c6177c51..5fe8bfd271 100644
--- a/fixtures/output/tab-double-quotes/jsx.jsx
+++ b/fixtures/output/tab-double-quotes/jsx.jsx
@@ -1,27 +1,34 @@
export function HelloWorld({
- greeting = "hello",
- greeted = "\"World\"",
- silent = false,
- onMouseOver,
- }) {
- if (!greeting) {
- return null
- };
+ greeting = "hello",
+ greeted = '"World"',
+ silent = false,
+ onMouseOver,
+}) {
+ if (!greeting) {
+ return null;
+ }
- // TODO: Don't use random in render
- const num = Math.floor (Math.random() * 1e+7).toString()
- .replace(/\.\d+/g, "")
+ // TODO: Don't use random in render
+ const num = Math.floor(Math.random() * 1e7)
+ .toString()
+ .replace(/\.\d+/g, "");
- return (
-
diff --git a/fixtures/output/ts-override/javascript.js b/fixtures/output/ts-override/javascript.js
index e0702598c7..ebb98c3ab7 100644
--- a/fixtures/output/ts-override/javascript.js
+++ b/fixtures/output/ts-override/javascript.js
@@ -1,73 +1,71 @@
// This file is generated by ChatGPT
// eslint-disable-next-line no-console
-const log = console.log
+const log = console.log;
// Define a class using ES6 class syntax
class Person {
constructor(name, age) {
- this.name = name
- this.age = age
+ this.name = name;
+ this.age = age;
}
// Define a method within the class
sayHello() {
- log(`Hello, my name is ${this.name} and I am ${this.age} years old.`)
+ log(`Hello, my name is ${this.name} and I am ${this.age} years old.`);
}
}
// Create an array of objects
const people = [
- new Person('Alice', 30),
- new Person('Bob', 25),
- new Person('Charlie', 35),
-]
+ new Person("Alice", 30),
+ new Person("Bob", 25),
+ new Person("Charlie", 35),
+];
// Use the forEach method to iterate over the array
people.forEach((person) => {
- person.sayHello()
-})
+ person.sayHello();
+});
// Use a template literal to create a multiline string
const multilineString = `
This is a multiline string
that spans multiple lines.
-`
+`;
// Use destructuring assignment to extract values from an object
-const { name, age } = people[0]
-log(`First person in the array is ${name} and they are ${age} years old.`, multilineString)
+const { name, age } = people[0];
+log(
+ `First person in the array is ${name} and they are ${age} years old.`,
+ multilineString
+);
// Use the spread operator to create a new array
-const numbers = [1, 2, 3]
-const newNumbers = [...numbers, 4, 5]
-log(newNumbers)
+const numbers = [1, 2, 3];
+const newNumbers = [...numbers, 4, 5];
+log(newNumbers);
// Use a try-catch block for error handling
try {
// Attempt to parse an invalid JSON string
- JSON.parse('invalid JSON')
-}
-catch (error) {
- console.error('Error parsing JSON:', error.message)
+ JSON.parse("invalid JSON");
+} catch (error) {
+ console.error("Error parsing JSON:", error.message);
}
// Use a ternary conditional operator
-const isEven = num => num % 2 === 0
-const number = 7
-log(`${number} is ${isEven(number) ? 'even' : 'odd'}.`)
+const isEven = (num) => num % 2 === 0;
+const number = 7;
+log(`${number} is ${isEven(number) ? "even" : "odd"}.`);
// Use a callback function with setTimeout for asynchronous code
setTimeout(() => {
- log('This code runs after a delay of 2 seconds.')
-}, 2000)
+ log("This code runs after a delay of 2 seconds.");
+}, 2000);
-let a, b, c, d, foo
+let a, b, c, d, foo;
-if (a
- || b
- || c || d
- || (d && b)
-) {
- foo()
+if (a || b || c || d || (d && b)) {
+ foo();
}
diff --git a/fixtures/output/ts-override/jsx.jsx b/fixtures/output/ts-override/jsx.jsx
index 00b19dfbf6..5fe8bfd271 100644
--- a/fixtures/output/ts-override/jsx.jsx
+++ b/fixtures/output/ts-override/jsx.jsx
@@ -1,27 +1,34 @@
export function HelloWorld({
- greeting = 'hello',
+ greeting = "hello",
greeted = '"World"',
silent = false,
onMouseOver,
}) {
if (!greeting) {
- return null
- };
+ return null;
+ }
// TODO: Don't use random in render
- const num = Math.floor (Math.random() * 1e+7).toString()
- .replace(/\.\d+/g, '')
+ const num = Math.floor(Math.random() * 1e7)
+ .toString()
+ .replace(/\.\d+/g, "");
return (
-