@mlaursen/eslint-config 1.5.0 → 1.8.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/CHANGELOG.md +21 -0
- package/README.md +8 -2
- package/index.js +0 -14
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.8.0](https://github.com/mlaursen/eslint-config/compare/v1.7.0...v1.8.0) (2022-08-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **deps:** bump eslint dependencies to latest ([768677b](https://github.com/mlaursen/eslint-config/commit/768677bebd3342738e1bef6c3ed6b579594d4f03))
|
|
11
|
+
|
|
12
|
+
## [1.7.0](https://github.com/mlaursen/eslint-config/compare/v1.6.0...v1.7.0) (2022-06-28)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **deps:** bump dependencies to latest ([70fac92](https://github.com/mlaursen/eslint-config/commit/70fac9240155afd9ea065d7373fa776c965bf3fd))
|
|
18
|
+
|
|
19
|
+
## [1.6.0](https://github.com/mlaursen/eslint-config/compare/v1.5.0...v1.6.0) (2022-03-24)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **typescript:** disable @typescript-eslint/consistent-type-imports ([1720116](https://github.com/mlaursen/eslint-config/commit/17201169a3a454901b69226312a0f29174f876a5))
|
|
25
|
+
|
|
5
26
|
## [1.5.0](https://github.com/mlaursen/eslint-config/compare/v1.4.0...v1.5.0) (2022-03-09)
|
|
6
27
|
|
|
7
28
|
|
package/README.md
CHANGED
|
@@ -5,9 +5,13 @@ A reusable eslint config that I use for most of my projects.
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```js
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports = {
|
|
9
|
+
extends: "@mlaursen/eslint-config",
|
|
10
|
+
};
|
|
9
11
|
```
|
|
10
12
|
|
|
13
|
+
## Additional Type Checking
|
|
14
|
+
|
|
11
15
|
Or if I want to do additional rules and strict type checking linting rules:
|
|
12
16
|
|
|
13
17
|
```js
|
|
@@ -23,7 +27,9 @@ module.exports = {
|
|
|
23
27
|
overrides: [
|
|
24
28
|
{
|
|
25
29
|
files: ["**/*.ts", "**/*.tsx"],
|
|
26
|
-
extends: [
|
|
30
|
+
extends: [
|
|
31
|
+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
32
|
+
],
|
|
27
33
|
},
|
|
28
34
|
// any custom overrides for this project
|
|
29
35
|
],
|
package/index.js
CHANGED
|
@@ -2,21 +2,11 @@ const confusingBrowserGlobals = require('confusing-browser-globals');
|
|
|
2
2
|
|
|
3
3
|
let react = false;
|
|
4
4
|
let isNewJsx = false;
|
|
5
|
-
let isTypescript38 = false;
|
|
6
5
|
try {
|
|
7
6
|
require.resolve('react');
|
|
8
7
|
react = true;
|
|
9
8
|
isNewJsx = parseInt(require('react').version, 10) > 16;
|
|
10
9
|
} catch (e) {}
|
|
11
|
-
try {
|
|
12
|
-
const { version } = require('typescript');
|
|
13
|
-
const [majorString, minorString] = version.split('.');
|
|
14
|
-
const major = parseInt(majorString, 10);
|
|
15
|
-
const minor = parseInt(minorString, 10);
|
|
16
|
-
if (!Number.isNaN(major) && !Number.isNaN(minor)) {
|
|
17
|
-
isTypescript38 = major > 3 || (major === 3 && minor > 8);
|
|
18
|
-
}
|
|
19
|
-
} catch (e) {}
|
|
20
10
|
|
|
21
11
|
module.exports = {
|
|
22
12
|
parser: '@typescript-eslint/parser',
|
|
@@ -116,10 +106,6 @@ module.exports = {
|
|
|
116
106
|
varsIgnorePattern: '^_',
|
|
117
107
|
},
|
|
118
108
|
],
|
|
119
|
-
|
|
120
|
-
'@typescript-eslint/consistent-type-imports': isTypescript38
|
|
121
|
-
? ['error']
|
|
122
|
-
: 'off',
|
|
123
109
|
},
|
|
124
110
|
},
|
|
125
111
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlaursen/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
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",
|
|
@@ -19,28 +19,28 @@
|
|
|
19
19
|
"typescript"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
23
|
-
"@typescript-eslint/parser": "^5.
|
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
|
23
|
+
"@typescript-eslint/parser": "^5.34.0",
|
|
24
24
|
"confusing-browser-globals": "^1.0.11",
|
|
25
25
|
"eslint-config-prettier": "^8.5.0",
|
|
26
|
-
"eslint-plugin-import": "^2.
|
|
27
|
-
"eslint-plugin-jest": "^26.
|
|
28
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
29
|
-
"eslint-plugin-react": "^7.
|
|
30
|
-
"eslint-plugin-react-hooks": "^4.
|
|
31
|
-
"eslint-plugin-tsdoc": "^0.2.
|
|
26
|
+
"eslint-plugin-import": "^2.26.0",
|
|
27
|
+
"eslint-plugin-jest": "^26.8.7",
|
|
28
|
+
"eslint-plugin-jsx-a11y": "^6.6.1",
|
|
29
|
+
"eslint-plugin-react": "^7.30.1",
|
|
30
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
31
|
+
"eslint-plugin-tsdoc": "^0.2.16"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@mlaursen/changelog-preset": "^1.1.0",
|
|
35
|
-
"@octokit/core": "^
|
|
36
|
-
"@types/inquirer": "^8.2.
|
|
37
|
-
"@types/node": "^
|
|
38
|
-
"dotenv": "^16.0.
|
|
39
|
-
"eslint": "^8.
|
|
40
|
-
"inquirer": "^8.2.
|
|
41
|
-
"standard-version": "^9.
|
|
42
|
-
"ts-node": "^10.
|
|
43
|
-
"typescript": "^4.
|
|
35
|
+
"@octokit/core": "^4.0.4",
|
|
36
|
+
"@types/inquirer": "^8.2.1",
|
|
37
|
+
"@types/node": "^18.6.5",
|
|
38
|
+
"dotenv": "^16.0.1",
|
|
39
|
+
"eslint": "^8.22.0",
|
|
40
|
+
"inquirer": "^8.2.4",
|
|
41
|
+
"standard-version": "^9.5.0",
|
|
42
|
+
"ts-node": "^10.9.1",
|
|
43
|
+
"typescript": "^4.7.4"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"eslint": ">= 8.0.0",
|