@css-modules-kit/stylelint-plugin 0.0.1 → 0.0.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@css-modules-kit/stylelint-plugin",
3
3
  "description": "A stylelint plugin for CSS Modules",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "commonjs",
6
6
  "sideEffects": false,
7
7
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "@css-modules-kit/core": "^0.0.1"
40
+ "@css-modules-kit/core": "^0.0.2"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "stylelint": "^16.0.0"
@@ -1,3 +0,0 @@
1
- import stylelint from 'stylelint';
2
- export declare const noMissingTsFile: stylelint.Plugin;
3
- //# sourceMappingURL=no-missing-ts-file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-missing-ts-file.d.ts","sourceRoot":"","sources":["../../src/rules/no-missing-ts-file.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,WAAW,CAAC;AA0ClC,eAAO,MAAM,eAAe,kBAAuC,CAAC"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.noMissingTsFile = void 0;
7
- const stylelint_1 = __importDefault(require("stylelint"));
8
- const util_js_1 = require("../util.js");
9
- // TODO: Report cjs-module-lexer compatibility problem to stylelint
10
- const { createPlugin, utils } = stylelint_1.default;
11
- const ruleName = 'honey-css-modules/no-missing-ts-file';
12
- const messages = utils.ruleMessages(ruleName, {
13
- disallow: () => `The corresponding TypeScript file is not found.`,
14
- });
15
- const meta = {
16
- url: 'https://github.com/mizdra/honey-css-modules/blob/main/packages/stylelint-plugin-honey-css-modules/docs/rules/no-missing-ts-file.md',
17
- };
18
- const ruleFunction = (_primaryOptions, _secondaryOptions, _context) => {
19
- return async (root, result) => {
20
- if (root.source?.input.file === undefined)
21
- return;
22
- const cssModuleFileName = root.source.input.file;
23
- if (!cssModuleFileName.endsWith('.module.css'))
24
- return;
25
- const tsFile = await (0, util_js_1.findComponentFile)(cssModuleFileName);
26
- if (tsFile === undefined) {
27
- utils.report({
28
- result,
29
- ruleName,
30
- message: messages.disallow(),
31
- node: root,
32
- index: 0,
33
- endIndex: 0,
34
- });
35
- }
36
- };
37
- };
38
- ruleFunction.ruleName = ruleName;
39
- ruleFunction.messages = messages;
40
- ruleFunction.meta = meta;
41
- exports.noMissingTsFile = createPlugin(ruleName, ruleFunction);
42
- //# sourceMappingURL=no-missing-ts-file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"no-missing-ts-file.js","sourceRoot":"","sources":["../../src/rules/no-missing-ts-file.ts"],"names":[],"mappings":";;;;;;AACA,0DAAkC;AAClC,wCAA+C;AAE/C,mEAAmE;AACnE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,mBAAS,CAAC;AAE1C,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAExD,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE;IAC5C,QAAQ,EAAE,GAAG,EAAE,CAAC,iDAAiD;CAClE,CAAC,CAAC;AAEH,MAAM,IAAI,GAAG;IACX,GAAG,EAAE,oIAAoI;CAC1I,CAAC;AAEF,MAAM,YAAY,GAAS,CAAC,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE;IAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;QAC5B,IAAI,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO;QAClD,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QAEjD,IAAI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