@meteorlxy/eslint-config 2.12.0 → 2.14.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.
Files changed (2) hide show
  1. package/lib/index.js +15 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -80,6 +80,21 @@ module.exports = {
80
80
  },
81
81
  ],
82
82
 
83
+ /**
84
+ * Override airbnb-base rules to enforce .mjs extension
85
+ *
86
+ * @see https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
87
+ * @see https://github.com/airbnb/javascript/blob/1ca21aba799699ba556bed058e3900514a9fbee3/packages/eslint-config-airbnb-base/rules/imports.js#L138-L142
88
+ */
89
+ 'import/extensions': [
90
+ airbnbRulesImports.rules['import/extensions'][0],
91
+ airbnbRulesImports.rules['import/extensions'][1],
92
+ {
93
+ ...airbnbRulesImports.rules['import/extensions'][2],
94
+ mjs: 'always',
95
+ },
96
+ ],
97
+
83
98
  /**
84
99
  * Add config files of some other tools
85
100
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorlxy/eslint-config",
3
- "version": "2.12.0",
3
+ "version": "2.14.0",
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": "bd14996a196920f6173b7bc521b045e817ca54b9"
28
+ "gitHead": "c44744f2ce35da54fc07e44aa0227c067a4724f7"
29
29
  }