@@ -38,6 +38,10 @@ eslintTester.run('file-name', rule, {
3838 // basic directive
3939 filename : 'beautifulDirective.js' ,
4040 code : 'app.directive("beautifulDirective", function() {});'
41+ } , {
42+ // basic component
43+ filename : 'beautifulComponent.js' ,
44+ code : 'app.component("beautifulComponent", {});'
4145 } , {
4246 // typeSeparator dot with filter
4347 filename : 'src/app/myFilter.filter.js' ,
@@ -136,6 +140,33 @@ eslintTester.run('file-name', rule, {
136140 ignoreTypeSuffix : true ,
137141 ignorePrefix : 'xp'
138142 } ]
143+ } , {
144+ // ignorePrefix xp with regex
145+ filename : 'src/app/asset.service.js' ,
146+ code : 'angular.factory("xp.AssetService", xpAssetService)' ,
147+ options : [ {
148+ typeSeparator : 'dot' ,
149+ ignoreTypeSuffix : true ,
150+ ignorePrefix : 'xp.'
151+ } ]
152+ } , {
153+ // ignorePrefix xp in module name
154+ filename : 'src/app/core.module.js' ,
155+ code : 'angular.module("xp.core", function(){})' ,
156+ options : [ {
157+ typeSeparator : 'dot' ,
158+ ignoreTypeSuffix : true ,
159+ ignorePrefix : 'xp.'
160+ } ]
161+ } , {
162+ // ignorePrefix xp in main module name
163+ filename : 'src/app/xp.module.js' ,
164+ code : 'angular.module("xp", function(){})' ,
165+ options : [ {
166+ typeSeparator : 'dot' ,
167+ ignoreTypeSuffix : true ,
168+ ignorePrefix : 'xp.'
169+ } ]
139170 } , {
140171 // ignorePrefix st with typeSeparator dash
141172 filename : 'src/app/appUtils-service.js' ,
@@ -224,6 +255,16 @@ eslintTester.run('file-name', rule, {
224255 ignorePrefix : 'xp'
225256 } ] ,
226257 errors : [ { message : 'Filename must be "asset.service.js"' } ]
258+ } , {
259+ // ignorePrefix xp.
260+ filename : 'src/app/xpAsset.service.js' ,
261+ code : 'angular.factory("xp.AssetService", xpAssetService)' ,
262+ options : [ {
263+ typeSeparator : 'dot' ,
264+ ignoreTypeSuffix : true ,
265+ ignorePrefix : 'xp.'
266+ } ] ,
267+ errors : [ { message : 'Filename must be "asset.service.js"' } ]
227268 } , {
228269 // alphanumeric nameStyle dash and typeSeparator dash with service
229270 filename : 'src/app/app2utils-service.js' ,
0 commit comments