Add JS Linting

This commit is contained in:
Nick Gerleman
2022-12-24 01:46:20 -08:00
parent 014986e9da
commit 4d17e309d2
47 changed files with 1447 additions and 561 deletions

36
javascript/.eslintrc.js Normal file
View File

@@ -0,0 +1,36 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
module.exports = {
extends: [
"eslint:recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended",
],
parser: "@babel/eslint-parser",
env: {
commonjs: true,
es6: true,
},
ignorePatterns: ["dist/**"],
overrides: [
{
files: ["jest.*", "tests/**"],
env: {
node: true,
},
globals: {
getMeasureCounter: "writable",
getMeasureCounterMax: "writable",
getMeasureCounterMin: "writable",
Yoga: "writable",
},
},
],
};