-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/1899/popupRightPositionBodyMargin
# Conflicts: # src/definitions/modules/popup.js
- Loading branch information
Showing
664 changed files
with
208,889 additions
and
210,895 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const eslint = require('eslint'); | ||
const ruleComposer = require('eslint-rule-composer'); | ||
|
||
const rule = new eslint.Linter().getRules().get('eqeqeq'); | ||
|
||
module.exports = ruleComposer.filterReports( | ||
rule, | ||
(problem) => { | ||
if (problem.node.type === 'BinaryExpression' | ||
&& (problem.node.operator === '==' || problem.node.operator === '!=') | ||
&& problem.node.right.type === 'Literal' | ||
) { | ||
return problem; | ||
} | ||
|
||
return false; | ||
} | ||
); |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const eqeqeqRule = require('./eqeqeq-rule'); | ||
const noExtraParensRule = require('./no-extra-parens-rule'); | ||
|
||
module.exports = { | ||
rules: { | ||
eqeqeq: eqeqeqRule, | ||
'no-extra-parens': noExtraParensRule, | ||
}, | ||
configs: { | ||
recommended: { | ||
plugins: [ | ||
'@internal/eslint-plugin', | ||
], | ||
rules: { | ||
// fixes only variable == (or !=) literal expression | ||
'@internal/eqeqeq': ['error', 'always'], | ||
// https://github.com/eslint/eslint/issues/16626 | ||
// https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L66 | ||
'@internal/no-extra-parens': ['error', 'all', { | ||
conditionalAssign: true, | ||
enforceForArrowConditionals: false, | ||
ignoreJSX: 'all', | ||
nestedBinaryExpressions: false, | ||
returnAssign: false, | ||
}], | ||
}, | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const eslint = require('eslint'); | ||
const ruleComposer = require('eslint-rule-composer'); | ||
|
||
const rule = new eslint.Linter().getRules().get('no-extra-parens'); | ||
|
||
module.exports = ruleComposer.filterReports( | ||
rule, | ||
(problem) => { | ||
if (problem.node.type === 'ConditionalExpression' | ||
&& (problem.node.parent.type === 'ConditionalExpression' || problem.node.parent.type === 'SpreadElement') | ||
) { | ||
return false; | ||
} | ||
|
||
return problem; | ||
} | ||
); |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "@internal/eslint-plugin", | ||
"version": "1.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"eslint-rule-composer": "^0.3.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "*" | ||
} | ||
} |
Oops, something went wrong.