Skip to content

Commit

Permalink
upgrade eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 3, 2024
1 parent f5afcb2 commit c5910f2
Show file tree
Hide file tree
Showing 10 changed files with 3,011 additions and 1,767 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module.exports = {
'packages/*/__tests__/**/*.?(m)js',
'packages/*/src/**/*.jsx',
],
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
allowImportExportEverywhere: true,
sourceType: 'module',
Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = {
},
],

parser: 'babel-eslint',
parser: '@babel/eslint-parser',

parserOptions: {
ecmaFeatures: {
Expand Down Expand Up @@ -137,9 +137,9 @@ module.exports = {
'eol-last': ERROR,
eqeqeq: [ERROR, 'allow-null'],
// Prettier forces semicolons in a few places
'flowtype/object-type-delimiter': OFF,
'ft-flow/object-type-delimiter': OFF,

'flowtype/sort-keys': ERROR,
'ft-flow/sort-keys': ERROR,

'header/header': [2, 'scripts/www/headerTemplate.js'],

Expand Down
4,721 changes: 2,982 additions & 1,739 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@babel/plugin-transform-optional-catch-binding": "^7.24.1",
"@babel/preset-flow": "^7.24.1",
"@babel/preset-react": "^7.24.1",
Expand All @@ -131,29 +133,28 @@
"@types/prismjs": "^1.26.0",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.3",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"babel-eslint": "^10.1.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"child-process-promise": "^2.2.1",
"chokidar": "^3.5.2",
"concurrently": "^6.2.0",
"confusing-browser-globals": "^1.0.10",
"cross-env": "^7.0.3",
"eslint": "^7.31.0",
"eslint-config-fbjs": "^3.1.1",
"eslint-config-prettier": "^8.3.0",
"eslint": "^8.57.0",
"eslint-config-fbjs": "^4.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-ft-flow": "^3.0.7",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^24.4.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.4.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-lexical": "file:./eslint-plugin",
"eslint-plugin-no-function-declare-after-return": "^1.1.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"flow-bin": "^0.226.0",
"fs-extra": "^10.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/lexical-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "lexical-playground",
"version": "0.14.5",
"private": true,
"type": "module",
"scripts": {
"dev": "vite --host",
"build-dev": "vite build",
Expand Down
5 changes: 2 additions & 3 deletions packages/lexical-playground/src/nodes/MentionNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
*
*/

import type {Spread} from 'lexical';

import {
$applyNodeReplacement,
type DOMConversionMap,
type DOMConversionOutput,
type DOMExportOutput,
type EditorConfig,
type LexicalNode,
type NodeKey,
type SerializedTextNode,
$applyNodeReplacement,
type Spread,
TextNode,
} from 'lexical';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import {
MenuOption,
} from '@lexical/react/LexicalContextMenuPlugin';
import {
type LexicalNode,
$getNearestNodeFromDOMNode,
$getSelection,
$isRangeSelection,
COPY_COMMAND,
CUT_COMMAND,
type LexicalNode,
PASTE_COMMAND,
} from 'lexical';
import {useCallback, useMemo} from 'react';
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-table/src/LexicalTableObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import invariant from 'shared/invariant';
import {$isTableCellNode} from './LexicalTableCellNode';
import {$isTableNode} from './LexicalTableNode';
import {
type TableSelection,
$createTableSelection,
$isTableSelection,
type TableSelection,
} from './LexicalTableSelection';
import {
$findTableNode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import {$createTableSelection} from '@lexical/table';
import {
type LexicalEditor,
$createParagraphNode,
$createTextNode,
$getRoot,
$setSelection,
EditorState,
type LexicalEditor,
ParagraphNode,
RootNode,
TextNode,
Expand Down
4 changes: 2 additions & 2 deletions packages/lexical-utils/src/markSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/

import {
type EditorState,
type LexicalEditor,
$getSelection,
$isRangeSelection,
type EditorState,
ElementNode,
type LexicalEditor,
TextNode,
} from 'lexical';
import invariant from 'shared/invariant';
Expand Down
4 changes: 2 additions & 2 deletions packages/lexical/src/__tests__/unit/LexicalEditor.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
TableRowNode,
} from '@lexical/table';
import {
type LexicalEditor,
type LexicalNode,
$createLineBreakNode,
$createNodeSelection,
$createParagraphNode,
Expand All @@ -35,6 +33,8 @@ import {
createCommand,
EditorState,
ElementNode,
type LexicalEditor,
type LexicalNode,
ParagraphNode,
RootNode,
TextNode,
Expand Down

0 comments on commit c5910f2

Please sign in to comment.