Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
eslint-plugin-react-native-globals
==================================
ESLint Environment for React Native.
## Installation
```sh
yarn add --dev eslint eslint-plugin-react-native-globals
```
**Note:** If you installed ESLint globally then you must also install `eslint-plugin-react-native-globals` globally.
## Usage
Add `react-native-globals` to the `plugins` section of your `.eslintrc` configuration file, and then add `react-native-globals/all` to the `env` section:
```json
{
"plugins": [
"react-native-globals"
],
"env": {
"react-native-globals/all": true
}
}
```
+44
View File
@@ -0,0 +1,44 @@
const globals = {
__DEV__: false,
__dirname: false,
alert: false,
Blob: false,
cancelAnimationFrame: false,
cancelIdleCallback: false,
clearImmediate: true,
clearInterval: false,
clearTimeout: false,
console: false,
escape: false,
Event: false,
EventTarget: false,
exports: false,
fetch: false,
File: false,
FileReader: false,
FormData: false,
global: false,
Map: true,
module: false,
navigator: false,
process: false,
Promise: true,
requestAnimationFrame: true,
requestIdleCallback: true,
require: false,
Set: true,
setImmediate: true,
setInterval: false,
setTimeout: false,
WebSocket: false,
window: false,
XMLHttpRequest: false,
};
module.exports = {
environments: {
all: {
globals: globals,
},
},
};
+20
View File
@@ -0,0 +1,20 @@
{
"name": "eslint-plugin-react-native-globals",
"version": "0.1.2",
"description": "ESLint Environment for React Native",
"main": "index.js",
"files": [
"index.js"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/satya164/eslint-plugin-react-native-globals"
},
"author": "Satyajit Sahoo <satyajit.happy@gmail.com> (https://github.com/satya164/)",
"keywords": [
"eslint",
"eslint-plugin",
"react-native"
]
}