Regenerating node_modules

This commit is contained in:
Chris Raynor 2020-09-14 10:42:37 +01:00
parent 09b4a82c83
commit c96f84308a
No known key found for this signature in database
GPG key ID: 579A1FBC36FDA261
5488 changed files with 487362 additions and 60779 deletions

View file

@ -0,0 +1,32 @@
/**
* @fileoverview Rule to ensure that there exist no index files
* @author Stefan Lau
*/
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
var path = require('path'),
parseFilename = require('../common/parseFilename'),
isIgnoredFilename = require('../common/isIgnoredFilename'),
isIndexFile = require('../common/isIndexFile');
module.exports = function(context) {
return {
"Program": function(node) {
var filename = context.getFilename(),
absoluteFilename = path.resolve(filename),
parsed = parseFilename(absoluteFilename),
shouldIgnore = isIgnoredFilename(filename),
isIndex = isIndexFile(parsed);
if (shouldIgnore) return;
if (isIndex) {
context.report(node, "'index.js' files are not allowed.");
}
}
};
};