How to use eslint-plugin-rulesdir - 4 common examples

To help you get started, we’ve selected a few eslint-plugin-rulesdir examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookarchive / atom-ide-ui / .eslintrc.js View on Github external
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';
github facebookarchive / ide-flowtype / .eslintrc.js View on Github external
/**
 * 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,
  },
};
github facebookarchive / flow-language-server / .eslintrc.js View on Github external
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,
  },
};
github elastic / apm-agent-rum-js / .eslintrc.js View on Github external
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: {

eslint-plugin-rulesdir

Allows a local ESLint rules directory to be used without a command-line flag

MIT
Latest version published 1 year ago

Package Health Score

53 / 100
Full package analysis

Popular eslint-plugin-rulesdir functions