@shuvi/eslint-plugin-shuvi 1.0.55 → 1.0.57

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.d.ts CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
2
3
  module.exports = {
3
4
  rules: {
4
5
  'no-head-element': require('./rules/no-head-element').default,
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPage = void 0;
3
+ exports.isPage = isPage;
4
4
  const PAGEREG = /routes\/.*page\.(j|t)sx?$/;
5
5
  function isPage(path) {
6
6
  return PAGEREG.test(path);
7
7
  }
8
- exports.isPage = isPage;
package/lib/utils/url.js CHANGED
@@ -23,7 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.minDistance = exports.THRESHOLD = exports.execOnce = exports.getUrlFromPagesDirectories = exports.normalizeURL = void 0;
26
+ exports.THRESHOLD = void 0;
27
+ exports.normalizeURL = normalizeURL;
28
+ exports.getUrlFromPagesDirectories = getUrlFromPagesDirectories;
29
+ exports.execOnce = execOnce;
30
+ exports.minDistance = minDistance;
27
31
  const path = __importStar(require("path"));
28
32
  const fs = __importStar(require("fs"));
29
33
  const helpers_1 = require("@shuvi/platform-shared/node/route/helpers");
@@ -95,7 +99,6 @@ function normalizeURL(url) {
95
99
  url = url.endsWith('/') ? url : url + '/';
96
100
  return url;
97
101
  }
98
- exports.normalizeURL = normalizeURL;
99
102
  /**
100
103
  * Gets the possible URLs from a directory.
101
104
  */
@@ -111,7 +114,6 @@ function getUrlFromPagesDirectories(urlPrefix, directories) {
111
114
  .flat()
112
115
  .map(str => ({ path: str }));
113
116
  }
114
- exports.getUrlFromPagesDirectories = getUrlFromPagesDirectories;
115
117
  function execOnce(fn) {
116
118
  let used = false;
117
119
  let result;
@@ -123,7 +125,6 @@ function execOnce(fn) {
123
125
  return result;
124
126
  };
125
127
  }
126
- exports.execOnce = execOnce;
127
128
  // 0 is the exact match
128
129
  exports.THRESHOLD = 1;
129
130
  // the minimum number of operations required to convert string a to string b.
@@ -151,4 +152,3 @@ function minDistance(a, b) {
151
152
  }
152
153
  return previousRow[previousRow.length - 1];
153
154
  }
154
- exports.minDistance = minDistance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/eslint-plugin-shuvi",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "ESLint plugin for Shuvi.",
5
5
  "main": "lib/index.js",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "build": "tsc -p tsconfig.json"
19
19
  },
20
20
  "dependencies": {
21
- "@shuvi/router": "1.0.55",
22
- "@shuvi/platform-shared": "1.0.55"
21
+ "@shuvi/router": "1.0.57",
22
+ "@shuvi/platform-shared": "1.0.57"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/eslint": "7.28.0",