eslint-config-beslogic 4.0.2 → 4.0.3
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 +40 -1
- package/README.md +1 -1
- package/eslint.config.mjs +6 -6
- package/javascript.mjs +2 -1
- package/lib/patch-dependencies.mjs +0 -1
- package/lib/utils.mjs +0 -1
- package/package.json +7 -5
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
- Allow `^8.56 || ^9.12` for the ESLint version range. But v9 is completely untested.
|
|
6
|
+
|
|
3
7
|
## 4.0.2
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
### Important migration notes
|
|
10
|
+
|
|
11
|
+
- You'll have to migrate your configs to use Flat Config
|
|
12
|
+
- We recommend `eslint.config.mjs` to use configs as ES Modules and be explicit about it.
|
|
13
|
+
- The README has been updated with basic configuration examples
|
|
14
|
+
- See <https://eslint.org/docs/latest/use/configure/migration-guide> for further help
|
|
15
|
+
- You can remove `--ignore-path .gitignore` from your lint command.
|
|
6
16
|
- `angular-eslint` won't work on HTML files on ESLint v8 due to parser configuration issues.
|
|
17
|
+
- Nested configuration files autodiscovery won't work until [ESLint v9.12](https://github.com/eslint/eslint/pull/18742).\
|
|
18
|
+
In the mean time, you can extend your child configs in your parent with a `files` restriction.
|
|
19
|
+
- `@eslint-community/eslint-comments/no-unused-disable` does not currently work with Flat Configs,
|
|
20
|
+
so unused disable comments are no longer reported.
|
|
21
|
+
See <https://github.com/eslint-community/eslint-plugin-eslint-comments/issues/244>
|
|
22
|
+
|
|
23
|
+
### Rest of the changes
|
|
24
|
+
|
|
25
|
+
- Initial support for Flat Configs. v4 will only support Flat Configs (`eslint.config.js`), please use v3 for Legacy Configs (`.eslintrc`).
|
|
7
26
|
- Autodetection of `.gitignore` using `eslint-config-flat-gitignore`
|
|
8
27
|
- Updated dependencies:
|
|
9
28
|
- Using the combined `typescript-eslint` package instead of `@typescript-eslint/eslint-plugin` + `@typescript-eslint/parser`
|
|
@@ -16,6 +35,26 @@
|
|
|
16
35
|
- Bumped `eslint-plugin-react` to `^7.37.1`
|
|
17
36
|
- Added dependency on `@eslint/compat` and `eslint-config-flat-gitignore`
|
|
18
37
|
|
|
38
|
+
## 3.1.3
|
|
39
|
+
|
|
40
|
+
- Bumped `"@typescript-eslint` to `^8.15.0`
|
|
41
|
+
- Disabled `sonarjs/fixme-tag`
|
|
42
|
+
- Disabled `@typescript-eslint/no-unsafe-type-assertion` and `@typescript-eslint/related-getter-setter-pairs` in non-`extra-strict` presets.
|
|
43
|
+
- Added `"checkTypePredicates": true` to `@typescript-eslint/no-unnecessary-condition`
|
|
44
|
+
- Configured `@typescript-eslint/prefer-nullish-coalescing` as
|
|
45
|
+
<!-- markdownlint-disable-next-line MD031 -->
|
|
46
|
+
```js
|
|
47
|
+
[
|
|
48
|
+
"error",
|
|
49
|
+
{
|
|
50
|
+
// > If you're looking to enforce stricter conditional tests,
|
|
51
|
+
// > you should consider using the strict-boolean-expressions rule.
|
|
52
|
+
"ignoreConditionalTests": true,
|
|
53
|
+
"ignoreBooleanCoercion": true
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
```
|
|
57
|
+
|
|
19
58
|
## 3.1.2
|
|
20
59
|
|
|
21
60
|
- Removed `globalThis` from `no-restricted-globals` as the adoption is now much wider (no more IE11) and it conflicts with `unicorn/prefer-global-this`
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Run `npm i --save-dev eslint-config-beslogic`
|
|
|
6
6
|
|
|
7
7
|
Depending on your needs, you will need to also install other peer dependencies for linting.
|
|
8
8
|
|
|
9
|
-
In your `eslint.config.[cm]?js` file, simply [extend](https://typescript-eslint.io/
|
|
9
|
+
In your `eslint.config.[cm]?js` file, simply [extend](https://typescript-eslint.io/packages/typescript-eslint#config) our [presets](#presets) appropriate for your project.
|
|
10
10
|
|
|
11
11
|
For stylistic rules, it is highly recommended to use a dedicated formatter over ESLint. Read more here: <https://typescript-eslint.io/docs/linting/troubleshooting/formatting/>\
|
|
12
12
|
We assume [dprint](https://dprint.dev/) and don't enable any rules it covers by default. If you're not using a formatter, a [stylistic.mjs](#stylisticmjs) configuration is offered below.
|
package/eslint.config.mjs
CHANGED
|
@@ -71,10 +71,10 @@ export default tseslint.config(
|
|
|
71
71
|
},
|
|
72
72
|
// We need to explicitely set these paths because
|
|
73
73
|
// ESLint flat configs doesn't do automated config lookup until 9.12
|
|
74
|
-
{ "files": ["static-tests/*"], "extends":
|
|
75
|
-
{ "files": ["static-tests/angular/**"], "extends":
|
|
76
|
-
{ "files": ["static-tests/javascript/**"], "extends":
|
|
77
|
-
{ "files": ["static-tests/react-typescript/**"], "extends":
|
|
78
|
-
{ "files": ["static-tests/storybook/**"], "extends":
|
|
79
|
-
{ "files": ["static-tests/typescript/**"], "extends":
|
|
74
|
+
{ "files": ["static-tests/*"], "extends": staticTestsRoot },
|
|
75
|
+
{ "files": ["static-tests/angular/**"], "extends": staticTestsAngular },
|
|
76
|
+
{ "files": ["static-tests/javascript/**"], "extends": staticTestsJavascript },
|
|
77
|
+
{ "files": ["static-tests/react-typescript/**"], "extends": staticTestsReactTypeScript },
|
|
78
|
+
{ "files": ["static-tests/storybook/**"], "extends": staticTestsStorybook },
|
|
79
|
+
{ "files": ["static-tests/typescript/**"], "extends": staticTestsTypeScript }
|
|
80
80
|
)
|
package/javascript.mjs
CHANGED
|
@@ -118,7 +118,8 @@ export const noRestrictedImportsConfig = {
|
|
|
118
118
|
"default",
|
|
119
119
|
"React"
|
|
120
120
|
],
|
|
121
|
-
"message": "Please don't use the default React import."
|
|
121
|
+
"message": "Please don't use the default React import. "
|
|
122
|
+
+ "You can configure `\"compilerOptions.jsx\": \"react-jsx\"` in tsconfig.json instead."
|
|
122
123
|
},
|
|
123
124
|
{
|
|
124
125
|
// From https://github.com/angular-eslint/angular-eslint/blob/master/packages/eslint-plugin/src/configs/recommended--extra.json
|
package/lib/utils.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-beslogic",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "ESLint rules, plugins and configs used at Beslogic",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"// dependencies": "Run for ourselves when we install dependencies w/o running npm i afterward",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@types/eslint": "^8.56",
|
|
50
50
|
"confusing-browser-globals": "^1.0",
|
|
51
51
|
"dprint": "^0.40.2",
|
|
52
|
-
"eslint": "^8.56",
|
|
52
|
+
"eslint": "^8.56 || ^9.12",
|
|
53
53
|
"eslint-config-flat-gitignore": "^1.0.0",
|
|
54
54
|
"eslint-import-resolver-typescript": "^3.2.6",
|
|
55
55
|
"eslint-plugin-autofix": "^1.1 || ^2.0",
|
|
@@ -84,20 +84,22 @@
|
|
|
84
84
|
"eslint-plugin-storybook": "^0.10"
|
|
85
85
|
},
|
|
86
86
|
"// jest": "Don't install it, so that we test failure to specify jest version",
|
|
87
|
+
"// eslint": "v9 support is untested",
|
|
87
88
|
"devDependencies": {
|
|
88
89
|
"@angular/core": ">=18.0",
|
|
89
90
|
"@types/node": "^18.0",
|
|
91
|
+
"@types/react": "^18.3.3",
|
|
90
92
|
"eslint-plugin-eslint-plugin": "^6.0",
|
|
91
93
|
"react": "^18.3.1",
|
|
92
94
|
"yalc": "^1.0.0-pre.53"
|
|
93
95
|
},
|
|
94
|
-
"//
|
|
96
|
+
"// eslint overrides": "Deps that declare themselves as ESLint 9 compatible only, but we need it for flat config compat",
|
|
95
97
|
"overrides": {
|
|
96
98
|
"@eslint/compat": {
|
|
97
|
-
"eslint": "^8.56"
|
|
99
|
+
"eslint": "^8.56 || ^9.12"
|
|
98
100
|
},
|
|
99
101
|
"eslint-config-flat-gitignore": {
|
|
100
|
-
"eslint": "^8.56"
|
|
102
|
+
"eslint": "^8.56 || ^9.12"
|
|
101
103
|
}
|
|
102
104
|
}
|
|
103
105
|
}
|