diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..99ba5743 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,14 @@ +{ + "root": true, + "rules": { + "require-await": "off", + "id-length": [ + "error", + { + "min": 6, + "exceptions": ["a", "aa"], + "exceptionPatterns": ["^foo_"] + } + ] + } +} diff --git a/index.js b/index.js index de6dae1a..f354f2bd 100644 --- a/index.js +++ b/index.js @@ -88,3 +88,14 @@ function commentCheck(){ console.log("no comment") debugger } + +async function fetchData() { + let a = 1; + let aa = 2; + let foo_1 = 1; + // `readFileSync` is a synchronous function that blocks + // the main thread, and thus does not need to be `await`ed + return fs.readFileSync("data.txt", "utf-8"); +} + +performAction(async () => { console.log("no awaits in here") });