@stordata/eslint-config
Version:
Shareable ESLint configuration for Stordata projects
47 lines (35 loc) • 737 B
JavaScript
import * as fs from 'node:fs';
import * as path from 'node:path';
class A {
constructor() {
this.value = 1;
}
}
const anonymousFunction = function() {
return 1;
},
arrowFunction = () => {
return 2;
},
asyncArrowFunction = async() => {
return 3;
};
async function test() {
const a = 1,
b = 2,
_a = new A();
let array = [1];
array[0] = 2;
array = [1, 2, 3];
const [,, c] = array,
object = { [a]: 1, b };
anonymousFunction();
arrowFunction();
await asyncArrowFunction();
if (b === 3 || array[0] || c || object) {
// console.log('b is 3');
}
fs.accessSync(path.normalize('/tmp'));
return a + b + _a.value;
}
test();