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

Commit

Permalink
Add new annotation format to non-generated files (105/n)
Browse files Browse the repository at this point in the history
Summary:
Context - [[quip](https://fb.quip.com/1T2uAglapSkF)]

We are updating the oncall annotation format of all javascript files from  `emails oncall+my_oncall_shortname` to `oncall my_oncall_shortname`.

NOTE: There are other linter errors in some of these files that have not been introduced by this change, they are not being fixed here since they are non-trivial fixes (eg. moving a file to a different path).

Reference wiki for ESLint - [[wiki](https://www.internalfb.com/intern/wiki/Eslint/Creating_a_Lint_Rule/Writing_a_lint_rule/)]

To ensure we don't break anything, we are making this update with the following steps:
1. Update codegen to add the new annotations to all generated files
2. Update the docblocks for mock static JS generated files
3. Add new linter rule to add the annotation to existing non-codegen files - D36615978
4. **(This diff)** Add the new annotation to existing non-codegen files
5. Update all oncall extraction logic and Ownership Enumeration logic to read the new format
6. Build linter rule to ask user to add new annotation to new files
7. Another round of codemod to add new annotation to existing non-codegen files
8. Remove old annotations and linter rules

drop-conflicts

Reviewed By: bradzacher

Differential Revision: D37540143

fbshipit-source-id: 56a5ae006c4e876d3ae1918ae07e0e6a048eb602
  • Loading branch information
Nidhi Kadkol authored and facebook-github-bot committed Jun 30, 2022
1 parent 70414e8 commit 7b2a616
Show file tree
Hide file tree
Showing 224 changed files with 404 additions and 180 deletions.
5 changes: 3 additions & 2 deletions src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
* @preventMunge
* @emails oncall+draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/base/DraftEditorFlushControlled.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
* @emails oncall+draft_js
* @flow strict
* @format
* @oncall draft_js
*/

const ReactDOMComet = require('ReactDOMComet');
Expand Down
5 changes: 3 additions & 2 deletions src/component/base/DraftEditorPlaceholder.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/base/DraftEditorProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/base/DraftScrollPosition.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
* @emails oncall+draft_js
* @flow strict
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/base/DraftTextAlignment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
* @emails oncall+draft_js
* @flow strict
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/base/__tests__/DraftEditor.react-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/contents/DraftEditorBlock.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/contents/DraftEditorContents-core.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/contents/DraftEditorLeaf.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/contents/DraftEditorTextNode.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @emails oncall+draft_js
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @emails oncall+draft_js
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @emails oncall+draft_js
*
* This file is a fork of DraftEditorBlock.react.js and DraftEditorContents.react.js
*
* This is unstable and not part of the public API and should not be used by
* production systems. This file may be update/removed without notice.
*
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @emails oncall+draft_js
*
* This file is a fork of DraftEditorContents.react.js for tree nodes
*
* This is unstable and not part of the public API and should not be used by
* production systems. This file may be update/removed without notice.
*
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @emails oncall+draft_js
*
* This is unstable and not part of the public API and should not be used by
* production systems. This file may be update/removed without notice.
*
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
9 changes: 5 additions & 4 deletions src/component/contents/exploration/DraftEditorNode.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @emails oncall+draft_js
*
* This is unstable and not part of the public API and should not be used by
* production systems. This file may be update/removed without notice.
*
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @emails oncall+draft_js
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* @emails oncall+draft_js
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/handlers/DraftEditorModes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict
* @emails oncall+draft_js
* @flow strict
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/handlers/composition/DOMObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/handlers/drag/DraftEditorDragHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
5 changes: 3 additions & 2 deletions src/component/handlers/edit/DraftEditorEditHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/handlers/edit/__tests__/editOnBlur-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/handlers/edit/__tests__/editOnInput-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
1 change: 1 addition & 0 deletions src/component/handlers/edit/commands/SecondaryClipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* @emails oncall+draft_js
* @flow strict-local
* @format
* @oncall draft_js
*/

'use strict';
Expand Down
Loading

0 comments on commit 7b2a616

Please sign in to comment.