2017-12-11 20:15:59 +00:00
|
|
|
/**
|
2018-02-28 12:07:25 +00:00
|
|
|
* Copyright (c) 2004-present, Facebook, Inc.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-12-11 20:15:59 +00:00
|
|
|
*
|
|
|
|
* @format
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
extends: 'eslint-config-fb-strict',
|
2018-02-28 12:07:25 +00:00
|
|
|
plugins: ['babel', 'flowtype', 'import', 'prettier'],
|
2017-12-11 20:15:59 +00:00
|
|
|
parser: 'babel-eslint',
|
|
|
|
rules: {
|
2018-03-01 13:38:58 +00:00
|
|
|
'consistent-return': 'error',
|
2018-02-28 12:07:25 +00:00
|
|
|
'import/no-extraneous-dependencies': 'error',
|
2018-02-09 18:59:42 +00:00
|
|
|
'lint/extra-arrow-initializer': 'off',
|
2017-12-11 20:15:59 +00:00
|
|
|
'max-len': 'off',
|
2018-03-01 13:38:58 +00:00
|
|
|
'no-alert': 'error',
|
|
|
|
'no-console': 'error',
|
|
|
|
'no-unused-vars': 'error',
|
2017-12-11 20:15:59 +00:00
|
|
|
'no-var': 'off',
|
|
|
|
'prefer-arrow-callback': 'off',
|
|
|
|
'prefer-const': ['warn', {destructuring: 'all'}],
|
|
|
|
'prettier/prettier': ['error', 'fb', '@format'],
|
|
|
|
'sort-keys': 'off',
|
|
|
|
},
|
2018-02-15 16:11:35 +00:00
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ['packages/metro-source-map/**/*.js'],
|
|
|
|
rules: {
|
|
|
|
'operator-assignment': ['error', 'never'],
|
|
|
|
},
|
|
|
|
env: {
|
|
|
|
node: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['scripts/**/*.js'],
|
|
|
|
rules: {
|
|
|
|
'babel/func-params-comma-dangle': 'off',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2017-12-11 20:15:59 +00:00
|
|
|
};
|