32 lines
2.2 KiB
JavaScript
32 lines
2.2 KiB
JavaScript
'use strict';
|
|
|
|
var _docsUrl = require('../docsUrl');
|
|
|
|
var _docsUrl2 = _interopRequireDefault(_docsUrl);
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Rule Definition
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
module.exports = {
|
|
meta: {
|
|
docs: {
|
|
url: (0, _docsUrl2.default)('no-namespace')
|
|
}
|
|
},
|
|
|
|
create: function (context) {
|
|
return {
|
|
'ImportNamespaceSpecifier': function (node) {
|
|
context.report(node, `Unexpected namespace import.`);
|
|
}
|
|
};
|
|
}
|
|
}; /**
|
|
* @fileoverview Rule to disallow namespace import
|
|
* @author Radek Benkel
|
|
*/
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLW5hbWVzcGFjZS5qcyJdLCJuYW1lcyI6WyJtb2R1bGUiLCJleHBvcnRzIiwibWV0YSIsImRvY3MiLCJ1cmwiLCJjcmVhdGUiLCJjb250ZXh0Iiwibm9kZSIsInJlcG9ydCJdLCJtYXBwaW5ncyI6Ijs7QUFLQTs7Ozs7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU07QUFDSkMsV0FBSyx1QkFBUSxjQUFSO0FBREQ7QUFERixHQURTOztBQU9mQyxVQUFRLFVBQVVDLE9BQVYsRUFBbUI7QUFDekIsV0FBTztBQUNMLGtDQUE0QixVQUFVQyxJQUFWLEVBQWdCO0FBQzFDRCxnQkFBUUUsTUFBUixDQUFlRCxJQUFmLEVBQXNCLDhCQUF0QjtBQUNEO0FBSEksS0FBUDtBQUtEO0FBYmMsQ0FBakIsQyxDQVpBIiwiZmlsZSI6InJ1bGVzL25vLW5hbWVzcGFj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