'use strict'; var _staticRequire = require('../core/staticRequire'); var _staticRequire2 = _interopRequireDefault(_staticRequire); var _docsUrl = require('../docsUrl'); var _docsUrl2 = _interopRequireDefault(_docsUrl); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function reportIfNonStandard(context, node, name) { if (name.indexOf('!') !== -1) { context.report(node, `Unexpected '!' in '${name}'. ` + 'Do not use import syntax to configure webpack loaders.'); } } module.exports = { meta: { docs: { url: (0, _docsUrl2.default)('no-webpack-loader-syntax') } }, create: function (context) { return { ImportDeclaration: function handleImports(node) { reportIfNonStandard(context, node, node.source.value); }, CallExpression: function handleRequires(node) { if ((0, _staticRequire2.default)(node)) { reportIfNonStandard(context, node, node.arguments[0].value); } } }; } }; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLXdlYnBhY2stbG9hZGVyLXN5bnRheC5qcyJdLCJuYW1lcyI6WyJyZXBvcnRJZk5vblN0YW5kYXJkIiwiY29udGV4dCIsIm5vZGUiLCJuYW1lIiwiaW5kZXhPZiIsInJlcG9ydCIsIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsInVybCIsImNyZWF0ZSIsIkltcG9ydERlY2xhcmF0aW9uIiwiaGFuZGxlSW1wb3J0cyIsInNvdXJjZSIsInZhbHVlIiwiQ2FsbEV4cHJlc3Npb24iLCJoYW5kbGVSZXF1aXJlcyIsImFyZ3VtZW50cyJdLCJtYXBwaW5ncyI6Ijs7QUFBQTs7OztBQUNBOzs7Ozs7QUFFQSxTQUFTQSxtQkFBVCxDQUE2QkMsT0FBN0IsRUFBc0NDLElBQXRDLEVBQTRDQyxJQUE1QyxFQUFrRDtBQUNoRCxNQUFJQSxLQUFLQyxPQUFMLENBQWEsR0FBYixNQUFzQixDQUFDLENBQTNCLEVBQThCO0FBQzVCSCxZQUFRSSxNQUFSLENBQWVILElBQWYsRUFBc0Isc0JBQXFCQyx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