eslint-config-jc 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/rules/base.js +1 -0
- package/rules/typescript-typecheck.js +1 -1
- package/rules/typescript.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-jc",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Josh-Cena's personal coding style",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"eslint-config-prettier": "^8.5.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
39
|
-
"@typescript-eslint/parser": "^5.
|
|
40
|
-
"eslint": "^8.
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
|
39
|
+
"@typescript-eslint/parser": "^5.28.0",
|
|
40
|
+
"eslint": "^8.17.0",
|
|
41
41
|
"eslint-plugin-header": "^3.1.1",
|
|
42
42
|
"eslint-plugin-import": "^2.26.0",
|
|
43
43
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
44
44
|
"eslint-plugin-react": "^7.30.0",
|
|
45
|
-
"eslint-plugin-react-hooks": "^4.
|
|
45
|
+
"eslint-plugin-react-hooks": "^4.6.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"eslint-plugin-header": {
|
package/rules/base.js
CHANGED
|
@@ -91,7 +91,7 @@ module.exports = {
|
|
|
91
91
|
// Implicit casting is fine.
|
|
92
92
|
"@typescript-eslint/restrict-plus-operands": "off",
|
|
93
93
|
|
|
94
|
-
// Default options work fine. However, not allowing `never` is
|
|
94
|
+
// Default options work fine. However, not allowing `never` is a pain
|
|
95
95
|
"@typescript-eslint/restrict-template-expressions": [
|
|
96
96
|
"warn",
|
|
97
97
|
{
|
package/rules/typescript.js
CHANGED
|
@@ -11,6 +11,13 @@ module.exports = {
|
|
|
11
11
|
"@typescript-eslint/no-var-requires": "off",
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
|
+
{
|
|
15
|
+
files: ["**/*.{ts,tsx,cts,mts}"],
|
|
16
|
+
rules: {
|
|
17
|
+
// Use TypeScript's checker instead
|
|
18
|
+
"no-undef": "off",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
14
21
|
],
|
|
15
22
|
parser: "@typescript-eslint/parser",
|
|
16
23
|
parserOptions: {
|
|
@@ -27,6 +34,11 @@ module.exports = {
|
|
|
27
34
|
|
|
28
35
|
"@typescript-eslint/ban-types": "error",
|
|
29
36
|
|
|
37
|
+
"@typescript-eslint/consistent-generic-constructors": [
|
|
38
|
+
"error",
|
|
39
|
+
"constructor",
|
|
40
|
+
],
|
|
41
|
+
|
|
30
42
|
// Index signatures allows annotating the semantics of the key, while record
|
|
31
43
|
// is more concise
|
|
32
44
|
"@typescript-eslint/consistent-indexed-object-style": "off",
|