@aiou/eslint-config 1.4.0 → 1.5.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/dist/index.cjs CHANGED
@@ -1009,7 +1009,8 @@ const jsonc = () => {
1009
1009
  {
1010
1010
  pathPattern: "^exports.*$",
1011
1011
  // According to webpack, default condition should be last item
1012
- order: ["import", "require", "types", "node", "browser", "default"]
1012
+ // Typescript bugs: types should be first one
1013
+ order: ["types", "import", "require", "node", "browser", "default"]
1013
1014
  },
1014
1015
  {
1015
1016
  order: { type: "asc" },
@@ -4308,6 +4309,9 @@ const typescript = () => {
4308
4309
  "@typescript-eslint/sort-type-constituents": "error",
4309
4310
  "@typescript-eslint/unbound-method": "off",
4310
4311
  "@typescript-eslint/prefer-for-of": "error",
4312
+ // When .ts files compiled to .mjs, will throw require is not found
4313
+ // use createRequire instead
4314
+ "@typescript-eslint/no-require-imports": "error",
4311
4315
  // https://www.npmjs.com/package/eslint-plugin-etc
4312
4316
  "etc/no-t": "error",
4313
4317
  /**
package/dist/index.mjs CHANGED
@@ -1007,7 +1007,8 @@ const jsonc = () => {
1007
1007
  {
1008
1008
  pathPattern: "^exports.*$",
1009
1009
  // According to webpack, default condition should be last item
1010
- order: ["import", "require", "types", "node", "browser", "default"]
1010
+ // Typescript bugs: types should be first one
1011
+ order: ["types", "import", "require", "node", "browser", "default"]
1011
1012
  },
1012
1013
  {
1013
1014
  order: { type: "asc" },
@@ -4306,6 +4307,9 @@ const typescript = () => {
4306
4307
  "@typescript-eslint/sort-type-constituents": "error",
4307
4308
  "@typescript-eslint/unbound-method": "off",
4308
4309
  "@typescript-eslint/prefer-for-of": "error",
4310
+ // When .ts files compiled to .mjs, will throw require is not found
4311
+ // use createRequire instead
4312
+ "@typescript-eslint/no-require-imports": "error",
4309
4313
  // https://www.npmjs.com/package/eslint-plugin-etc
4310
4314
  "etc/no-t": "error",
4311
4315
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiou/eslint-config",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "eslint config for aiou template",
5
5
  "keywords": [],
6
6
  "license": "MIT",