Skip to content

Commit cf5c799

Browse files
committed
style: make eslint happy
1 parent 23dcfb5 commit cf5c799

File tree

4 files changed

+8392
-11567
lines changed

4 files changed

+8392
-11567
lines changed

.eslintrc

+63-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"project": "./tsconfig.json"
5+
},
26
"extends": [
3-
"react-app",
4-
"@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript",
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"prettier",
510
"plugin:jsx-a11y/recommended"
611
],
7-
"plugins": ["jsx-a11y"],
12+
"plugins": [
13+
"jsx-a11y",
14+
"@typescript-eslint",
15+
"unicorn",
16+
"prefer-arrow",
17+
"import"
18+
],
819
"rules": {
920
"no-restricted-imports": [
1021
"error",
@@ -16,19 +27,60 @@
1627
}
1728
]
1829
}
19-
]
30+
],
31+
"@typescript-eslint/indent": ["off"],
32+
"@typescript-eslint/no-object-literal-type-assertion": ["off"],
33+
"@typescript-eslint/explicit-function-return-type": ["off"],
34+
"@typescript-eslint/await-thenable": ["error"],
35+
"@typescript-eslint/no-extraneous-class": ["error"],
36+
"@typescript-eslint/no-floating-promises": ["error"],
37+
"@typescript-eslint/no-for-in-array": ["error"],
38+
"@typescript-eslint/no-require-imports": ["error"],
39+
"@typescript-eslint/no-this-alias": ["error"],
40+
"@typescript-eslint/no-type-alias": ["off"],
41+
"@typescript-eslint/no-unnecessary-type-assertion": ["error"],
42+
"@typescript-eslint/no-useless-constructor": ["error"],
43+
"@typescript-eslint/prefer-for-of": ["error"],
44+
"@typescript-eslint/prefer-function-type": ["error"],
45+
"@typescript-eslint/prefer-includes": ["error"],
46+
"@typescript-eslint/prefer-readonly": ["error"],
47+
"@typescript-eslint/prefer-regexp-exec": ["error"],
48+
"@typescript-eslint/prefer-string-starts-ends-with": ["error"],
49+
"@typescript-eslint/promise-function-async": ["error"],
50+
"@typescript-eslint/require-array-sort-compare": ["error"],
51+
"@typescript-eslint/restrict-plus-operands": ["error"],
52+
"semi": "off",
53+
"@typescript-eslint/semi": ["off"],
54+
"@typescript-eslint/member-delimiter-style": [
55+
"error",
56+
{
57+
"multiline": {
58+
"delimiter": "none",
59+
"requireLast": false
60+
},
61+
"singleline": {
62+
"delimiter": "semi",
63+
"requireLast": false
64+
}
65+
}
66+
],
67+
"@typescript-eslint/prefer-interface": ["off"],
68+
"@typescript-eslint/no-explicit-any": ["off"],
69+
"no-console": ["off"],
70+
"@typescript-eslint/strict-boolean-expressions": ["error"],
71+
"@typescript-eslint/prefer-nullish-coalescing": ["error"],
72+
"@typescript-eslint/prefer-optional-chain": ["error"],
73+
"prefer-promise-reject-errors": ["error"],
74+
"unicorn/prefer-string-slice": ["error"],
75+
"@typescript-eslint/switch-exhaustiveness-check": ["error"],
76+
"prefer-arrow/prefer-arrow-functions": ["error"],
77+
"object-shorthand": ["error"],
78+
"import/extensions": ["error", "always", { "ignorePackages": true }]
2079
},
2180
"overrides": [
22-
{
23-
"files": ["*.tsx"],
24-
"rules": {
25-
"@typescript-eslint/explicit-module-boundary-types": "off"
26-
}
27-
},
2881
{
2982
"files": ["*.d.ts"],
3083
"rules": {
31-
"@typescript-eslint/consistent-type-definitions": "off",
3284
"@typescript-eslint/ban-types": "off"
3385
}
3486
}

0 commit comments

Comments
 (0)