Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
plugins: [
'dependencies',
'flowtype',
'jasmine',
'jsx-a11y',
'prefer-object-spread',
'prettier',
'react',
'rulesdir',
],
};
// TODO(#21523621): Remove rulesdir when Yarn workspaces is enforced.
const rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = 'modules/eslint-plugin-nuclide-internal';
/**
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @noflow
*/
'use strict';
/* eslint comma-dangle: [1, always-multiline], prefer-object-spread/prefer-object-spread: 0 */
const rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = 'eslint-rules';
module.exports = {
extends: 'fbjs-opensource',
plugins: ['rulesdir', 'prettier'],
parserOptions: {
ecmaVersion: 2017,
sourceType: 'script',
},
rules: {
'rulesdir/license-header': 1,
},
};
const rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = 'eslint-rules';
module.exports = {
extends: 'fbjs-opensource',
plugins: ['import', 'prettier', 'rulesdir'],
rules: {
'consistent-return': 0, // handled by flow
'import/no-duplicates': 2,
'max-len': 0, // handled by prettier
'no-duplicate-imports': 0,
'prettier/prettier': ['error', 'fb', '@format'],
'rulesdir/license-header': 2,
},
};
const { readFileSync } = require('fs')
const { join, resolve } = require('path')
/**
* Helps with using custom eslint rules without creating and publishing as plugin
*/
const rulesDirPlugin = require('eslint-plugin-rulesdir')
rulesDirPlugin.RULES_DIR = join(__dirname, 'scripts/eslint-rules')
const MIT_LICENSE = readFileSync('./LICENSE', 'utf-8')
const LICENSE_HEADER =
'/**\n' +
MIT_LICENSE.split('\n')
.map(line => ` * ${line}`)
.join('\n') +
'\n */'
module.exports = {
env: {
es6: true,
browser: true,
node: true
},
parserOptions: {