-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy path.eslintrc.js
More file actions
47 lines (46 loc) · 1.15 KB
/
.eslintrc.js
File metadata and controls
47 lines (46 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// ESLint v9 flat configuration
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
export default [
js.configs.recommended,
prettier,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
__DEV__: "readonly",
console: "readonly",
global: "readonly",
globalThis: "readonly",
process: "readonly",
require: "readonly",
module: "readonly",
exports: "readonly",
Buffer: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
setInterval: "readonly",
clearInterval: "readonly",
requestAnimationFrame: "readonly",
cancelAnimationFrame: "readonly",
// React Native globals
fetch: "readonly",
FormData: "readonly",
navigator: "readonly",
XMLHttpRequest: "readonly",
},
},
rules: {
"no-unused-vars": ["error", {argsIgnorePattern: "^_"}],
"no-console": "off",
"prefer-const": "error",
"no-var": "error",
},
},
];