@pi-r/stylelint 0.6.5 → 0.6.7

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/index.js +3 -5
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  const Document = require("@e-mc/document");
3
- async function transform(context, value, options) {
3
+ module.exports = async function transform(context, value, options) {
4
4
  context = options.upgrade(context, __dirname);
5
5
  const { pathname, filename } = options;
6
6
  const baseConfig = options.toBaseConfig();
7
7
  const timeStamp = Date.now();
8
8
  const report = (await context.lint({ code: value, config: Object.keys(baseConfig).length ? baseConfig : undefined })).results[0];
9
- if (report?.warnings.length) {
9
+ if (report === null || report === void 0 ? void 0 : report.warnings.length) {
10
10
  options.out[Document.hasLogType(options.logType.STDOUT) ? 'logQueued' : 'logAppend'] = Document.generateLintTable(report.warnings.map(item => ({
11
11
  ruleId: item.rule,
12
12
  line: item.line,
@@ -19,6 +19,4 @@ async function transform(context, value, options) {
19
19
  options.out.messageAppend = ` -> valid(${!report || report.errored ? 'NO' : 'YES'})`;
20
20
  }
21
21
  return value;
22
- }
23
-
24
- module.exports = transform;
22
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/stylelint",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "description": "stylelint transform function for E-mc.",
5
5
  "main": "index.js",
6
6
  "publishConfig": {
@@ -20,8 +20,8 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/document": "^0.8.6",
24
- "stylelint": "^16.2.1",
23
+ "@e-mc/document": "^0.8.8",
24
+ "stylelint": "^16.3.1",
25
25
  "stylelint-config-standard": "^36.0.0"
26
26
  }
27
27
  }