@mlaursen/eslint-config 2.0.1 → 2.1.1

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.
Files changed (2) hide show
  1. package/index.js +29 -22
  2. package/package.json +14 -13
package/index.js CHANGED
@@ -47,13 +47,14 @@ module.exports = {
47
47
  },
48
48
  rules: {
49
49
  'no-console': 'warn',
50
+ 'no-use-before-define': 'warn',
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': 0,
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': 0,
69
+ 'react/prop-types': 'off',
69
70
 
70
71
  // have to disable since it can report incorrect errors
71
- 'no-empty-function': 0,
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': 0,
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
@@ -106,6 +107,12 @@ module.exports = {
106
107
  varsIgnorePattern: '^_',
107
108
  },
108
109
  ],
110
+
111
+ 'no-use-before-define': 'off',
112
+ '@typescript-eslint/no-use-before-define': [
113
+ 'warn',
114
+ { ignoreTypeReferences: true },
115
+ ],
109
116
  },
110
117
  },
111
118
  {
@@ -120,24 +127,24 @@ module.exports = {
120
127
  },
121
128
  // allow for less strict rules when writing tests
122
129
  rules: {
123
- 'prefer-template': 0,
124
-
125
- '@typescript-eslint/no-explicit-any': 0,
126
- '@typescript-eslint/explicit-function-return-type': 0,
127
- '@typescript-eslint/no-object-literal-type-assertion': 0,
128
- '@typescript-eslint/no-var-requires': 0,
129
- '@typescript-eslint/no-empty-function': 0,
130
- '@typescript-eslint/ban-ts-comment': 0,
131
- '@typescript-eslint/no-empty-function': 0,
132
-
133
- 'jsx-a11y/no-autofocus': 0,
134
- 'jsx-a11y/no-static-element-interactions': 0,
135
- 'jsx-a11y/anchor-is-valid': 0,
136
- 'jsx-a11y/control-has-associated-label': 0,
137
-
138
- 'react/prop-types': 0,
139
- 'react/display-name': 0,
140
- 'react/prefer-stateless-function': 0,
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlaursen/eslint-config",
3
- "version": "2.0.1",
3
+ "version": "2.1.1",
4
4
  "description": "An eslint config used by mlaursen for most projects.",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/mlaursen/eslint-config.git",
@@ -22,28 +22,29 @@
22
22
  "typescript"
23
23
  ],
24
24
  "dependencies": {
25
- "@typescript-eslint/eslint-plugin": "^5.43.0",
26
- "@typescript-eslint/parser": "^5.43.0",
25
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
26
+ "@typescript-eslint/parser": "^5.48.2",
27
27
  "confusing-browser-globals": "^1.0.11",
28
- "eslint-config-prettier": "^8.5.0",
29
- "eslint-plugin-import": "^2.26.0",
30
- "eslint-plugin-jest": "^27.1.5",
31
- "eslint-plugin-jsx-a11y": "^6.6.1",
32
- "eslint-plugin-react": "^7.31.11",
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",
33
33
  "eslint-plugin-react-hooks": "^4.6.0",
34
34
  "eslint-plugin-tsdoc": "^0.2.17"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@mlaursen/changelog-preset": "^1.1.0",
38
38
  "@octokit/core": "^4.1.0",
39
+ "@swc/core": "^1.3.27",
39
40
  "@types/inquirer": "^8.2.1",
40
- "@types/node": "^18.11.9",
41
+ "@types/node": "^18.11.18",
41
42
  "dotenv": "^16.0.3",
42
- "eslint": "^8.28.0",
43
+ "eslint": "^8.32.0",
43
44
  "inquirer": "^8.2.4",
44
45
  "standard-version": "^9.5.0",
45
46
  "ts-node": "^10.9.1",
46
- "typescript": "^4.9.3"
47
+ "typescript": "^4.9.4"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "eslint": ">= 8.0.0",
@@ -62,7 +63,7 @@
62
63
  },
63
64
  "scripts": {
64
65
  "test": "eslint -c index.js \"test/**/*.{js,jsx,ts,tsx}\"",
65
- "run-script": "ts-node -T -P tsconfig.json",
66
- "release": "yarn run-script scripts/release.ts"
66
+ "cli": "ts-node -P tsconfig.json --swc",
67
+ "release": "pnpm run cli scripts/release.ts"
67
68
  }
68
69
  }