mirror of
https://github.com/jellyfin/jellyfin-expo.git
synced 2024-11-30 09:40:23 +00:00
135 lines
4.3 KiB
JSON
135 lines
4.3 KiB
JSON
{
|
|
"env": {
|
|
"react-native/react-native": true
|
|
},
|
|
"extends": [
|
|
"eslint:recommended",
|
|
"plugin:react/recommended",
|
|
"plugin:promise/recommended",
|
|
"plugin:import/errors",
|
|
"plugin:import/warnings",
|
|
"plugin:import/typescript",
|
|
"plugin:eslint-comments/recommended"
|
|
],
|
|
"parser": "@babel/eslint-parser",
|
|
"parserOptions": {
|
|
"ecmaFeatures": {
|
|
"jsx": true
|
|
},
|
|
"ecmaVersion": 2020,
|
|
"sourceType": "module"
|
|
},
|
|
"plugins": [
|
|
"react",
|
|
"react-native",
|
|
"promise",
|
|
"import",
|
|
"eslint-comments"
|
|
],
|
|
"settings": {
|
|
"react": {
|
|
"version": "detect"
|
|
}
|
|
},
|
|
"rules": {
|
|
"react/prop-types": ["error"],
|
|
"jsx-quotes": ["error", "prefer-single"],
|
|
|
|
"react-native/no-unused-styles": ["error"],
|
|
"react-native/split-platform-components": ["error"],
|
|
"react-native/no-color-literals": ["error"],
|
|
"react-native/no-raw-text": ["error"],
|
|
|
|
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }],
|
|
"array-callback-return": ["error"],
|
|
"arrow-spacing": ["error"],
|
|
"block-spacing": ["error"],
|
|
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
|
"comma-dangle": ["error", "never"],
|
|
"comma-spacing": ["error"],
|
|
"dot-location": ["error", "property" ],
|
|
"eol-last": ["error"],
|
|
"indent": ["error", "tab", { "SwitchCase": 1 }],
|
|
"keyword-spacing": ["error"],
|
|
"max-statements-per-line": ["error"],
|
|
"no-duplicate-imports": ["error"],
|
|
"no-floating-decimal": ["error"],
|
|
"no-multi-spaces": ["error"],
|
|
"no-multiple-empty-lines": ["error", { "max": 1 }],
|
|
"no-return-await": ["error"],
|
|
"no-trailing-spaces": ["error"],
|
|
"no-var": ["error"],
|
|
"object-curly-spacing": ["error", "always"],
|
|
"one-var": ["error", "never"],
|
|
"padded-blocks": ["error", "never"],
|
|
"prefer-const": ["error", { "destructuring": "all" }],
|
|
"quote-props": ["error", "as-needed"],
|
|
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
|
|
"radix": ["error"],
|
|
"semi": ["error"],
|
|
"sort-imports": ["warn", { "ignoreCase": true, "memberSyntaxSortOrder": ["all", "multiple", "single", "none"], "allowSeparatedGroups": true }],
|
|
"space-before-blocks": ["error"],
|
|
"space-in-parens": ["error"],
|
|
"space-infix-ops": ["error"],
|
|
"yoda": ["error"]
|
|
},
|
|
"ignorePatterns": [ "coverage" ],
|
|
"overrides": [
|
|
{
|
|
"files": [ "./**/*.js" ]
|
|
},
|
|
{
|
|
"files": [ "./**/*.test.js" ],
|
|
"plugins": [ "jest" ],
|
|
"env": {
|
|
"jest/globals": true
|
|
},
|
|
"globals": {
|
|
"fetch": "readonly"
|
|
},
|
|
"extends": [
|
|
"plugin:jest/recommended",
|
|
"plugin:jest/style"
|
|
],
|
|
"rules": {
|
|
"jest/consistent-test-it": ["error"],
|
|
"jest/lowercase-name": ["error", { "ignoreTopLevelDescribe": true }],
|
|
"jest/require-top-level-describe": ["error"]
|
|
}
|
|
},
|
|
{
|
|
"files": [ "./**/*.test.js" ],
|
|
"plugins": [ "jest" ],
|
|
"env": {
|
|
"jest/globals": true
|
|
},
|
|
"globals": {
|
|
"fetch": "readonly"
|
|
},
|
|
"extends": [
|
|
"plugin:jest/recommended",
|
|
"plugin:jest/style"
|
|
],
|
|
"rules": {
|
|
"jest/consistent-test-it": ["error"],
|
|
"jest/lowercase-name": ["error", { "ignoreTopLevelDescribe": true }],
|
|
"jest/require-top-level-describe": ["error"]
|
|
}
|
|
},
|
|
{
|
|
"files": [ "./assets/**/*.staticjs" ],
|
|
"extends": [
|
|
"plugin:compat/recommended"
|
|
],
|
|
"globals": {
|
|
"postExpoEvent": "readonly"
|
|
},
|
|
"env": {
|
|
"react-native/react-native": false,
|
|
"browser": true,
|
|
"es6": true
|
|
}
|
|
}
|
|
]
|
|
}
|