nx/.eslintrc.json
Phillip Barta f015dd7527
cleanup(react-native): use native fetch for isPackagerRunning check and remove node-fetch dependency (#29568)
Removes the `node-fetch` dependency and uses the native fetch global for
the `isPackagerRunning()` check

## Current Behavior
- Dependency `node-fetch` is used.

## Expected Behavior
- Removed the `node-fetch` dependency.
- Used the native `fetch` global.


---------

Co-authored-by: Colum Ferry <cferry09@gmail.com>
2025-01-28 11:03:05 +00:00

102 lines
2.5 KiB
JSON

{
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true
},
"ignorePatterns": ["**/*.ts"],
"plugins": ["@typescript-eslint", "@nx"],
"extends": ["plugin:storybook/recommended"],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "create-nx-workspace",
"message": "Please import utils from nx or @nx/devkit instead."
},
{
"name": "node-fetch",
"message": "Please default to native fetch instead of 'node-fetch'."
}
]
}
],
"@typescript-eslint/no-restricted-imports": [
"error",
{
"patterns": [
{
"group": ["nx/src/plugins/js*"],
"message": "Imports from 'nx/src/plugins/js' are not allowed. Use '@nx/js' instead"
},
{
"group": ["**/native-bindings", "**/native-bindings.js", ""],
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
}
]
}
],
"storybook/no-uninstalled-addons": [
"error",
{
"ignore": ["@nx/react/plugins/storybook"],
"packageJsonLocation": "../../package.json"
}
]
},
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser",
"rules": {}
},
{
"files": ["**/executors/**/schema.json", "**/generators/**/schema.json"],
"rules": {
"@nx/workspace/valid-schema-description": "error"
}
},
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"checkDynamicDependenciesExceptions": [".*"],
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
],
"@nx/workspace/valid-command-object": "error"
}
},
{
"files": ["pnpm-lock.yaml"],
"parser": "./tools/eslint-rules/raw-file-parser.js",
"rules": {
"@nx/workspace/ensure-pnpm-lock-version": [
"error",
{
"version": "9.0"
}
]
}
},
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/prefer-standalone": "off"
}
}
]
}