A plugin for ESLint that allows you to use project-specific rules
Branch: master
Clone or download
Latest commit fcd41e3 Jun 30, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit May 5, 2017
LICENSE Initial commit May 5, 2017
README.md Update README Jun 30, 2017
index.js Fix VS Code integration when ESLint project outside VS Code project Jun 30, 2017
package.json 0.1.0 Jun 30, 2017

README.md

eslint-plugin-local-rules

A plugin for ESLint that allows you to use project-specific rules, similar to the --rulesdir command line option (more).

Workaround for https://github.com/eslint/eslint/issues/8769 (previously https://github.com/eslint/eslint/issues/2715).

See https://github.com/taskworld/eslint-plugin-local for another solution.

Dependencies

  • Requires ESLint version 0.8.0 or higher

Install

npm install eslint-plugin-local-rules

Usage

./eslint-local-rules.js

'use strict';

module.exports = {
  'disallow-identifiers': {
    meta: {
      docs: {
        description: 'disallow identifiers',
        category: 'Possible Errors',
        recommended: false,
      },
      schema: [],
    },
    create: function(context) {
      return {
        Identifier: function(node) {
          context.report({
            node: node,
            message: 'Identifiers not allowed for Super Important reasons.',
          });
        },
      };
    },
  },
};

./.eslintrc

{
  "plugins": [
    "eslint-plugin-local-rules"
  ],

  "rules": {
    "local-rules/disallow-identifiers": 2
  }
}

License

MIT