Skip to content

Commit bb32d5d

Browse files
committed
feat: Enable @react-native/platform-colors rule
1 parent 3c61184 commit bb32d5d

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@babel/eslint-parser": "^7.22.15",
2424
"@babel/plugin-syntax-flow": "^7.22.5",
2525
"@babel/plugin-transform-react-jsx": "^7.22.15",
26+
"@react-native/eslint-plugin": "^0.74.0 || ^0.73.0 || ^0.72.0",
2627
"@typescript-eslint/eslint-plugin": "^6.7.2",
2728
"@typescript-eslint/parser": "^6.7.2",
2829
"eslint-config-prettier": "^9.0.0",

react-native.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ module.exports = {
99
env: {
1010
'react-native/react-native': true,
1111
},
12-
plugins: ['react-native'],
12+
plugins: ['react-native', '@react-native'],
1313
rules: {
14+
'@react-native/platform-colors': WARNING,
1415
'react-native/no-unused-styles': ERROR,
1516
'react-native/split-platform-components': OFF,
1617
'react-native/no-inline-styles': WARNING,

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,11 @@
405405
picocolors "^1.0.0"
406406
tslib "^2.6.0"
407407

408+
"@react-native/eslint-plugin@^0.74.0 || ^0.73.0 || ^0.72.0":
409+
version "0.74.84"
410+
resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.74.84.tgz#f0e9618551c9340caca7624001f8ce32794715c9"
411+
integrity sha512-pDzo4Qm1uPZQne2sv0QK89ePxP/i+ZHjrBW3rkTVStLvsDVdyFahMmt6bzJTdYL2cGgK2oyNmfXtvO57INOu3Q==
412+
408413
"@types/json-schema@^7.0.12":
409414
version "7.0.12"
410415
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb"

0 commit comments

Comments
 (0)