@anolilab/stylelint-config 6.0.4 → 6.0.6

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,47 @@
1
+ ## @anolilab/stylelint-config [6.0.6](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@6.0.5...@anolilab/stylelint-config@6.0.6) (2023-09-21)
2
+
3
+
4
+ ### Miscellaneous Chores
5
+
6
+ * update package versions and Node.js versions in actions ([ba1bd5f](https://github.com/anolilab/javascript-style-guide/commit/ba1bd5fbdb5a053b7b2929c189486399012d58bc))
7
+ * updated deps ([a287003](https://github.com/anolilab/javascript-style-guide/commit/a2870031901767b64c304f1c926173d66ffaf283))
8
+
9
+
10
+ ### Continuous Integration
11
+
12
+ * downgrade semantic-release to v21 and conventional-changelog-conventionalcommits to v6.1 ([30d8cd7](https://github.com/anolilab/javascript-style-guide/commit/30d8cd78dae211ed4566c7d23f5b85b696cbae13))
13
+
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * **browserslist-config-anolilab:** upgraded to 5.0.6
19
+ * **@anolilab/semantic-release-preset:** upgraded to 7.0.0
20
+
21
+ ## @anolilab/stylelint-config [6.0.5](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@6.0.4...@anolilab/stylelint-config@6.0.5) (2023-09-14)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * update dependencies ([72eabc7](https://github.com/anolilab/javascript-style-guide/commit/72eabc78c68be9778ac3e06ec4c2abb982da0636))
27
+
28
+
29
+ ### Styles
30
+
31
+ * cs fixes based on new rules ([b99c020](https://github.com/anolilab/javascript-style-guide/commit/b99c020b9f61f2517acd65b4d1a9f3d1f15812b1))
32
+
33
+
34
+ ### Miscellaneous Chores
35
+
36
+ * **deps:** update dependency vitest to ^0.34.4 ([#755](https://github.com/anolilab/javascript-style-guide/issues/755)) ([3246b55](https://github.com/anolilab/javascript-style-guide/commit/3246b55702eae25cf8d95ac95bd5f9b1323b51ff))
37
+
38
+
39
+
40
+ ### Dependencies
41
+
42
+ * **browserslist-config-anolilab:** upgraded to 5.0.5
43
+ * **@anolilab/semantic-release-preset:** upgraded to 6.0.6
44
+
1
45
  ## @anolilab/stylelint-config [6.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@6.0.3...@anolilab/stylelint-config@6.0.4) (2023-08-30)
2
46
 
3
47
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var r = require('browserslist-config-anolilab');
4
3
  var process = require('process');
4
+ var r = require('browserslist-config-anolilab');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/no-unsupported-browser-features.ts"],"names":["browserslist","env","config","no_unsupported_browser_features_default"],"mappings":"AAAA,OAAOA,MAAkB,+BACzB,OAAS,OAAAC,MAAW,UAEpB,IAAMC,EAAS,CACX,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACH,yCAA0C,CACtC,GACA,CACI,SAAUD,EAAI,WAAgB,aAAeD,EAAa,WAAaA,EAAa,eACpF,SAAU,SACd,CACJ,CACJ,CACJ,EAEOG,EAAQD","sourcesContent":["import browserslist from \"browserslist-config-anolilab\";\nimport { env } from \"node:process\";\n\nconst config = {\n plugins: [\"stylelint-no-unsupported-browser-features\"],\n rules: {\n \"plugin/no-unsupported-browser-features\": [\n true,\n {\n browsers: env[\"NODE_ENV\"] === \"production\" ? browserslist.production : browserslist.modernBrowsers,\n severity: \"warning\",\n },\n ],\n },\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../src/config/no-unsupported-browser-features.ts"],"names":["env","browserslist","config","no_unsupported_browser_features_default"],"mappings":"AAAA,OAAS,OAAAA,MAAW,UAEpB,OAAOC,MAAkB,+BAEzB,IAAMC,EAAS,CACX,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACH,yCAA0C,CACtC,GACA,CACI,SAAUF,EAAI,WAAgB,aAAeC,EAAa,WAAaA,EAAa,eACpF,SAAU,SACd,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { env } from \"node:process\";\n\nimport browserslist from \"browserslist-config-anolilab\";\n\nconst config = {\n plugins: [\"stylelint-no-unsupported-browser-features\"],\n rules: {\n \"plugin/no-unsupported-browser-features\": [\n true,\n {\n browsers: env[\"NODE_ENV\"] === \"production\" ? browserslist.production : browserslist.modernBrowsers,\n severity: \"warning\",\n },\n ],\n },\n};\n\nexport default config;\n"]}
@@ -1,5 +1,5 @@
1
- import r from 'browserslist-config-anolilab';
2
1
  import { env } from 'process';
2
+ import r from 'browserslist-config-anolilab';
3
3
 
4
4
  var e={plugins:["stylelint-no-unsupported-browser-features"],rules:{"plugin/no-unsupported-browser-features":[!0,{browsers:env.NODE_ENV==="production"?r.production:r.modernBrowsers,severity:"warning"}]}},n=e;
5
5
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/no-unsupported-browser-features.ts"],"names":["browserslist","env","config","no_unsupported_browser_features_default"],"mappings":"AAAA,OAAOA,MAAkB,+BACzB,OAAS,OAAAC,MAAW,UAEpB,IAAMC,EAAS,CACX,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACH,yCAA0C,CACtC,GACA,CACI,SAAUD,EAAI,WAAgB,aAAeD,EAAa,WAAaA,EAAa,eACpF,SAAU,SACd,CACJ,CACJ,CACJ,EAEOG,EAAQD","sourcesContent":["import browserslist from \"browserslist-config-anolilab\";\nimport { env } from \"node:process\";\n\nconst config = {\n plugins: [\"stylelint-no-unsupported-browser-features\"],\n rules: {\n \"plugin/no-unsupported-browser-features\": [\n true,\n {\n browsers: env[\"NODE_ENV\"] === \"production\" ? browserslist.production : browserslist.modernBrowsers,\n severity: \"warning\",\n },\n ],\n },\n};\n\nexport default config;\n"]}
1
+ {"version":3,"sources":["../../src/config/no-unsupported-browser-features.ts"],"names":["env","browserslist","config","no_unsupported_browser_features_default"],"mappings":"AAAA,OAAS,OAAAA,MAAW,UAEpB,OAAOC,MAAkB,+BAEzB,IAAMC,EAAS,CACX,QAAS,CAAC,2CAA2C,EACrD,MAAO,CACH,yCAA0C,CACtC,GACA,CACI,SAAUF,EAAI,WAAgB,aAAeC,EAAa,WAAaA,EAAa,eACpF,SAAU,SACd,CACJ,CACJ,CACJ,EAEOE,EAAQD","sourcesContent":["import { env } from \"node:process\";\n\nimport browserslist from \"browserslist-config-anolilab\";\n\nconst config = {\n plugins: [\"stylelint-no-unsupported-browser-features\"],\n rules: {\n \"plugin/no-unsupported-browser-features\": [\n true,\n {\n browsers: env[\"NODE_ENV\"] === \"production\" ? browserslist.production : browserslist.modernBrowsers,\n severity: \"warning\",\n },\n ],\n },\n};\n\nexport default config;\n"]}
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var packageJsonUtils = require('@anolilab/package-json-utils');
4
3
  var fs = require('fs');
5
4
  var path = require('path');
6
5
  var util = require('util');
6
+ var packageJsonUtils = require('@anolilab/package-json-utils');
7
7
 
8
8
  process.env.CI&&process.exit(0);var i=util.promisify(fs.writeFile);console.log("Configuring @anolilab/stylelint-config",packageJsonUtils.projectPath,`
9
9
  `);var n=".stylelintrc",f=async()=>{for(let c of [n,`${n}.js`,`${n}.cjs`,`${n}.json`,`${n}.yaml`,`${n}.yml`,"stylelint.config.js","stylelint.config.cjs"])if(fs.existsSync(path.join(packageJsonUtils.projectPath,c))){console.warn('\u26A0\uFE0F .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { "extends": ["@anolilab/stylelint-config"] }.');return}let t=path.join(packageJsonUtils.projectPath,".stylelintrc.js");await i(t,`${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","file","writeStylelintRc","filename","stylelintPath","writeStylelintIgnore","stylelintIgnorePath","content","error"],"mappings":"AAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,yCAA0CF,EAAa;AAAA,CAAI,EAEvE,IAAMM,EAAO,eAKPC,EAAmB,SAAY,CAEjC,QAAWC,IAAY,CAACF,EAAM,GAAGA,CAAI,MAAO,GAAGA,CAAI,OAAQ,GAAGA,CAAI,QAAS,GAAGA,CAAI,QAAS,GAAGA,CAAI,OAAQ,sBAAuB,sBAAsB,EAEnJ,GAAIL,EAAWE,EAAKH,EAAaQ,CAAQ,CAAC,EAAG,CACzC,QAAQ,KACJ,4LACJ,EAEA,MACJ,CAGJ,IAAMC,EAAgBN,EAAKH,EAAa,iBAAiB,EASzD,MAAMK,EAAeI,EARL,GAAGV,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,OAAO,CACxD,EAKMW,EAAuB,SAAY,CACrC,IAAMC,EAAsBR,EAAKH,EAAa,kBAAkB,EAC1DY,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUZX,EAAWU,CAAmB,GAIlC,MAAMN,EAAeM,EAAqBC,EAAS,OAAO,CAC9D,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAiB,EACvB,MAAMG,EAAqB,EAE3B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASG,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/stylelint-config\", projectPath, \"\\n\");\n\nconst file = \".stylelintrc\";\n\n/**\n * Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintRc = async () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [file, `${file}.js`, `${file}.cjs`, `${file}.json`, `${file}.yaml`, `${file}.yml`, `stylelint.config.js`, `stylelint.config.cjs`]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(\n '⚠️ .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.',\n );\n\n return;\n }\n }\n\n const stylelintPath = join(projectPath, \".stylelintrc.js\");\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n \"extends\": [\n \"@anolilab/stylelint-config\",\n ]\n};\n\n`;\n\n await writeFileAsync(stylelintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .stylelintignore if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintIgnore = async () => {\n const stylelintIgnorePath = join(projectPath, \".stylelintignore\");\n const content = `package.json\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\nbuild/**\nnode_modules/**\n.next/**\n\n`;\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(stylelintIgnorePath)) {\n return;\n }\n\n await writeFileAsync(stylelintIgnorePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeStylelintRc();\n await writeStylelintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","file","writeStylelintRc","filename","stylelintPath","writeStylelintIgnore","stylelintIgnorePath","content","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,yCAA0CI,EAAa;AAAA,CAAI,EAEvE,IAAME,EAAO,eAKPC,EAAmB,SAAY,CAEjC,QAAWC,IAAY,CAACF,EAAM,GAAGA,CAAI,MAAO,GAAGA,CAAI,OAAQ,GAAGA,CAAI,QAAS,GAAGA,CAAI,QAAS,GAAGA,CAAI,OAAQ,sBAAuB,sBAAsB,EAEnJ,GAAIP,EAAWE,EAAKG,EAAaI,CAAQ,CAAC,EAAG,CACzC,QAAQ,KACJ,4LACJ,EAEA,MACJ,CAGJ,IAAMC,EAAgBR,EAAKG,EAAa,iBAAiB,EASzD,MAAMC,EAAeI,EARL,GAAGN,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,OAAO,CACxD,EAKMO,EAAuB,SAAY,CACrC,IAAMC,EAAsBV,EAAKG,EAAa,kBAAkB,EAC1DQ,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUZb,EAAWY,CAAmB,GAIlC,MAAMN,EAAeM,EAAqBC,EAAS,OAAO,CAC9D,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAiB,EACvB,MAAMG,EAAqB,EAE3B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASG,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/stylelint-config\", projectPath, \"\\n\");\n\nconst file = \".stylelintrc\";\n\n/**\n * Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintRc = async () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [file, `${file}.js`, `${file}.cjs`, `${file}.json`, `${file}.yaml`, `${file}.yml`, `stylelint.config.js`, `stylelint.config.cjs`]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(\n '⚠️ .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.',\n );\n\n return;\n }\n }\n\n const stylelintPath = join(projectPath, \".stylelintrc.js\");\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n \"extends\": [\n \"@anolilab/stylelint-config\",\n ]\n};\n\n`;\n\n await writeFileAsync(stylelintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .stylelintignore if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintIgnore = async () => {\n const stylelintIgnorePath = join(projectPath, \".stylelintignore\");\n const content = `package.json\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\nbuild/**\nnode_modules/**\n.next/**\n\n`;\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(stylelintIgnorePath)) {\n return;\n }\n\n await writeFileAsync(stylelintIgnorePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeStylelintRc();\n await writeStylelintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
@@ -1,7 +1,7 @@
1
- import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
2
1
  import { writeFile, existsSync } from 'fs';
3
2
  import { join } from 'path';
4
3
  import { promisify } from 'util';
4
+ import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
5
5
 
6
6
  process.env.CI&&process.exit(0);var i=promisify(writeFile);console.log("Configuring @anolilab/stylelint-config",projectPath,`
7
7
  `);var n=".stylelintrc",f=async()=>{for(let c of [n,`${n}.js`,`${n}.cjs`,`${n}.json`,`${n}.yaml`,`${n}.yml`,"stylelint.config.js","stylelint.config.cjs"])if(existsSync(join(projectPath,c))){console.warn('\u26A0\uFE0F .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { "extends": ["@anolilab/stylelint-config"] }.');return}let t=join(projectPath,".stylelintrc.js");await i(t,`${packageIsTypeModule?"export default":"module.exports ="} {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","file","writeStylelintRc","filename","stylelintPath","writeStylelintIgnore","stylelintIgnorePath","content","error"],"mappings":"AAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAEtB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,yCAA0CF,EAAa;AAAA,CAAI,EAEvE,IAAMM,EAAO,eAKPC,EAAmB,SAAY,CAEjC,QAAWC,IAAY,CAACF,EAAM,GAAGA,CAAI,MAAO,GAAGA,CAAI,OAAQ,GAAGA,CAAI,QAAS,GAAGA,CAAI,QAAS,GAAGA,CAAI,OAAQ,sBAAuB,sBAAsB,EAEnJ,GAAIL,EAAWE,EAAKH,EAAaQ,CAAQ,CAAC,EAAG,CACzC,QAAQ,KACJ,4LACJ,EAEA,MACJ,CAGJ,IAAMC,EAAgBN,EAAKH,EAAa,iBAAiB,EASzD,MAAMK,EAAeI,EARL,GAAGV,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,OAAO,CACxD,EAKMW,EAAuB,SAAY,CACrC,IAAMC,EAAsBR,EAAKH,EAAa,kBAAkB,EAC1DY,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUZX,EAAWU,CAAmB,GAIlC,MAAMN,EAAeM,EAAqBC,EAAS,OAAO,CAC9D,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAiB,EACvB,MAAMG,EAAqB,EAE3B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASG,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/stylelint-config\", projectPath, \"\\n\");\n\nconst file = \".stylelintrc\";\n\n/**\n * Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintRc = async () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [file, `${file}.js`, `${file}.cjs`, `${file}.json`, `${file}.yaml`, `${file}.yml`, `stylelint.config.js`, `stylelint.config.cjs`]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(\n '⚠️ .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.',\n );\n\n return;\n }\n }\n\n const stylelintPath = join(projectPath, \".stylelintrc.js\");\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n \"extends\": [\n \"@anolilab/stylelint-config\",\n ]\n};\n\n`;\n\n await writeFileAsync(stylelintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .stylelintignore if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintIgnore = async () => {\n const stylelintIgnorePath = join(projectPath, \".stylelintignore\");\n const content = `package.json\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\nbuild/**\nnode_modules/**\n.next/**\n\n`;\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(stylelintIgnorePath)) {\n return;\n }\n\n await writeFileAsync(stylelintIgnorePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeStylelintRc();\n await writeStylelintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","promisify","packageIsTypeModule","projectPath","writeFileAsync","file","writeStylelintRc","filename","stylelintPath","writeStylelintIgnore","stylelintIgnorePath","content","error"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAE7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,yCAA0CI,EAAa;AAAA,CAAI,EAEvE,IAAME,EAAO,eAKPC,EAAmB,SAAY,CAEjC,QAAWC,IAAY,CAACF,EAAM,GAAGA,CAAI,MAAO,GAAGA,CAAI,OAAQ,GAAGA,CAAI,QAAS,GAAGA,CAAI,QAAS,GAAGA,CAAI,OAAQ,sBAAuB,sBAAsB,EAEnJ,GAAIP,EAAWE,EAAKG,EAAaI,CAAQ,CAAC,EAAG,CACzC,QAAQ,KACJ,4LACJ,EAEA,MACJ,CAGJ,IAAMC,EAAgBR,EAAKG,EAAa,iBAAiB,EASzD,MAAMC,EAAeI,EARL,GAAGN,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,OAAO,CACxD,EAKMO,EAAuB,SAAY,CACrC,IAAMC,EAAsBV,EAAKG,EAAa,kBAAkB,EAC1DQ,EAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUZb,EAAWY,CAAmB,GAIlC,MAAMN,EAAeM,EAAqBC,EAAS,OAAO,CAC9D,GAGC,SAAY,CACT,GAAI,CACA,MAAML,EAAiB,EACvB,MAAMG,EAAqB,EAE3B,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASG,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/stylelint-config\", projectPath, \"\\n\");\n\nconst file = \".stylelintrc\";\n\n/**\n * Writes .stylelintrc.cjs if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintRc = async () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [file, `${file}.js`, `${file}.cjs`, `${file}.json`, `${file}.yaml`, `${file}.yml`, `stylelint.config.js`, `stylelint.config.cjs`]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(\n '⚠️ .stylelintrc.js already exists; Make sure that it includes the following for @anolilab/stylelint-config to work as it should: { \"extends\": [\"@anolilab/stylelint-config\"] }.',\n );\n\n return;\n }\n }\n\n const stylelintPath = join(projectPath, \".stylelintrc.js\");\n const content = `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n \"extends\": [\n \"@anolilab/stylelint-config\",\n ]\n};\n\n`;\n\n await writeFileAsync(stylelintPath, content, \"utf-8\");\n};\n\n/**\n * Writes .stylelintignore if it doesn't exist. Warns if it exists.\n */\nconst writeStylelintIgnore = async () => {\n const stylelintIgnorePath = join(projectPath, \".stylelintignore\");\n const content = `package.json\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\nbuild/**\nnode_modules/**\n.next/**\n\n`;\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(stylelintIgnorePath)) {\n return;\n }\n\n await writeFileAsync(stylelintIgnorePath, content, \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n await writeStylelintRc();\n await writeStylelintIgnore();\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/stylelint-config",
3
- "version": "6.0.4",
3
+ "version": "6.0.6",
4
4
  "description": "Stylelint shareable config for the Anolilab stylesheet guide.",
5
5
  "keywords": [
6
6
  "css",
@@ -106,7 +106,7 @@
106
106
  "dependencies": {
107
107
  "@anolilab/package-json-utils": "3.0.5",
108
108
  "@ronilaukkarinen/stylelint-a11y": "^1.2.7",
109
- "browserslist-config-anolilab": "5.0.4",
109
+ "browserslist-config-anolilab": "5.0.6",
110
110
  "stylelint-config-clean-order": "^5.2.0",
111
111
  "stylelint-config-standard": "^34.0.0",
112
112
  "stylelint-declaration-block-no-ignored-properties": "^2.7.0",
@@ -115,15 +115,15 @@
115
115
  "stylelint-require-units": "^1.0.2",
116
116
  "stylelint-selector-no-empty": "^1.0.9",
117
117
  "tsup": "^7.2.0",
118
- "vitest": "^0.34.3"
118
+ "vitest": "^0.34.5"
119
119
  },
120
120
  "devDependencies": {
121
- "@anolilab/semantic-release-preset": "6.0.5",
122
- "postcss": "^8.4.29",
121
+ "@anolilab/semantic-release-preset": "7.0.0",
122
+ "postcss": "^8.4.30",
123
123
  "rimraf": "^5.0.1",
124
- "semantic-release": "^21.1.1",
124
+ "semantic-release": "^21.1.2",
125
125
  "stylelint": "15.10.3",
126
- "vitest": "^0.34.3"
126
+ "vitest": "^0.34.5"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "postcss": "^8.4.18",