Make using require() a warning

Summary: Per title. Let's be more consistent, especially for plugins where authors may not know which one to use.

Reviewed By: jknoxville

Differential Revision: D16340189

fbshipit-source-id: ffe49e509f744279e32fc9fc3f1d59efc1328d80
This commit is contained in:
Pascal Hartig
2019-07-18 12:52:08 -07:00
committed by Facebook Github Bot
parent f0be2c5b2e
commit 09c615ce6a
3 changed files with 157 additions and 1 deletions

20
src/.eslintrc.js Normal file
View File

@@ -0,0 +1,20 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
// Eslint rules cascade. Rules defined here are merged with the rules
// defined in the parent directory.
// Somewhat ironically, this particular file is not actually transformed by Babel
// and can't have ES6 imports/exports.
// eslint-disable-line import/no-commonjs
module.exports = {
plugins: ['import'],
rules: {
// Import rules from https://www.npmjs.com/package/eslint-plugin-import
'import/no-commonjs': 1,
},
};