@anolilab/stylelint-config 5.1.0 → 5.1.1
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 +15 -0
- package/dist/postinstall.js +3 -3
- package/dist/postinstall.js.map +1 -1
- package/dist/postinstall.mjs +3 -3
- package/dist/postinstall.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## @anolilab/stylelint-config [5.1.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@5.1.0...@anolilab/stylelint-config@5.1.1) (2023-07-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Refactor async functions to use async/await and update tsconfig.json ([2a59d6e](https://github.com/anolilab/javascript-style-guide/commit/2a59d6e0d06a5a37c92b222961acbe9f17578f26))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
* **@anolilab/package-json-utils:** upgraded to 2.0.1
|
|
13
|
+
* **browserslist-config-anolilab:** upgraded to 4.2.1
|
|
14
|
+
* **@anolilab/semantic-release-preset:** upgraded to 5.0.1
|
|
15
|
+
|
|
1
16
|
## @anolilab/stylelint-config [5.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/stylelint-config@5.0.5...@anolilab/stylelint-config@5.1.0) (2023-07-03)
|
|
2
17
|
|
|
3
18
|
|
package/dist/postinstall.js
CHANGED
|
@@ -6,13 +6,13 @@ var path = require('path');
|
|
|
6
6
|
var util = require('util');
|
|
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
|
-
`);var
|
|
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 ="} {
|
|
10
10
|
"extends": [
|
|
11
11
|
"@anolilab/stylelint-config",
|
|
12
12
|
]
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
`,"utf-8")},g=()=>{let t=path.join(packageJsonUtils.projectPath,".stylelintignore"),l=`package.json
|
|
15
|
+
`,"utf-8");},g=async()=>{let t=path.join(packageJsonUtils.projectPath,".stylelintignore"),l=`package.json
|
|
16
16
|
package-lock.json
|
|
17
17
|
yarn.lock
|
|
18
18
|
pnpm-lock.yaml
|
|
@@ -20,6 +20,6 @@ build/**
|
|
|
20
20
|
node_modules/**
|
|
21
21
|
.next/**
|
|
22
22
|
|
|
23
|
-
`;
|
|
23
|
+
`;fs.existsSync(t)||await i(t,l,"utf-8");};(async()=>{try{await f(),await g(),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();
|
|
24
24
|
//# sourceMappingURL=out.js.map
|
|
25
25
|
//# sourceMappingURL=postinstall.js.map
|
package/dist/postinstall.js.map
CHANGED
|
@@ -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,
|
|
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"]}
|
package/dist/postinstall.mjs
CHANGED
|
@@ -4,13 +4,13 @@ import { join } from 'path';
|
|
|
4
4
|
import { promisify } from 'util';
|
|
5
5
|
|
|
6
6
|
process.env.CI&&process.exit(0);var i=promisify(writeFile);console.log("Configuring @anolilab/stylelint-config",projectPath,`
|
|
7
|
-
`);var
|
|
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 ="} {
|
|
8
8
|
"extends": [
|
|
9
9
|
"@anolilab/stylelint-config",
|
|
10
10
|
]
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
`,"utf-8")},g=()=>{let t=join(projectPath,".stylelintignore"),l=`package.json
|
|
13
|
+
`,"utf-8");},g=async()=>{let t=join(projectPath,".stylelintignore"),l=`package.json
|
|
14
14
|
package-lock.json
|
|
15
15
|
yarn.lock
|
|
16
16
|
pnpm-lock.yaml
|
|
@@ -18,6 +18,6 @@ build/**
|
|
|
18
18
|
node_modules/**
|
|
19
19
|
.next/**
|
|
20
20
|
|
|
21
|
-
`;
|
|
21
|
+
`;existsSync(t)||await i(t,l,"utf-8");};(async()=>{try{await f(),await g(),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(t){console.log("\u{1F62C} something went wrong:"),console.error(t),process.exit(1);}})();
|
|
22
22
|
//# sourceMappingURL=out.js.map
|
|
23
23
|
//# sourceMappingURL=postinstall.mjs.map
|
package/dist/postinstall.mjs.map
CHANGED
|
@@ -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,
|
|
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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/stylelint-config",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "Stylelint shareable config for the Anolilab stylesheet guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -103,9 +103,9 @@
|
|
|
103
103
|
"test:coverage": "vitest --config ./vitest.config.ts --run --coverage"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@anolilab/package-json-utils": "2.0.
|
|
106
|
+
"@anolilab/package-json-utils": "2.0.1",
|
|
107
107
|
"@ronilaukkarinen/stylelint-a11y": "^1.2.7",
|
|
108
|
-
"browserslist-config-anolilab": "4.2.
|
|
108
|
+
"browserslist-config-anolilab": "4.2.1",
|
|
109
109
|
"stylelint-config-clean-order": "^5.0.1",
|
|
110
110
|
"stylelint-config-standard": "^33.0.0",
|
|
111
111
|
"stylelint-declaration-block-no-ignored-properties": "^2.7.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"vitest": "^0.32.4"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@anolilab/semantic-release-preset": "5.0.
|
|
120
|
+
"@anolilab/semantic-release-preset": "5.0.1",
|
|
121
121
|
"postcss": "^8.4.24",
|
|
122
122
|
"rimraf": "^5.0.1",
|
|
123
123
|
"semantic-release": "^21.0.6",
|