let linter handle type naming conventions
Summary: {gif:kosnw403}
Reviewed By: passy
Differential Revision: D33846715
fbshipit-source-id: 5de4bb0cf88f24f5a26acedb82a0816417fb0787
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c28c454373
commit
1aff8466b1
@@ -189,6 +189,14 @@ module.exports = {
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/naming-convention': [
|
||||
2,
|
||||
{
|
||||
selector: 'typeLike',
|
||||
format: ['PascalCase', 'UPPER_CASE'],
|
||||
leadingUnderscore: 'allow',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -64,6 +64,7 @@ export function parsePath(content: string): string | null {
|
||||
return path.trim();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
export class iOSCrashWatcher extends DeviceListener {
|
||||
constructor(private readonly device: ServerDevice) {
|
||||
super(() => device.connected);
|
||||
|
||||
@@ -25,6 +25,7 @@ import {getFlipperServerConfig} from '../../FlipperServerConfig';
|
||||
import {IdbConfig, setIdbConfig} from './idbConfig';
|
||||
import {assertNotNull} from 'flipper-server-core/src/comms/Utilities';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
type iOSSimulatorDevice = {
|
||||
state: 'Booted' | 'Shutdown' | 'Shutting Down';
|
||||
availability?: string;
|
||||
|
||||
@@ -61,6 +61,7 @@ type RawLogEntry = {
|
||||
// Mar 25 17:06:38 iPhone symptomsd(SymptomEvaluator)[125] <Notice>: Stuff
|
||||
const logRegex = /(^.{15}) ([^ ]+?) ([^\[]+?)\[(\d+?)\] <(\w+?)>: (.*)$/s;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
export class iOSLogListener extends DeviceListener {
|
||||
constructor(
|
||||
isDeviceConnected: () => boolean,
|
||||
|
||||
@@ -160,7 +160,6 @@ To start Flipper against a specific OnDemand instance, set FB_ONDEMAND flag, e.g
|
||||
## Guidelines for writing TypeScript
|
||||
* Prefer `type` for React props and state over interfaces
|
||||
* Don’t prefix interfaces with `I`
|
||||
* Enums, Types and Interfaces use PascalCase (uppercase first letter)
|
||||
* Install 3rd party type definitions as dev dependency (e.g. `yarn add @types/lodash --dev`)
|
||||
|
||||
## Submitting a diff / PR
|
||||
|
||||
Reference in New Issue
Block a user