metro/.eslintrc.js

48 lines
1.1 KiB
JavaScript

/**
* 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.
*
* @format
*/
'use strict';
module.exports = {
env: {
node: true,
},
extends: 'eslint-config-fb-strict',
plugins: ['babel', 'flowtype', 'import', 'prettier'],
parser: 'babel-eslint',
rules: {
'import/no-extraneous-dependencies': 'error',
'lint/extra-arrow-initializer': 'off',
'max-len': 'off',
'no-alert': 'off',
'no-console-disallow': 'off',
'no-var': 'off',
'prefer-arrow-callback': 'off',
'prefer-const': ['warn', {destructuring: 'all'}],
'prettier/prettier': ['error', 'fb', '@format'],
'sort-keys': 'off',
},
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',
},
},
],
};