@soujvnunes/stylelint-config 0.1.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/dist/index.d.ts +10 -0
- package/dist/index.js +45 -0
- package/package.json +41 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Config } from 'stylelint';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared Stylelint config. Pass any Stylelint option to override the base; `rules` merge onto the
|
|
5
|
+
* base rules while other keys replace. The common override is `ignoreFiles` (e.g. a Tailwind theme
|
|
6
|
+
* file whose generated custom properties trip the standard rules).
|
|
7
|
+
*/
|
|
8
|
+
declare const createConfig: (overrides?: Config) => Config;
|
|
9
|
+
|
|
10
|
+
export { createConfig };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// index.ts
|
|
2
|
+
import { createRequire } from "module";
|
|
3
|
+
var require2 = createRequire(import.meta.url);
|
|
4
|
+
var base = {
|
|
5
|
+
extends: [require2.resolve("stylelint-config-standard")],
|
|
6
|
+
rules: {
|
|
7
|
+
// Tailwind v4 at-rules aren't in stylelint's known list — allow them instead of erroring.
|
|
8
|
+
"at-rule-no-unknown": [
|
|
9
|
+
true,
|
|
10
|
+
{
|
|
11
|
+
ignoreAtRules: [
|
|
12
|
+
"tailwind",
|
|
13
|
+
"apply",
|
|
14
|
+
"layer",
|
|
15
|
+
"config",
|
|
16
|
+
"plugin",
|
|
17
|
+
"import",
|
|
18
|
+
"theme",
|
|
19
|
+
"source",
|
|
20
|
+
"utility",
|
|
21
|
+
"variant",
|
|
22
|
+
"custom-variant"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"import-notation": "string",
|
|
27
|
+
"no-descending-specificity": null,
|
|
28
|
+
"declaration-block-no-redundant-longhand-properties": null,
|
|
29
|
+
"shorthand-property-no-redundant-values": true,
|
|
30
|
+
"color-function-notation": "modern",
|
|
31
|
+
"alpha-value-notation": "percentage",
|
|
32
|
+
"font-family-name-quotes": "always-where-recommended",
|
|
33
|
+
"selector-class-pattern": null,
|
|
34
|
+
"keyframes-name-pattern": null,
|
|
35
|
+
"custom-property-pattern": null
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var createConfig = (overrides = {}) => ({
|
|
39
|
+
...base,
|
|
40
|
+
...overrides,
|
|
41
|
+
rules: { ...base.rules, ...overrides.rules }
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
createConfig
|
|
45
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@soujvnunes/stylelint-config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared Stylelint config factory (standard + Tailwind v4 at-rules).",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "soujvnunes",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/soujvnunes/packages.git",
|
|
10
|
+
"directory": "stylelint-config"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"stylelint-config-standard": "^40.0.0"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"stylelint": ">=16"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.19.39",
|
|
32
|
+
"stylelint": "^17.6.0"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup index.ts --format esm --dts --clean",
|
|
39
|
+
"typecheck": "tsc --noEmit"
|
|
40
|
+
}
|
|
41
|
+
}
|