@meteorlxy/eslint-config 2.16.0 → 2.16.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.
- package/lib/index.js +26 -4
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -96,10 +96,20 @@ module.exports = {
|
|
|
96
96
|
},
|
|
97
97
|
],
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Disable import default check
|
|
101
|
+
*
|
|
102
|
+
* This rule currently does not interpret `module.exports = ...` as a `default` export,
|
|
103
|
+
* which will report error when importing cjs in node esm
|
|
104
|
+
*
|
|
105
|
+
* @see https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/default.md
|
|
106
|
+
*/
|
|
107
|
+
'import/default': 'off',
|
|
108
|
+
|
|
99
109
|
/**
|
|
100
110
|
* Override airbnb-base rules to enforce .mjs extension
|
|
101
111
|
*
|
|
102
|
-
* @see https://github.com/
|
|
112
|
+
* @see https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/extensions.md
|
|
103
113
|
* @see https://github.com/airbnb/javascript/blob/1ca21aba799699ba556bed058e3900514a9fbee3/packages/eslint-config-airbnb-base/rules/imports.js#L138-L142
|
|
104
114
|
*/
|
|
105
115
|
'import/extensions': [
|
|
@@ -123,8 +133,10 @@ module.exports = {
|
|
|
123
133
|
devDependencies: [
|
|
124
134
|
...airbnbRulesImports.rules['import/no-extraneous-dependencies'][1]
|
|
125
135
|
.devDependencies,
|
|
126
|
-
'**/.vitepress
|
|
127
|
-
'**/.vuepress
|
|
136
|
+
'**/.vitepress/**',
|
|
137
|
+
'**/.vuepress/**',
|
|
138
|
+
'**/.eslintrc.{cjs,js}',
|
|
139
|
+
'**/.commitlintrc.{cjs,js}',
|
|
128
140
|
'**/build.config.js',
|
|
129
141
|
'**/tsup.config.js',
|
|
130
142
|
'**/vite.config.js',
|
|
@@ -134,10 +146,20 @@ module.exports = {
|
|
|
134
146
|
},
|
|
135
147
|
],
|
|
136
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Allow named default
|
|
151
|
+
*
|
|
152
|
+
* Some cjs packages explicitly provide a `exports.default` export, which is required to
|
|
153
|
+
* use `import { default as ... } from ...` syntax to be imported in node esm
|
|
154
|
+
*
|
|
155
|
+
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-default.md
|
|
156
|
+
*/
|
|
157
|
+
'import/no-named-default': 'off',
|
|
158
|
+
|
|
137
159
|
/**
|
|
138
160
|
* Override airbnb-base rules to ensure import order
|
|
139
161
|
*
|
|
140
|
-
* @see https://github.com/
|
|
162
|
+
* @see https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md
|
|
141
163
|
* @see https://github.com/airbnb/javascript/blob/1ca21aba799699ba556bed058e3900514a9fbee3/packages/eslint-config-airbnb-base/rules/imports.js#L144-L147
|
|
142
164
|
*/
|
|
143
165
|
'import/order': [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meteorlxy/eslint-config",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.1",
|
|
4
4
|
"description": "meteorlxy eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "f112ed2da7e6cd3a606055b17493f701c4525a1e"
|
|
29
29
|
}
|