Skip to content
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
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/Pods/**
**/build/**
**/metainternal/**
**/node_modules/**
packages/react-native/React/I18n/FBXXHashUtils.h
packages/react-native/ReactAndroid/src/main/jni/first-party/yogajni/**
Expand Down
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Ignore Pods
**/Pods
**/metainternal/**

# Ignore hermes as it is downloaded from the react_native_pods
**/sdks/hermes
**/sdks/downloads

flow-typed/npm/**
packages/*/dist
vendor
packages/**/types_generated/
packages/react-native/ReactNativeApi.d.ts
packages/react-native/Libraries/Renderer/**
packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js
packages/react-native-babel-preset/src/__tests__/__fixtures__/output/**
private/eslint-plugin-monorepo/rules/sort-imports.js

packages/react-native-codegen/e2e/__test_fixtures__/modules/NativeEnumTurboModule.js
1 change: 1 addition & 0 deletions scripts/format-java.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const IGNORE = [
'**/Pods/**',
'**/build/**',
'**/com/facebook/yoga/**',
'**/metainternal/**',
'**/node_modules/**',
];

Expand Down
1 change: 1 addition & 0 deletions scripts/format-kotlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const IGNORE = [
'**/com/facebook/yoga/**',
'**/hermes-engine/**',
'**/internal/featureflags/**',
'**/metainternal/**',
'**/node_modules/**',
'**/systeminfo/ReactNativeVersion.kt',
];
Expand Down
13 changes: 13 additions & 0 deletions scripts/format-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ const path = require('node:path');

const REPO_ROOT = path.resolve(__dirname, '..');
const RUFF_VERSION = '0.14.0';
// Passed to Ruff as `--config <inline TOML>`, which overrides only this single
// setting and leaves any discovered configuration files in place. The
// `--exclude` flag cannot be used instead: it replaces Ruff's default
// exclusions (`node_modules`, `build`, …) rather than adding to them.
const RUFF_CONFIG = 'extend-exclude = ["**/metainternal/**"]';
const RUFF_ROOT = path.join(
REPO_ROOT,
'node_modules',
Expand Down Expand Up @@ -99,7 +104,12 @@ function runRuff(command, prefixArguments, check) {
}
const format = run(command, [
...prefixArguments,
'--config',
RUFF_CONFIG,
'format',
// Ruff ignores RUFF_CONFIG's exclusions for any path named explicitly on
// the command line unless exclusions are forced.
'--force-exclude',
...(check ? ['--check'] : []),
'.',
]);
Expand Down Expand Up @@ -193,7 +203,10 @@ function main() {
...python.prefixArguments,
'-m',
'ruff',
'--config',
RUFF_CONFIG,
'format',
'--force-exclude',
...(check ? ['--check'] : []),
'.',
],
Expand Down
7 changes: 6 additions & 1 deletion scripts/format-swift.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ const MINIMUM_SWIFT_FORMAT_MAJOR = 6;
const MINIMUM_SWIFT_FORMAT_MINOR = 3;
const MAX_FILES_PER_PROCESS = 100;
const MAX_HEADER_BYTES = 4096;
const IGNORE = ['**/Pods/**', '**/build/**', '**/node_modules/**'];
const IGNORE = [
'**/Pods/**',
'**/build/**',
'**/metainternal/**',
'**/node_modules/**',
];

function isGenerated(file) {
let fd;
Expand Down
Loading