client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript Reviewed By: passy Differential Revision: D16687855 fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
This commit is contained in:
committed by
Facebook Github Bot
parent
53c1eee641
commit
5f53087c7e
31
.eslintrc.js
31
.eslintrc.js
@@ -10,6 +10,15 @@ const fbjs = require('eslint-config-fbjs');
|
||||
// enforces copyright header and @format directive to be present in every file
|
||||
const pattern = /^\*\n \* Copyright 20\d{2}-present Facebook\.\n \* This source code is licensed under the MIT license found in the\n \* LICENSE file in the root directory of this source tree\.\n \* @format\n./;
|
||||
|
||||
const prettierConfig = {
|
||||
requirePragma: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
parser: 'flow',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
parser: 'babel-eslint',
|
||||
extends: 'fbjs',
|
||||
@@ -39,17 +48,17 @@ module.exports = {
|
||||
|
||||
// additional rules for this project
|
||||
'header/header': [2, 'block', {pattern}],
|
||||
'prettier/prettier': [
|
||||
2,
|
||||
{
|
||||
requirePragma: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
parser: 'flow',
|
||||
},
|
||||
],
|
||||
'prettier/prettier': [2, prettierConfig],
|
||||
'flowtype/object-type-delimiter': [0],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ['*.tsx'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
rules: {
|
||||
'prettier/prettier': [2, {...prettierConfig, parser: 'typescript'}],
|
||||
'@typescript-eslint/no-unused-vars': [1, {argsIgnorePattern: '^_'}],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user