mirror of
https://github.com/bendtherules/eslint-plugin-undef-init.git
synced 2026-08-18 22:02:50 +00:00
34 lines
916 B
JavaScript
34 lines
916 B
JavaScript
/**
|
|
* @fileoverview Always initialize variables declarations. Instead of naked declarations, set it to undefined.
|
|
* @author Abhas Bhattacharya
|
|
*/
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Requirements
|
|
//------------------------------------------------------------------------------
|
|
|
|
var requireIndex = require("requireindex");
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Plugin Definition
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
// import all rules in lib/rules
|
|
module.exports.rules = requireIndex(__dirname + "/rules");
|
|
|
|
module.exports.configs = {
|
|
recommended: {
|
|
plugins: ['undef-init'],
|
|
|
|
rules: {
|
|
// Disable no-undef-init as its the opposite inbuilt rule
|
|
'no-undef-init': 0,
|
|
'undef-init/undef-init': 1,
|
|
},
|
|
},
|
|
};
|
|
|
|
|