forked from srijanpaul-deepsource/bad-javascript-stuff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjs.js
More file actions
49 lines (36 loc) · 790 Bytes
/
js.js
File metadata and controls
49 lines (36 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import path from "path";
import fs from "fs";
import * as prettier from 'prettier'
const x: string = "xx"
const a: string = "q"
const z = 1
console.log(z + x)
console.log(a + x)
console.log(z + x)
console.log(a + x)
const b = { a: 1 }
console.log(`Some ${b}`)
console.log(`Some ${b}`)
console.log(x + prettier.format("a"))
console.log(` some ${prettier.format("a")}`)
console.log(x + prettier.format("a"))
console.log(` some ${prettier.format("a")}`)
const unused_variable = 123;
class Foo {
constructor(x) {
this.x = x;
}
}
path.join("a", "b");
fs.readFile("xx");
// unused object
new Foo(10);
function foo() {
"use strict";
return false;
}
const always_false = foo();
const very_bad_variable = ">:D";
let non_const_and_unused = 'x' && 'y'
let x1 = 1;
let x2 = 2;