File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,31 @@ function getConfig(options) {
4444 return config ;
4545}
4646
47+ /**
48+ * Used only by `ForDeprecatedBehavior()` for making sure it was run only one time
49+ * @type {boolean }
50+ */
51+ var didWarnForDeprecatedBehavior = false ;
52+
53+ /**
54+ * Warn if API is deprecated
55+ * @param {Array.<*> } options
56+ */
57+ function warnForDeprecatedBehavior ( options ) {
58+ if ( didWarnForDeprecatedBehavior ) {
59+ return ;
60+ }
61+ didWarnForDeprecatedBehavior = true ;
62+
63+ var config = getConfig ( options ) ;
64+
65+ /* istanbul ignore if */
66+ if ( config . oldBehavior ) {
67+ // eslint-disable-next-line
68+ console . warn ( 'The rule `angular/service-name` will be split up to different rules in the next version. Please read the docs for more information' ) ;
69+ }
70+ }
71+
4772module . exports = {
4873 meta : {
4974 schema : [ {
@@ -53,6 +78,9 @@ module.exports = {
5378 } ]
5479 } ,
5580 create : function ( context ) {
81+
82+ warnForDeprecatedBehavior ( context . options ) ;
83+
5684 return {
5785
5886 CallExpression : function ( node ) {
You can’t perform that action at this time.
0 commit comments