UNPKG

802 BJavaScriptView Raw
1"use strict";
2
3var isWarnedForDeprecation = false;
4module.exports = {
5 meta: {
6 deprecated: true,
7 schema: [
8 {
9 "enum": ["always", "methods", "properties", "never"]
10 }
11 ]
12 },
13 create: function() {
14 return {
15 Program: function() {
16 if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
17 return;
18 }
19
20 /* eslint-disable no-console */
21 console.log('The babel/object-shorthand rule is deprecated. Please ' +
22 'use the built in object-shorthand rule instead.');
23 /* eslint-enable no-console */
24 isWarnedForDeprecation = true;
25 }
26 };
27 }
28};