forked from AmazonAppDev/react-native-multi-tv-app-sample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
42 lines (41 loc) ยท 1.34 KB
/
eslint.config.js
File metadata and controls
42 lines (41 loc) ยท 1.34 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
const prettier = require('eslint-plugin-prettier');
module.exports = [
{
files: ["**/*.ts", "**/*.tsx"],
ignores: ["node_modules/**", "build/**", "dist/**"],
languageOptions: {
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true, // Enable JSX support
},
},
globals: {
React: "readonly",
},
},
plugins: {
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
"react": require("eslint-plugin-react"),
"react-native": require("eslint-plugin-react-native"),
"prettier": prettier,
},
rules: {
semi: ["warn", "always"],
"prefer-const": "error",
"react-native/no-unused-styles": "warn",
"react-native/split-platform-components": "warn",
"react-native/no-inline-styles": "error",
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/colon-trailing-spacing": ["off"],
"prettier/prettier": ["warn", {
"endOfLine": "auto",
"usePrettierrc": true, // Use .prettierrc file for configuration
}]
},
},
];