Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Upgrades ESLint and related plugins/configs. #2231

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
'prettier/standard',
],
rules: {
'prettier/prettier': ['error', 'fb'],
'prettier/prettier': ['error'],
},
plugins: ['prettier'],
overrides: [
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"del": "^2.2.0",
"envify": "^3.4.0",
"es6-shim": "^0.34.4",
"eslint": "^5.16.0",
"eslint-config-fbjs": "^2.0.0",
"eslint-config-prettier": "^2.6.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-flowtype": "^2.17.1",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^2.3.1",
"eslint-plugin-react": "^7.3.0",
"eslint-plugin-relay": "^0.0.8",
"eslint": "^6.6.0",
"eslint-config-fbjs": "^3.1.1",
"eslint-config-prettier": "^6.5.0",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-relay": "^1.3.12",
"fbjs-scripts": "^1.1.0",
"flow-bin": "^0.92.0",
"gulp": "^4.0.0",
Expand Down
6 changes: 2 additions & 4 deletions src/component/selection/getUpdatedSelectionState.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ function getUpdatedSelectionState(
const selection: SelectionState = nullthrows(editorState.getSelection());
if (__DEV__) {
if (!anchorKey || !focusKey) {
/* eslint-disable fb-www/no-console */
/* eslint-disable-next-line */
console.warn('Invalid selection state.', arguments, editorState.toJS());
/* eslint-enable fb-www/no-console */
return selection;
}
}
Expand All @@ -50,9 +49,8 @@ function getUpdatedSelectionState(
if (!anchorLeaf || !focusLeaf) {
// If we cannot make sense of the updated selection state, stick to the current one.
if (__DEV__) {
/* eslint-disable fb-www/no-console */
/* eslint-disable-next-line */
console.warn('Invalid selection state.', arguments, editorState.toJS());
/* eslint-enable fb-www/no-console */
}
return selection;
}
Expand Down
3 changes: 1 addition & 2 deletions src/model/modifier/__tests__/AtomicBlockUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ const CHARACTER = ' ';

const getInvariantViolation = msg => {
try {
/* eslint-disable fb-www/sprintf-like-args */
/* eslint-disable-next-line */
invariant(false, msg);
/* eslint-enable fb-www/sprintf-like-args */
} catch (e) {
return e;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ const initialBlock = contentState.getBlockMap().first();

const getInvariantViolation = msg => {
try {
/* eslint-disable fb-www/sprintf-like-args */
/* eslint-disable-next-line */
invariant(false, msg);
/* eslint-enable fb-www/sprintf-like-args */
} catch (e) {
return e;
}
Expand Down
Loading