Updated rules to new format, added deprecated flag (babel/eslint-plugin-babel#119)
This commit is contained in:
parent
3855f28ebb
commit
7f94d5f75f
@ -1,23 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
return {
|
meta: {
|
||||||
Program() {
|
deprecated: true,
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
schema: [
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* eslint-disable no-console */
|
|
||||||
console.log('The babel/array-bracket-spacing rule is deprecated. Please ' +
|
|
||||||
'use the built in array-bracket-spacing rule instead.');
|
|
||||||
/* eslint-enable no-console */
|
|
||||||
isWarnedForDeprecation = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
{
|
||||||
"enum": ["always", "never"]
|
"enum": ["always", "never"]
|
||||||
},
|
},
|
||||||
@ -36,4 +23,21 @@ module.exports.schema = [
|
|||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
|
return {
|
||||||
|
Program: function() {
|
||||||
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
console.log('The babel/array-bracket-spacing rule is deprecated. Please ' +
|
||||||
|
'use the built in array-bracket-spacing rule instead.');
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
isWarnedForDeprecation = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
|
meta: {
|
||||||
|
deprecated: true,
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
"enum": ["always", "as-needed"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
return {
|
return {
|
||||||
Program() {
|
Program: function() {
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -15,10 +24,5 @@ module.exports = function() {
|
|||||||
isWarnedForDeprecation = true;
|
isWarnedForDeprecation = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
|
||||||
"enum": ["always", "as-needed"]
|
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
|
meta: {
|
||||||
|
deprecated: true,
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
"enum": ["semicolon", "comma"],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
return {
|
return {
|
||||||
Program() {
|
Program: function() {
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -16,10 +25,5 @@ module.exports = function() {
|
|||||||
isWarnedForDeprecation = true;
|
isWarnedForDeprecation = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
|
||||||
'enum': ['semicolon', 'comma'],
|
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
|
meta: {
|
||||||
|
deprecated: true,
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
"enum": ["always", "always-multiline", "only-multiline", "never"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
return {
|
return {
|
||||||
Program() {
|
Program: function() {
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -15,10 +24,5 @@ module.exports = function() {
|
|||||||
isWarnedForDeprecation = true;
|
isWarnedForDeprecation = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
|
||||||
enum: ['always', 'always-multiline', 'only-multiline', 'never']
|
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
|
|||||||
@ -1,23 +1,10 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
return {
|
meta: {
|
||||||
Program() {
|
deprecated: true,
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
schema: [
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* eslint-disable no-console */
|
|
||||||
console.log('The babel/generator-star-spacing rule is deprecated. Please ' +
|
|
||||||
'use the built in generator-star-spacing rule instead.');
|
|
||||||
/* eslint-enable no-console */
|
|
||||||
isWarnedForDeprecation = true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
{
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
@ -33,4 +20,21 @@ module.exports.schema = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
];
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
|
return {
|
||||||
|
Program: function() {
|
||||||
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* eslint-disable no-console */
|
||||||
|
console.log('The babel/generator-star-spacing rule is deprecated. Please ' +
|
||||||
|
'use the built in generator-star-spacing rule instead.');
|
||||||
|
/* eslint-enable no-console */
|
||||||
|
isWarnedForDeprecation = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|||||||
@ -1,9 +1,18 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var isWarnedForDeprecation = false;
|
var isWarnedForDeprecation = false;
|
||||||
module.exports = function() {
|
module.exports = {
|
||||||
|
meta: {
|
||||||
|
deprecated: true,
|
||||||
|
schema: [
|
||||||
|
{
|
||||||
|
"enum": ["always", "methods", "properties", "never"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
create: function() {
|
||||||
return {
|
return {
|
||||||
Program() {
|
Program: function() {
|
||||||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -15,10 +24,5 @@ module.exports = function() {
|
|||||||
isWarnedForDeprecation = true;
|
isWarnedForDeprecation = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
module.exports.schema = [
|
|
||||||
{
|
|
||||||
'enum': ['always', 'methods', 'properties', 'never']
|
|
||||||
}
|
}
|
||||||
];
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user