chore: Enable eqeqeq rule in eslint (#9541)
This commit is contained in:
parent
a1ea765b95
commit
b78fdc0cb1
@ -32,7 +32,8 @@
|
||||
"files": ["packages/babel-plugin-*/src/index.js"],
|
||||
"excludedFiles": ["packages/babel-plugin-transform-regenerator/**/*.js"],
|
||||
"rules": {
|
||||
"@babel/development/plugin-name": "error"
|
||||
"@babel/development/plugin-name": "error",
|
||||
"eqeqeq": ["error", "always", { "null": "ignore" }]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -31,8 +31,8 @@ export default declare((api, opts) => {
|
||||
Expression(path) {
|
||||
const parentType = path.parent.type;
|
||||
if (
|
||||
(parentType == "AssignmentPattern" && path.key === "right") ||
|
||||
(parentType == "ObjectProperty" &&
|
||||
(parentType === "AssignmentPattern" && path.key === "right") ||
|
||||
(parentType === "ObjectProperty" &&
|
||||
path.parent.computed &&
|
||||
path.key === "key")
|
||||
) {
|
||||
|
||||
@ -199,7 +199,7 @@ export default declare((api, options) => {
|
||||
|
||||
ReferencedIdentifier(path, state) {
|
||||
if (
|
||||
path.node.name == "__moduleName" &&
|
||||
path.node.name === "__moduleName" &&
|
||||
!path.scope.hasBinding("__moduleName")
|
||||
) {
|
||||
path.replaceWith(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user