forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix linting in ESLint packages (babel#10712)
* Lint eslint/* * Run "make fix-js" * Fix remaining problems * Remove linting from subpackages * Remove husky * Add back eslint dep
- Loading branch information
1 parent
17dfdab
commit b4c4260
Showing
31 changed files
with
498 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
eslint/babel-eslint-plugin-development/src/rules/no-deprecated-clone.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
// @flow | ||
|
||
"use strict"; | ||
|
||
const getReferenceOrigin = require("../utils/get-reference-origin"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
module.exports = { | ||
rules: { | ||
'array-bracket-spacing': require('./rules/array-bracket-spacing'), | ||
'arrow-parens': require('./rules/arrow-parens'), | ||
'flow-object-type': require('./rules/flow-object-type'), | ||
'func-params-comma-dangle': require('./rules/func-params-comma-dangle'), | ||
'generator-star-spacing': require('./rules/generator-star-spacing'), | ||
'new-cap': require('./rules/new-cap'), | ||
'camelcase': require('./rules/camelcase'), | ||
'no-await-in-loop': require('./rules/no-await-in-loop'), | ||
'no-invalid-this': require('./rules/no-invalid-this'), | ||
'no-unused-expressions': require('./rules/no-unused-expressions'), | ||
'object-curly-spacing': require('./rules/object-curly-spacing'), | ||
'object-shorthand': require('./rules/object-shorthand'), | ||
'quotes': require('./rules/quotes'), | ||
'semi': require('./rules/semi'), | ||
'valid-typeof': require('./rules/valid-typeof'), | ||
"array-bracket-spacing": require("./rules/array-bracket-spacing"), | ||
"arrow-parens": require("./rules/arrow-parens"), | ||
"flow-object-type": require("./rules/flow-object-type"), | ||
"func-params-comma-dangle": require("./rules/func-params-comma-dangle"), | ||
"generator-star-spacing": require("./rules/generator-star-spacing"), | ||
"new-cap": require("./rules/new-cap"), | ||
camelcase: require("./rules/camelcase"), | ||
"no-await-in-loop": require("./rules/no-await-in-loop"), | ||
"no-invalid-this": require("./rules/no-invalid-this"), | ||
"no-unused-expressions": require("./rules/no-unused-expressions"), | ||
"object-curly-spacing": require("./rules/object-curly-spacing"), | ||
"object-shorthand": require("./rules/object-shorthand"), | ||
quotes: require("./rules/quotes"), | ||
semi: require("./rules/semi"), | ||
"valid-typeof": require("./rules/valid-typeof"), | ||
}, | ||
rulesConfig: { | ||
'array-bracket-spacing': 0, | ||
'arrow-parens': 0, | ||
'camelcase': 0, | ||
'flow-object-type': 0, | ||
'func-params-comma-dangle': 0, | ||
'generator-star-spacing': 0, | ||
'new-cap': 0, | ||
'no-await-in-loop': 0, | ||
'no-invalid-this': 0, | ||
'no-unused-expressions': 0, | ||
'object-curly-spacing': 0, | ||
'object-shorthand': 0, | ||
'quotes': 0, | ||
'semi': 0, | ||
'valid-typeof': 0, | ||
"array-bracket-spacing": 0, | ||
"arrow-parens": 0, | ||
camelcase: 0, | ||
"flow-object-type": 0, | ||
"func-params-comma-dangle": 0, | ||
"generator-star-spacing": 0, | ||
"new-cap": 0, | ||
"no-await-in-loop": 0, | ||
"no-invalid-this": 0, | ||
"no-unused-expressions": 0, | ||
"object-curly-spacing": 0, | ||
"object-shorthand": 0, | ||
quotes: 0, | ||
semi: 0, | ||
"valid-typeof": 0, | ||
}, | ||
}; |
79 changes: 41 additions & 38 deletions
79
eslint/babel-eslint-plugin/rules/array-bracket-spacing.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,46 @@ | ||
"use strict"; | ||
|
||
var isWarnedForDeprecation = false; | ||
let isWarnedForDeprecation = false; | ||
module.exports = { | ||
meta: { | ||
deprecated: true, | ||
schema: [ | ||
{ | ||
"enum": ["always", "never"] | ||
}, | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"singleValue": { | ||
"type": "boolean" | ||
}, | ||
"objectsInArrays": { | ||
"type": "boolean" | ||
}, | ||
"arraysInArrays": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
] | ||
}, | ||
create: function() { | ||
return { | ||
Program: function() { | ||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) { | ||
return; | ||
} | ||
meta: { | ||
deprecated: true, | ||
schema: [ | ||
{ | ||
enum: ["always", "never"], | ||
}, | ||
{ | ||
type: "object", | ||
properties: { | ||
singleValue: { | ||
type: "boolean", | ||
}, | ||
objectsInArrays: { | ||
type: "boolean", | ||
}, | ||
arraysInArrays: { | ||
type: "boolean", | ||
}, | ||
}, | ||
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; | ||
} | ||
}; | ||
} | ||
console.log( | ||
"The babel/array-bracket-spacing rule is deprecated. Please " + | ||
"use the built in array-bracket-spacing rule instead." | ||
); | ||
isWarnedForDeprecation = true; | ||
}, | ||
}; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
"use strict"; | ||
|
||
var isWarnedForDeprecation = false; | ||
let isWarnedForDeprecation = false; | ||
module.exports = { | ||
meta: { | ||
deprecated: true, | ||
schema: [ | ||
{ | ||
"enum": ["always", "as-needed"] | ||
} | ||
] | ||
}, | ||
create: function() { | ||
return { | ||
Program: function() { | ||
if (isWarnedForDeprecation || /\=-(f|-format)=/.test(process.argv.join('='))) { | ||
return; | ||
} | ||
meta: { | ||
deprecated: true, | ||
schema: [ | ||
{ | ||
enum: ["always", "as-needed"], | ||
}, | ||
], | ||
}, | ||
create: function() { | ||
return { | ||
Program: function() { | ||
if ( | ||
isWarnedForDeprecation || | ||
/=-(f|-format)=/.test(process.argv.join("=")) | ||
) { | ||
return; | ||
} | ||
|
||
/* eslint-disable no-console */ | ||
console.log('The babel/arrow-parens rule is deprecated. Please ' + | ||
'use the built in arrow-parens rule instead.'); | ||
/* eslint-enable no-console */ | ||
isWarnedForDeprecation = true; | ||
} | ||
}; | ||
} | ||
console.log( | ||
"The babel/arrow-parens rule is deprecated. Please " + | ||
"use the built in arrow-parens rule instead." | ||
); | ||
isWarnedForDeprecation = true; | ||
}, | ||
}; | ||
}, | ||
}; |
Oops, something went wrong.