mirror of
https://github.com/jellyfin/jellyfin-expo.git
synced 2024-11-27 08:10:32 +00:00
142 lines
4.4 KiB
JSON
142 lines
4.4 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"
|
|
},
|
|
"jest": {
|
|
"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"],
|
|
|
|
"import/order": ["warn", {
|
|
"alphabetize": { "order": "asc", "caseInsensitive": true },
|
|
"newlines-between": "always-and-inside-groups"
|
|
}],
|
|
|
|
"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"],
|
|
"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
|
|
}
|
|
}
|
|
]
|
|
}
|