UNPKG

1.23 kBJavaScriptView Raw
1"use strict";
2
3var isWarnedForDeprecation = false;
4module.exports = {
5 meta: {
6 deprecated: true,
7 schema: [
8 {
9 "oneOf": [
10 {
11 "enum": ["before", "after", "both", "neither"]
12 },
13 {
14 "type": "object",
15 "properties": {
16 "before": {"type": "boolean"},
17 "after": {"type": "boolean"}
18 },
19 "additionalProperties": false
20 }
21 ]
22 }
23 ]
24 },
25 create: function() {
26 return {
27 Program: function() {
28 if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
29 return;
30 }
31
32 /* eslint-disable no-console */
33 console.log('The babel/generator-star-spacing rule is deprecated. Please ' +
34 'use the built in generator-star-spacing rule instead.');
35 /* eslint-enable no-console */
36 isWarnedForDeprecation = true;
37 }
38 };
39 }
40};