@mlaursen/eslint-config 2.0.0 → 2.1.0
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.cjs → index.js} +29 -22
- package/package.json +18 -18
package/{index.cjs → index.js}
RENAMED
|
@@ -47,13 +47,14 @@ module.exports = {
|
|
|
47
47
|
},
|
|
48
48
|
rules: {
|
|
49
49
|
'no-console': 'warn',
|
|
50
|
+
'no-use-before-define': 'warning',
|
|
50
51
|
|
|
51
52
|
'no-restricted-globals': ['error', 'isFinite', 'isNaN'].concat(
|
|
52
53
|
confusingBrowserGlobals
|
|
53
54
|
),
|
|
54
55
|
|
|
55
56
|
// too many false positives with aliases/root dirs
|
|
56
|
-
'import/no-unresolved':
|
|
57
|
+
'import/no-unresolved': 'off',
|
|
57
58
|
|
|
58
59
|
curly: 'error',
|
|
59
60
|
},
|
|
@@ -65,10 +66,10 @@ module.exports = {
|
|
|
65
66
|
// I want correct tsdoc syntax
|
|
66
67
|
'tsdoc/syntax': 'warn',
|
|
67
68
|
|
|
68
|
-
'react/prop-types':
|
|
69
|
+
'react/prop-types': 'off',
|
|
69
70
|
|
|
70
71
|
// have to disable since it can report incorrect errors
|
|
71
|
-
'no-empty-function':
|
|
72
|
+
'no-empty-function': 'off',
|
|
72
73
|
|
|
73
74
|
// I prefer shorthand syntax
|
|
74
75
|
'@typescript-eslint/array-type': ['error', { default: 'array' }],
|
|
@@ -92,7 +93,7 @@ module.exports = {
|
|
|
92
93
|
],
|
|
93
94
|
|
|
94
95
|
// not a big fan of requiring unknown objects to require the index signature
|
|
95
|
-
'@typescript-eslint/ban-types':
|
|
96
|
+
'@typescript-eslint/ban-types': 'off',
|
|
96
97
|
|
|
97
98
|
// This is a "better" version of the `noUnusedLocals` and
|
|
98
99
|
// `noUnusedParameters` from the tsconfig.json since it can catch
|
|
@@ -107,6 +108,12 @@ module.exports = {
|
|
|
107
108
|
},
|
|
108
109
|
],
|
|
109
110
|
},
|
|
111
|
+
|
|
112
|
+
'no-use-before-define': 'off',
|
|
113
|
+
'@typescript-eslint/no-use-before-define': [
|
|
114
|
+
'warn',
|
|
115
|
+
{ ignoreTypeReferences: true },
|
|
116
|
+
],
|
|
110
117
|
},
|
|
111
118
|
{
|
|
112
119
|
files: [
|
|
@@ -120,24 +127,24 @@ module.exports = {
|
|
|
120
127
|
},
|
|
121
128
|
// allow for less strict rules when writing tests
|
|
122
129
|
rules: {
|
|
123
|
-
'prefer-template':
|
|
124
|
-
|
|
125
|
-
'@typescript-eslint/no-explicit-any':
|
|
126
|
-
'@typescript-eslint/explicit-function-return-type':
|
|
127
|
-
'@typescript-eslint/no-object-literal-type-assertion':
|
|
128
|
-
'@typescript-eslint/no-var-requires':
|
|
129
|
-
'@typescript-eslint/no-empty-function':
|
|
130
|
-
'@typescript-eslint/ban-ts-comment':
|
|
131
|
-
'@typescript-eslint/no-empty-function':
|
|
132
|
-
|
|
133
|
-
'jsx-a11y/no-autofocus':
|
|
134
|
-
'jsx-a11y/no-static-element-interactions':
|
|
135
|
-
'jsx-a11y/anchor-is-valid':
|
|
136
|
-
'jsx-a11y/control-has-associated-label':
|
|
137
|
-
|
|
138
|
-
'react/prop-types':
|
|
139
|
-
'react/display-name':
|
|
140
|
-
'react/prefer-stateless-function':
|
|
130
|
+
'prefer-template': 'off',
|
|
131
|
+
|
|
132
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
133
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
134
|
+
'@typescript-eslint/no-object-literal-type-assertion': 'off',
|
|
135
|
+
'@typescript-eslint/no-var-requires': 'off',
|
|
136
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
137
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
138
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
139
|
+
|
|
140
|
+
'jsx-a11y/no-autofocus': 'off',
|
|
141
|
+
'jsx-a11y/no-static-element-interactions': 'off',
|
|
142
|
+
'jsx-a11y/anchor-is-valid': 'off',
|
|
143
|
+
'jsx-a11y/control-has-associated-label': 'off',
|
|
144
|
+
|
|
145
|
+
'react/prop-types': 'off',
|
|
146
|
+
'react/display-name': 'off',
|
|
147
|
+
'react/prefer-stateless-function': 'off',
|
|
141
148
|
},
|
|
142
149
|
},
|
|
143
150
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlaursen/eslint-config",
|
|
3
|
-
"
|
|
4
|
-
"version": "2.0.0",
|
|
3
|
+
"version": "2.1.0",
|
|
5
4
|
"description": "An eslint config used by mlaursen for most projects.",
|
|
6
5
|
"main": "index.js",
|
|
7
6
|
"repository": "https://github.com/mlaursen/eslint-config.git",
|
|
@@ -13,7 +12,7 @@
|
|
|
13
12
|
},
|
|
14
13
|
"engineStrict": true,
|
|
15
14
|
"files": [
|
|
16
|
-
"index.
|
|
15
|
+
"index.js"
|
|
17
16
|
],
|
|
18
17
|
"bugs": {
|
|
19
18
|
"url": "https://github.com/mlaursen/eslint-config/issues"
|
|
@@ -23,28 +22,29 @@
|
|
|
23
22
|
"typescript"
|
|
24
23
|
],
|
|
25
24
|
"dependencies": {
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
27
|
-
"@typescript-eslint/parser": "^5.
|
|
25
|
+
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
|
26
|
+
"@typescript-eslint/parser": "^5.48.2",
|
|
28
27
|
"confusing-browser-globals": "^1.0.11",
|
|
29
|
-
"eslint-config-prettier": "^8.
|
|
30
|
-
"eslint-plugin-import": "^2.
|
|
31
|
-
"eslint-plugin-jest": "^27.1
|
|
32
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
33
|
-
"eslint-plugin-react": "^7.
|
|
28
|
+
"eslint-config-prettier": "^8.6.0",
|
|
29
|
+
"eslint-plugin-import": "^2.27.5",
|
|
30
|
+
"eslint-plugin-jest": "^27.2.1",
|
|
31
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
32
|
+
"eslint-plugin-react": "^7.32.1",
|
|
34
33
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
35
34
|
"eslint-plugin-tsdoc": "^0.2.17"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"@mlaursen/changelog-preset": "^1.1.0",
|
|
39
38
|
"@octokit/core": "^4.1.0",
|
|
40
|
-
"@
|
|
41
|
-
"@types/
|
|
39
|
+
"@swc/core": "^1.3.27",
|
|
40
|
+
"@types/inquirer": "^8.2.1",
|
|
41
|
+
"@types/node": "^18.11.18",
|
|
42
42
|
"dotenv": "^16.0.3",
|
|
43
|
-
"eslint": "^8.
|
|
44
|
-
"inquirer": "^
|
|
43
|
+
"eslint": "^8.32.0",
|
|
44
|
+
"inquirer": "^8.2.4",
|
|
45
45
|
"standard-version": "^9.5.0",
|
|
46
46
|
"ts-node": "^10.9.1",
|
|
47
|
-
"typescript": "^4.9.
|
|
47
|
+
"typescript": "^4.9.4"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"eslint": ">= 8.0.0",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
|
-
"test": "eslint -c index.
|
|
66
|
-
"
|
|
67
|
-
"release": "
|
|
65
|
+
"test": "eslint -c index.js \"test/**/*.{js,jsx,ts,tsx}\"",
|
|
66
|
+
"cli": "ts-node -P tsconfig.json --swc",
|
|
67
|
+
"release": "pnpm run cli scripts/release.ts"
|
|
68
68
|
}
|
|
69
69
|
}
|