@foray1010/eslint-config 7.11.0 → 7.12.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 +6 -0
- package/package.json +2 -2
- package/presets/base.js +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.12.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.11.0...@foray1010/eslint-config@7.12.0) (2022-10-20)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **eslint-config:** add checking on circular dependency and self import ([a42e38a](https://github.com/foray1010/common-presets/commit/a42e38a0a08de73265cf70185569b45587284a2f))
|
|
11
|
+
|
|
6
12
|
## [7.11.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@7.10.0...@foray1010/eslint-config@7.11.0) (2022-10-18)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@foray1010/eslint-config",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.12.0",
|
|
5
5
|
"homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/foray1010/common-presets/issues",
|
|
7
7
|
"repository": {
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "122e9b3aaffb9257c1c119d0f60352a8ca006414"
|
|
62
62
|
}
|
package/presets/base.js
CHANGED
|
@@ -102,6 +102,14 @@ module.exports = {
|
|
|
102
102
|
allowObject: false,
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
|
+
// no circular dependency
|
|
106
|
+
'import/no-cycle': [
|
|
107
|
+
'error',
|
|
108
|
+
{
|
|
109
|
+
// speed up linting time
|
|
110
|
+
ignoreExternal: true,
|
|
111
|
+
},
|
|
112
|
+
],
|
|
105
113
|
// do not allow import packages that are not listed in dependencies or peerDependencies
|
|
106
114
|
'import/no-extraneous-dependencies': [
|
|
107
115
|
'error',
|
|
@@ -113,6 +121,8 @@ module.exports = {
|
|
|
113
121
|
],
|
|
114
122
|
},
|
|
115
123
|
],
|
|
124
|
+
// forbid a module from importing itself
|
|
125
|
+
'import/no-self-import': 'error',
|
|
116
126
|
// use the shortest path in import statement, but allow /index because it will be standard to omit index as default file in directory
|
|
117
127
|
'import/no-useless-path-segments': [
|
|
118
128
|
'error',
|