UNPKG

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