focalboard/webapp/.eslintrc.json

164 lines
3.8 KiB
JSON
Raw Normal View History

2020-10-15 01:02:41 +02:00
{
"extends": [
"plugin:react/recommended",
2020-10-15 01:02:41 +02:00
"plugin:cypress/recommended",
"plugin:jquery/deprecated"
],
"plugins": [
"react",
2020-10-15 01:02:41 +02:00
"babel",
"import",
"cypress",
"jquery",
"no-only-tests"
],
"parser": "@typescript-eslint/parser",
"env": {
"jest": true,
"cypress/globals": true
},
"settings": {
"import/resolver": "webpack",
"react": {
"pragma": "React",
"version": "detect"
}
},
"rules": {
"react/display-name": [
0,
{
"ignoreTranspilerName": false
}
],
"max-lines": "off",
2020-10-15 01:02:41 +02:00
"no-unused-expressions": 0,
2020-11-12 23:57:21 +01:00
"babel/no-unused-expressions": [2, {"allowShortCircuit": true}],
2020-10-15 01:02:41 +02:00
"eol-last": ["error", "always"],
"import/no-unresolved": 2,
"import/order": [
2,
{
"newlines-between": "always-and-inside-groups",
"groups": [
"builtin",
"external",
[
"internal",
"parent"
],
"sibling",
"index"
]
}
],
"no-undefined": 0,
"react/jsx-filename-extension": 0,
"react/prop-types": [
2,
{
"ignore": [
"location",
"history",
"component"
]
}
],
"react/no-string-refs": 2,
2020-12-18 21:52:45 +01:00
"no-only-tests/no-only-tests": ["error", {"focus": ["only", "skip"]}],
"max-nested-callbacks": ["error", {"max": 5}],
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error"
2020-10-15 01:02:41 +02:00
},
"overrides": [
{
"files": ["**/*.tsx", "**/*.ts"],
"extends": [
"plugin:@typescript-eslint/recommended"
],
"rules": {
"mattermost/no-dispatch-getstate": 0, // Failing in eslint 8
2020-10-15 01:02:41 +02:00
"import/no-unresolved": 0, // ts handles this better
2020-10-20 21:50:53 +02:00
"camelcase": 0,
2020-10-20 21:52:56 +02:00
"semi": "off",
2020-10-15 01:02:41 +02:00
"@typescript-eslint/naming-convention": [
2,
{
"selector": "function",
"format": ["camelCase", "PascalCase"]
},
{
"selector": "variable",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
},
{
"selector": "parameter",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow"
},
{
"selector": "typeLike",
"format": ["PascalCase"]
}
],
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
"vars": "all",
"args": "after-used"
}
],
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/prefer-interface": 0,
"@typescript-eslint/explicit-function-return-type": 0,
2020-10-20 21:50:53 +02:00
"@typescript-eslint/semi": [2, "never"],
"@typescript-eslint/indent": [
2020-10-15 01:02:41 +02:00
2,
4,
{
"SwitchCase": 0
}
],
2020-11-12 23:57:21 +01:00
"no-use-before-define": "off",
2020-10-15 01:02:41 +02:00
"@typescript-eslint/no-use-before-define": [
2,
{
"classes": false,
"functions": false,
"variables": false
}
],
2020-11-13 01:25:14 +01:00
"no-useless-constructor": 0,
"@typescript-eslint/no-useless-constructor": 2,
2020-10-15 01:02:41 +02:00
"react/jsx-filename-extension": 0
}
},
{
"files": ["tests/**", "**/*.test.*"],
"env": {
"jest": true
},
"rules": {
"func-names": 0,
"global-require": 0,
"new-cap": 0,
"prefer-arrow-callback": 0,
"no-import-assign": 0
}
},
{
"files": ["cypress/**"],
2020-10-15 01:02:41 +02:00
"rules": {
"cypress/no-unnecessary-waiting": 0,
2020-10-15 01:02:41 +02:00
"func-names": 0,
"import/no-unresolved": 0,
"max-nested-callbacks": 0,
"no-process-env": 0,
"no-unused-expressions": 0
2020-10-15 01:02:41 +02:00
}
}
]
}