A plugin for ESLint that allows you to use project-specific rules, similar to the --rulesdir
command line option (more).
Workaround for eslint/eslint#2715
- Requires ESLint version 0.8.0 or higher
npm install eslint-plugin-local-rules
'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.',
});
},
};
},
},
};
{
"plugins": [
"eslint-plugin-local-rules"
],
"rules": {
"local-rules/disallow-identifiers": 2
}
}
MIT