Files
flipper/desktop/eslint-plugin-flipper/src/index.ts
Pascal Hartig 3431206c0e Add linter for naked console.errors
Summary:
`console.error(err)` are hard to identify in the codebase especially
as we often don't have reliable stack trace information.

I've already cleaned up a bunch of them manually by going after the most
high-firing ones; this should make it easier to identify the remaining ones.

Reviewed By: jknoxville

Differential Revision: D27913964

fbshipit-source-id: 0ff6624a0c083829846550b40954945d655b7cf6
2021-04-22 05:23:09 -07:00

27 lines
872 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import noRelativeImportsAcrossPackages, {
RULE_NAME as noRelativeImportsAcrossPackagesRuleName,
} from './rules/noRelativeImportsAcrossPackages';
import noElectronRemoteImports, {
RULE_NAME as noElectronRemoteImportsRuleName,
} from './rules/noElectronRemoteImports';
import noConsoleErrorWithoutContext, {
RULE_NAME as noConsoleErrorWithoutContextRuleName,
} from './rules/noConsoleErrorWithoutContext';
module.exports = {
rules: {
[noRelativeImportsAcrossPackagesRuleName]: noRelativeImportsAcrossPackages,
[noElectronRemoteImportsRuleName]: noElectronRemoteImports,
[noConsoleErrorWithoutContextRuleName]: noConsoleErrorWithoutContext,
},
};