Skip to content
Permalink
Browse files

fix: adjust error messages to be more useful

  • Loading branch information...
mattgoucher committed Sep 14, 2016
1 parent ae8df71 commit e35a8e25d8326a5dc400059d14421a5c59ce510d
@@ -48,7 +48,8 @@ module.exports = {
return {};
}

context.report(node, "'{{importStatement}}' import is restricted from being used.", {
context.report(node, "'{{restricted}}' in '{{importStatement}}' import is restricted from being used.", {
restricted: restricted,
importStatement: importStatement
});
});
@@ -46,7 +46,8 @@ module.exports = {
return {};
}

context.report(node, "'{{importStatement}}' import is restricted from being used.", {
context.report(node, "'{{restricted}}' in '{{importStatement}}' import is restricted from being used.", {
restricted,
importStatement
});
});
@@ -49,7 +49,7 @@ ruleTester.run('no-restricted-imports', rule, {
},
errors: [
{
message: '\'fs\' import is restricted from being used.',
message: "'fs' in 'fs' import is restricted from being used.",
type: 'ImportDeclaration'
}
]
@@ -62,7 +62,7 @@ ruleTester.run('no-restricted-imports', rule, {
},
errors: [
{
message: '\'os\' import is restricted from being used.',
message: "'os' in 'os' import is restricted from being used.",
type: 'ImportDeclaration'
}
]
@@ -75,7 +75,7 @@ ruleTester.run('no-restricted-imports', rule, {
},
errors: [
{
message: '\'Receipt.jsx\' import is restricted from being used.',
message: "'.jsx' in 'Receipt.jsx' import is restricted from being used.",
type: 'ImportDeclaration'
}
]

0 comments on commit e35a8e2

Please sign in to comment.
You can’t perform that action at this time.