Skip to content

Commit 0d962ae

Browse files
authored
bump lint stack, update configs, fix new warnings (facebook#4537)
1 parent b0feb2f commit 0d962ae

File tree

20 files changed

+389
-846
lines changed

20 files changed

+389
-846
lines changed

.alexrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ exports.allow = [
2121

2222
// allowing this term to prevent reporting "primitive", which is a programming term
2323
'savage',
24+
25+
// allowing this term, since it seems to be used not in insensitive cases
26+
'straightforward',
2427
];
2528

2629
// Use a "maybe" level of profanity instead of the default "unlikely".

docs/text.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ On the web, the usual way to set a font family and size for the entire document
134134

135135
```css
136136
html {
137-
font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
137+
font-family:
138+
'lucida grande', tahoma, verdana, arial, sans-serif;
138139
font-size: 11px;
139140
color: #141823;
140141
}

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
},
2222
"dependencies": {
2323
"eslint": "^8.57.1",
24-
"eslint-config-prettier": "^9.1.0",
25-
"eslint-plugin-mdx": "^3.1.5",
26-
"eslint-plugin-prettier": "^5.2.1",
27-
"eslint-plugin-yml": "^1.2.0",
24+
"eslint-config-prettier": "^10.1.1",
25+
"eslint-plugin-mdx": "^3.2.0",
26+
"eslint-plugin-prettier": "^5.2.3",
27+
"eslint-plugin-yml": "^1.17.0",
2828
"husky": "^9.1.7",
2929
"netlify-plugin-cache": "^1.0.3",
30-
"prettier": "^3.4.2",
31-
"pretty-quick": "^4.0.0"
30+
"prettier": "^3.5.3",
31+
"pretty-quick": "^4.1.1"
3232
},
33-
"packageManager": "yarn@4.6.0"
33+
"packageManager": "yarn@4.7.0"
3434
}

website/.remarkrc.mjs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
import packageJson from "./package.json" assert { type: "json" };
1+
// TODO: Enable the plugin once a more performant solution is found
2+
// import packageJson from "./package.json" assert { type: "json" };
3+
//
4+
// export default {
5+
// plugins: [
6+
// "@react-native-website/remark-lint-no-broken-external-links",
7+
// {
8+
// skipUrlPatterns: [
9+
// // False positive, flagged as a bot and rate limited
10+
// "www.apkfiles.com",
11+
// // TODO: replace the 2048 example repository with another suitable project
12+
// "github.com/JoelMarcey",
13+
// ],
14+
// baseUrl: "https://reactnative.dev/docs",
15+
// headers: {
16+
// "user-agent": `${packageJson.name}/${packageJson.version}`,
17+
// },
18+
// },
19+
// ],
20+
// }
221

322
export default {
4-
plugins: [
5-
// TODO: Enable the plugin once a more performant solution is found
6-
// [
7-
// "@react-native-website/remark-lint-no-broken-external-links",
8-
// {
9-
// skipUrlPatterns: [
10-
// // False positive, flagged as a bot and rate limited
11-
// "www.apkfiles.com",
12-
// // TODO: replace the 2048 example repository with another suitable project
13-
// "github.com/JoelMarcey",
14-
// ],
15-
// baseUrl: "https://reactnative.dev/docs",
16-
// headers: {
17-
// "user-agent": `${packageJson.name}/${packageJson.version}`,
18-
// },
19-
// },
20-
// ],
21-
],
23+
plugins: [],
2224
};

website/blog/2024-10-23-the-new-architecture-is-here.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Finally, removing the bridge allows for faster startup and direct communication
5353

5454
The New Architecture is now ready to be used in production. It is already used at scale at Meta in the Facebook app and in other products. We successfully used React Native and the New Architecture in the Facebook and Instagram app we developed for our [Quest devices](https://engineering.fb.com/2024/10/02/android/react-at-meta-connect-2024/).
5555

56-
Our partners have already been using the New Architecture in production for months now: have a look at these success stories by [Expensify](https://blog.swmansion.com/sunrising-new-architecture-in-the-new-expensify-app-729d237a02f5) and [Kraken](https://blog.kraken.com/product/engineering/how-kraken-fixed-performance-issues-via-incremental-adoption-of-the-react-native-new-architecture), and give [BlueSky](https://github.com/bluesky-social/social-app/releases/tag/1.92.0-na-rc.2) a shot with their new release.
56+
Our partners have already been using the New Architecture in production for months now: have a look at these success stories by [Expensify](https://blog.swmansion.com/sunrising-new-architecture-in-the-new-expensify-app-729d237a02f5) and [Kraken](https://blog.kraken.com/product/engineering/how-kraken-fixed-performance-issues-via-incremental-adoption-of-the-react-native-new-architecture), and give [Bluesky](https://github.com/bluesky-social/social-app/releases/tag/1.92.0-na-rc.2) a shot with their new release.
5757

5858
### New Native Modules
5959

@@ -402,5 +402,5 @@ We are also extremely grateful to all the partners who collaborated with us to m
402402
- [Software Mansion](https://swmansion.com/), for maintaining crucial libraries in the ecosystem, for migrating them to the New Architecture early and for all the help in investigating and fixing various issues.
403403
- [Callstack](https://www.callstack.com/), for maintaining crucial libraries in the ecosystem, for migrating them to the New Architecture early and for the support with the work on the Community CLI.
404404
- [Microsoft](https://opensource.microsoft.com/), for adding the New Architecture implementation for `react-native-windows` and `react-native-macos` as well as in several other developer tools.
405-
- [Expensify](https://www.expensify.com/), [Kraken](https://www.kraken.com/), [BlueSky](https://bsky.app/) and [Brigad](https://www.brigad.co/) for pioneering the adoption of the New Architecture and reporting various issues so that we could fix them for everyone else.
405+
- [Expensify](https://www.expensify.com/), [Kraken](https://www.kraken.com/), [Bluesky](https://bsky.app/) and [Brigad](https://www.brigad.co/) for pioneering the adoption of the New Architecture and reporting various issues so that we could fix them for everyone else.
406406
- All the independent library maintainers and developers who contributed to the New Architecture by testing it, fixing some of the issues, and opening questions on unclear matters so that we could clear them.

website/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"lint:markdown": "remark ../docs --quiet -r .remarkrc.mjs",
3333
"lint:markdown:versioned": "remark ./versioned_docs --quiet -r .remarkrc.mjs",
3434
"lint:format": "prettier --check '{core,src}/**/*.{js,jsx,ts,tsx}' ../docs/*.md {versioned_docs/**/*.md,blog/*.md} src/**/*.{scss,css}",
35-
"language:lint": "cd ../ && alex && case-police 'docs/*.md' -p brands,general,products,softwares -d ./website/react-native-dict.json",
36-
"language:lint:versioned": "cd ../ && alex . && case-police '**/*.md' -p brands,general,products,softwares -d ./website/react-native-dict.json",
35+
"language:lint": "cd ../ && alex && case-police 'docs/*.md' -d ./website/react-native-dict.json --disable SDK,URI",
36+
"language:lint:versioned": "cd ../ && alex . && case-police '**/*.md' -d ./website/react-native-dict.json --disable SDK,URI",
3737
"ci:lint": "yarn lint && yarn lint:examples && yarn lint:versioned && yarn language:lint:versioned && yarn lint:markdown && yarn lint:format",
3838
"pwa:generate": "npx pwa-asset-generator ./static/img/header_logo.svg ./static/img/pwa --padding '40px' --background 'rgb(32, 35, 42)' --icon-only --opaque true"
3939
},
@@ -68,12 +68,12 @@
6868
"@react-native-website/lint-examples": "0.0.0",
6969
"@react-native-website/update-redirects": "0.0.0",
7070
"@types/google.analytics": "^0.0.46",
71-
"alex": "^10.0.0",
72-
"case-police": "^0.5.14",
71+
"alex": "^11.0.1",
72+
"case-police": "^1.0.0",
7373
"eslint": "^8.57.1",
7474
"fs-extra": "^11.2.0",
7575
"glob": "^11.0.0",
76-
"prettier": "^3.4.2",
76+
"prettier": "^3.5.3",
7777
"remark-cli": "^12.0.1",
7878
"typescript": "^5.7.2"
7979
}

website/src/css/customTheme.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
--divider: #ececec;
1818
--tintColor: #f7f7f7;
1919
--rn-note-background: rgba(255, 229, 100, 0.25);
20-
--ifm-font-family-base: "Optimistic Display", system-ui, -apple-system,
21-
sans-serif;
20+
--ifm-font-family-base:
21+
"Optimistic Display", system-ui, -apple-system, sans-serif;
2222
--ifm-color-primary: #06bcee;
2323
--ifm-font-size-base: 17px;
2424
--ifm-spacing-horizontal: 16px;
@@ -116,8 +116,8 @@ html[data-theme="dark"] {
116116
--docsearch-modal-background: var(--deepdark);
117117
--docsearch-footer-background: var(--dark);
118118
--docsearch-key-gradient: var(--deepdark);
119-
--docsearch-key-shadow: inset 0 -2px 0 0 var(--light),
120-
inset 0 0 1px 1px var(--light),
119+
--docsearch-key-shadow:
120+
inset 0 -2px 0 0 var(--light), inset 0 0 1px 1px var(--light),
121121
0 1px 2px 1px var(--ifm-table-border-color);
122122
--docsearch-container-background: rgba(0, 0, 0, 0.6);
123123
}

website/src/pages/Home/Hero/styles.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
height: 300px;
5151
position: relative;
5252
top: -4px;
53-
background: linear-gradient(
53+
background:
54+
linear-gradient(
5455
to bottom,
5556
var(--home-hero-floor-background) 0%,
5657
var(--home-hero-floor-background-bottom)

website/src/pages/Home/Platforms/styles.module.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@
5050
.codeEditorContentContainer code {
5151
background-color: var(--home-background);
5252
padding: 16px 48px 16px 24px;
53-
font-family: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco,
54-
Consolas, "Liberation Mono", "Courier New", monospace;
53+
font-family:
54+
"Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
55+
"Liberation Mono", "Courier New", monospace;
5556
color: var(--home-text);
5657
font-size: 14px;
5758
}

website/src/pages/Home/components/Section/styles.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*/
77

88
.wrapper {
9-
background: linear-gradient(
9+
background:
10+
linear-gradient(
1011
to bottom,
1112
var(--home-section-top),
1213
var(--home-section-bottom)

0 commit comments

Comments
 (0)