jellyfin-expo/.eslintrc.json

113 lines
3.6 KiB
JSON
Raw Normal View History

2019-08-19 06:47:46 +00:00
{
"env": {
"react-native/react-native": true
2019-08-19 06:47:46 +00:00
},
"extends": [
"eslint:recommended",
2020-04-08 17:31:29 +00:00
"plugin:react/recommended",
2020-04-08 18:01:15 +00:00
"plugin:promise/recommended",
"plugin:import/errors",
2020-04-08 18:09:58 +00:00
"plugin:import/warnings",
"plugin:import/typescript",
2020-04-08 18:09:58 +00:00
"plugin:eslint-comments/recommended"
2019-08-19 06:47:46 +00:00
],
"parser": "@babel/eslint-parser",
2019-08-19 06:47:46 +00:00
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
2020-04-08 18:14:36 +00:00
"ecmaVersion": 2020,
2019-08-19 06:47:46 +00:00
"sourceType": "module"
},
"plugins": [
2020-04-08 17:31:29 +00:00
"react",
"react-native",
2020-04-08 18:01:15 +00:00
"promise",
2020-04-08 18:09:58 +00:00
"import",
"eslint-comments"
2019-08-19 06:47:46 +00:00
],
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
2020-04-21 17:22:48 +00:00
"react/prop-types": ["error"],
2021-02-23 05:47:03 +00:00
"jsx-quotes": ["error", "prefer-single"],
2020-04-08 16:45:58 +00:00
"react-native/no-unused-styles": ["error"],
"react-native/split-platform-components": ["error"],
"react-native/no-color-literals": ["error"],
"react-native/no-raw-text": ["error"],
2021-02-20 07:31:46 +00:00
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }],
"array-callback-return": ["error"],
2021-02-20 07:31:46 +00:00
"arrow-spacing": ["error"],
2020-04-08 16:45:58 +00:00
"block-spacing": ["error"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
2020-04-08 16:45:58 +00:00
"comma-dangle": ["error", "never"],
"comma-spacing": ["error"],
2021-02-20 07:31:46 +00:00
"dot-location": ["error", "property" ],
2020-04-08 16:45:58 +00:00
"eol-last": ["error"],
2020-07-22 03:30:50 +00:00
"indent": ["error", "tab", { "SwitchCase": 1 }],
2020-04-08 16:45:58 +00:00
"keyword-spacing": ["error"],
"max-statements-per-line": ["error"],
2021-02-20 07:31:46 +00:00
"no-duplicate-imports": ["error"],
2020-04-08 16:45:58 +00:00
"no-floating-decimal": ["error"],
"no-multi-spaces": ["error"],
"no-multiple-empty-lines": ["error", { "max": 1 }],
"no-return-await": ["error"],
2020-04-08 16:45:58 +00:00
"no-trailing-spaces": ["error"],
"no-var": ["error"],
2021-02-20 07:31:46 +00:00
"object-curly-spacing": ["error", "always"],
2020-04-08 16:45:58 +00:00
"one-var": ["error", "never"],
"padded-blocks": ["error", "never"],
"prefer-const": ["error", { "destructuring": "all" }],
2021-02-20 07:31:46 +00:00
"quote-props": ["error", "as-needed"],
2020-07-22 03:28:59 +00:00
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }],
2021-02-20 07:31:46 +00:00
"radix": ["error"],
2020-04-08 16:45:58 +00:00
"semi": ["error"],
2021-02-20 07:31:46 +00:00
"sort-imports": ["warn", { "ignoreCase": true, "memberSyntaxSortOrder": ["all", "multiple", "single", "none"], "allowSeparatedGroups": true }],
2020-07-22 03:28:59 +00:00
"space-before-blocks": ["error"],
2021-02-20 07:31:46 +00:00
"space-in-parens": ["error"],
"space-infix-ops": ["error"],
"yoda": ["error"]
},
"ignorePatterns": [ "coverage" ],
"overrides": [
{
"files": [ "./**/*.js" ]
},
{
"files": [ "./**/*.test.js" ],
"plugins": [ "jest" ],
"env": {
"jest/globals": true
},
"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" ],
2021-02-20 06:42:38 +00:00
"extends": [
"plugin:compat/recommended"
],
2021-02-02 21:51:52 +00:00
"globals": {
"postExpoEvent": "readonly"
},
"env": {
"react-native/react-native": false,
"browser": true,
"es6": true
}
}
]
}