@jhae/stylelint-config-verifier 1.3.0 → 1.4.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.
package/README.md CHANGED
@@ -134,8 +134,9 @@ new ConfigVerifier().verify('at-rule-disallowed-list', {
134
134
 
135
135
  ### Specifying the Stylelint configuration file
136
136
 
137
- By default, the config verifier looks for a `.stylelintrc.yaml` configuration file. If a different location or file name
138
- is used, the path to it can be specified as a constructor argument.
137
+ By default, the Stylelint configuration file is detected automatically as described in
138
+ the [Stylelint documentation](https://stylelint.io/user-guide/configure). If needed, you can override this behavior by
139
+ passing the path to the configuration file to the constructor.
139
140
 
140
141
  ```javascript
141
142
  import { ConfigVerifier } from '@jhae/stylelint-config-verifier';
@@ -49,9 +49,9 @@ class ConfigVerifier {
49
49
  /**
50
50
  * Creates a new `ConfigVerifier` object.
51
51
  *
52
- * @param {string} configFile - The path to the Stylelint config file whose rules should be verified
52
+ * @param {string | undefined} configFile - The path to the Stylelint config file whose rules should be verified
53
53
  */
54
- constructor(configFile = '.stylelintrc.yaml') {
54
+ constructor(configFile) {
55
55
  this.configFile = configFile;
56
56
  }
57
57
  /**
@@ -43,9 +43,9 @@ export class ConfigVerifier {
43
43
  /**
44
44
  * Creates a new `ConfigVerifier` object.
45
45
  *
46
- * @param {string} configFile - The path to the Stylelint config file whose rules should be verified
46
+ * @param {string | undefined} configFile - The path to the Stylelint config file whose rules should be verified
47
47
  */
48
- constructor(configFile = '.stylelintrc.yaml') {
48
+ constructor(configFile) {
49
49
  this.configFile = configFile;
50
50
  }
51
51
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jhae/stylelint-config-verifier",
3
3
  "description": "A Stylelint configuration tester for Jest that helps you verify your defined rules.",
4
- "version": "1.3.0",
4
+ "version": "1.4.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "JHAE",
@@ -21,16 +21,20 @@
21
21
  "require": "./dist/cjs/config-verifier.js",
22
22
  "default": "./dist/esm/config-verifier.js"
23
23
  },
24
+ "files": [
25
+ "./dist/",
26
+ "./types/"
27
+ ],
24
28
  "scripts": {
25
29
  "build": "npm run-script build:package && npm run-script build:types",
26
30
  "build:package": "./bin/build-package",
27
31
  "build:types": "./bin/build-types",
28
32
  "fix": "npm run-script fix:prettier && npm run-script fix:eslint",
29
33
  "fix:eslint": "eslint --fix .",
30
- "fix:prettier": "prettier . --write",
34
+ "fix:prettier": "prettier --write .",
31
35
  "lint": "npm run-script lint:prettier && npm run-script lint:eslint",
32
36
  "lint:eslint": "eslint .",
33
- "lint:prettier": "prettier . --check",
37
+ "lint:prettier": "prettier --check .",
34
38
  "prepack": "npm run-script build",
35
39
  "test": "jest",
36
40
  "test:coverage": "npm run-script test -- --coverage",
@@ -48,7 +52,7 @@
48
52
  "stylelint": "^16.0",
49
53
  "ts-jest": "^29.2",
50
54
  "typescript": "^5.0",
51
- "typescript-eslint": "^8.0"
55
+ "typescript-eslint": "^8.42"
52
56
  },
53
57
  "peerDependencies": {
54
58
  "stylelint": "^16.0"
@@ -28,9 +28,9 @@ export declare class ConfigVerifier {
28
28
  /**
29
29
  * Creates a new `ConfigVerifier` object.
30
30
  *
31
- * @param {string} configFile - The path to the Stylelint config file whose rules should be verified
31
+ * @param {string | undefined} configFile - The path to the Stylelint config file whose rules should be verified
32
32
  */
33
- constructor(configFile?: string);
33
+ constructor(configFile?: string | undefined);
34
34
  /**
35
35
  * Verifies a rule configuration.
36
36
  *