@anolilab/stylelint-config 3.0.2 → 3.0.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ### @anolilab/stylelint-config [3.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.2...@anolilab/stylelint-config@3.0.3) (2022-05-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update all deps of the package and fixes found code style issues ([2776ecd](https://github.com/anolilab/javascript-style-guide/commit/2776ecd44d35f1d317abf367e69fef24dbd00335))
7
+
8
+
9
+
10
+ ### Dependencies
11
+
12
+ * **browserslist-config-anolilab:** upgraded to 3.0.3
13
+
1
14
  ### @anolilab/stylelint-config [3.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@3.0.1...@anolilab/stylelint-config@3.0.2) (2022-05-06)
2
15
 
3
16
 
package/index.cjs CHANGED
@@ -9,7 +9,7 @@ const rules = [
9
9
  ];
10
10
 
11
11
  module.exports = {
12
- extends: rules.map(require.resolve),
12
+ extends: rules.map((element) => require.resolve(element)),
13
13
  rules: {
14
14
  indentation: 4,
15
15
  },
@@ -1,25 +1,28 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { existsSync, writeFile } from "node:fs";
4
+ import { join, resolve } from "node:path";
5
+ import { promisify } from "node:util";
6
+
7
+ // eslint-disable-next-line no-undef
3
8
  if (process.env.CI) {
9
+ // eslint-disable-next-line no-undef
4
10
  process.exit(0);
5
11
  }
6
12
 
7
- import { writeFile, existsSync } from 'fs';
8
- import { resolve, join } from 'path';
9
- import { promisify } from 'util';
10
-
11
13
  const writeFileAsync = promisify(writeFile);
12
14
 
13
15
  // get the path to the host project.
14
- const projectPath = resolve(process.cwd(), '..', '..', '..');
16
+ // eslint-disable-next-line no-undef
17
+ const projectPath = resolve(process.cwd(), "..", "..", "..");
15
18
 
16
- console.log('Configuring @anolilab/stylelint-config', projectPath, '\n');
19
+ console.log("Configuring @anolilab/stylelint-config", projectPath, "\n");
17
20
 
18
21
  /**
19
22
  * Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.
20
23
  */
21
24
  const writeStylelintRc = () => {
22
- const eslintPath = join(projectPath, '.stylelintrc.cjs');
25
+ const eslintPath = join(projectPath, ".stylelintrc.cjs");
23
26
  const content = `module.exports = {
24
27
  "extends": [
25
28
  "@anolilab/stylelint-config",
@@ -28,19 +31,19 @@ const writeStylelintRc = () => {
28
31
  `;
29
32
 
30
33
  if (existsSync(eslintPath)) {
31
- console.warn(`⚠️ .stylelintrc.cjs already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { "extends": ["@anolilab/stylelint-config"] }.`);
34
+ console.warn("⚠️ .stylelintrc.cjs already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.");
32
35
 
33
36
  return Promise.resolve();
34
37
  }
35
38
 
36
- return writeFileAsync(eslintPath, content, 'utf-8');
39
+ return writeFileAsync(eslintPath, content, "utf-8");
37
40
  };
38
41
 
39
42
  /**
40
43
  * Writes .stylelintignore if it doesn't exist. Warns if it exists.
41
44
  */
42
45
  const writeStylelintIgnore = () => {
43
- const eslintPath = join(projectPath, '.stylelintignore');
46
+ const eslintPath = join(projectPath, ".stylelintignore");
44
47
  const content = `package.json
45
48
  package-lock.json
46
49
  yarn.lock
@@ -63,11 +66,13 @@ node_modules/**
63
66
 
64
67
  console.log("😎 Everything went well, have fun!");
65
68
 
69
+ // eslint-disable-next-line no-undef
66
70
  process.exit(0);
67
- } catch (err) {
71
+ } catch (error) {
68
72
  console.log("😬 something went wrong:");
69
- console.error(err.message);
73
+ console.error(error.message);
70
74
 
75
+ // eslint-disable-next-line no-undef
71
76
  process.exit(1);
72
77
  }
73
78
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/stylelint-config",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Stylelint shareable config for the Anolilab stylesheet guide.",
5
5
  "keywords": [
6
6
  "css",
@@ -47,7 +47,7 @@
47
47
  "postinstall": "node lib/postinstall.js"
48
48
  },
49
49
  "dependencies": {
50
- "browserslist-config-anolilab": "3.0.2",
50
+ "browserslist-config-anolilab": "3.0.3",
51
51
  "stylelint-a11y": "^1.2.3",
52
52
  "stylelint-config-rational-order": "^0.1.2",
53
53
  "stylelint-config-standard": "^25.0.0",
@@ -59,11 +59,11 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "lodash": "^4.17.21",
62
- "postcss": "^8.4.12",
62
+ "postcss": "^8.4.13",
63
63
  "stylelint": "14.8.2"
64
64
  },
65
65
  "peerDependencies": {
66
- "postcss": "^8.4.12",
66
+ "postcss": "^8.4.13",
67
67
  "stylelint": "^14.0.0"
68
68
  },
69
69
  "engines": {
@@ -14,7 +14,7 @@ module.exports = {
14
14
  // Disabled to avoid cases where semantic or
15
15
  // pragmatic grouping is more practical
16
16
  // https://stylelint.io/user-guide/rules/no-descending-specificity
17
- "no-descending-specificity": null,
17
+ "no-descending-specificity": undefined,
18
18
 
19
19
  // Enabled to improve consistency and readability.
20
20
  // https://stylelint.io/user-guide/rules/at-rule-empty-line-before
@@ -6,7 +6,7 @@ module.exports = {
6
6
  "plugin/no-unsupported-browser-features": [
7
7
  true,
8
8
  {
9
- browsers: browserslist["production"],
9
+ browsers: browserslist.production,
10
10
  },
11
11
  ],
12
12
  },