@stanlemon/eslint-config 0.1.0 → 0.1.4
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/index.js +42 -2
- package/package.json +8 -9
package/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const dir = process.cwd();
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
env: {
|
|
3
5
|
es2021: true,
|
|
@@ -18,6 +20,8 @@ module.exports = {
|
|
|
18
20
|
"error",
|
|
19
21
|
{
|
|
20
22
|
max: 80,
|
|
23
|
+
skipBlankLines: true,
|
|
24
|
+
skipComments: true,
|
|
21
25
|
},
|
|
22
26
|
],
|
|
23
27
|
// Linting shouldn't break on this, but we also want to discourage using console logging
|
|
@@ -34,12 +38,48 @@ module.exports = {
|
|
|
34
38
|
},
|
|
35
39
|
overrides: [
|
|
36
40
|
{
|
|
37
|
-
files: ["**/*.ts
|
|
38
|
-
|
|
41
|
+
files: ["**/*.{ts,tsx}"],
|
|
42
|
+
plugins: ["@typescript-eslint"],
|
|
43
|
+
extends: [
|
|
44
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
45
|
+
"plugin:@typescript-eslint/recommended",
|
|
46
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
47
|
+
],
|
|
48
|
+
parser: "@typescript-eslint/parser",
|
|
49
|
+
parserOptions: {
|
|
50
|
+
// Lint with Type Information
|
|
51
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
|
|
52
|
+
tsconfigRootDir: dir,
|
|
53
|
+
project: dir + "/tsconfig.json",
|
|
54
|
+
},
|
|
55
|
+
settings: {
|
|
56
|
+
"import/parsers": {
|
|
57
|
+
"@typescript-eslint/parser": [".ts", ".tsx"],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
39
60
|
rules: {
|
|
40
61
|
// Requires 'public' before public methods
|
|
41
62
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
42
63
|
},
|
|
43
64
|
},
|
|
65
|
+
{
|
|
66
|
+
files: ["**/*.jsx", "**/.tsx"],
|
|
67
|
+
rules: {
|
|
68
|
+
"max-lines-per-function": [
|
|
69
|
+
"error",
|
|
70
|
+
{
|
|
71
|
+
max: 160,
|
|
72
|
+
skipBlankLines: true,
|
|
73
|
+
skipComments: true,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
files: ["**/*.test.*"],
|
|
80
|
+
rules: {
|
|
81
|
+
"max-lines-per-function": "off",
|
|
82
|
+
},
|
|
83
|
+
},
|
|
44
84
|
],
|
|
45
85
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stanlemon/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "My typical eslint setup, but without all the copy and paste.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint"
|
|
@@ -15,19 +15,18 @@
|
|
|
15
15
|
"lint": "eslint --ext js,jsx,ts,tsx ./",
|
|
16
16
|
"lint:format": "eslint --fix --ext js,jsx,ts,tsx ./"
|
|
17
17
|
},
|
|
18
|
-
"
|
|
18
|
+
"dependencies": {
|
|
19
19
|
"@babel/eslint-parser": "^7.16.5",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
21
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
-
"
|
|
23
|
-
"eslint": "^8.4.1",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
|
21
|
+
"@typescript-eslint/parser": "^5.9.0",
|
|
22
|
+
"eslint": "^8.6.0",
|
|
24
23
|
"eslint-config-prettier": "^8.3.0",
|
|
25
24
|
"eslint-config-react-app": "^7.0.0",
|
|
26
|
-
"eslint-plugin-import": "^2.25.
|
|
27
|
-
"eslint-plugin-jest": "^25.3.
|
|
25
|
+
"eslint-plugin-import": "^2.25.4",
|
|
26
|
+
"eslint-plugin-jest": "^25.3.4",
|
|
28
27
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
29
28
|
"eslint-plugin-prettier": "^4.0.0",
|
|
30
|
-
"eslint-plugin-react": "^7.
|
|
29
|
+
"eslint-plugin-react": "^7.28.0",
|
|
31
30
|
"eslint-plugin-react-hooks": "^4.3.0"
|
|
32
31
|
}
|
|
33
32
|
}
|