@cichol/stylelint-config 5.4.5 → 6.0.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.
@@ -1,5 +1,5 @@
1
1
  // Local helpers.
2
- import _ from './generator.js'
2
+ import _ from '#helpers/generator'
3
3
 
4
4
  // Base fragments.
5
5
  export const ITSELF = null
@@ -1,5 +1,6 @@
1
1
  /**
2
- * @param {(string | (string | (string | null)[] | null)[])[]} fragments
2
+ * @template {(string | (string | (string | null)[] | null)[])[]} const T
3
+ * @param {T} fragments
3
4
  * @returns {string[]}
4
5
  */
5
6
  export default function _(...fragments) {
package/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as Stylelint from 'stylelint'
2
2
 
3
- export const PROPERTIES_ORDER: readonly string[]
3
+ declare const PROPERTIES_LIST: readonly string[]
4
+ declare const config: Stylelint.Config
4
5
 
5
- export default {} as Stylelint.Config
6
+ export { PROPERTIES_LIST, config as default }
package/index.js CHANGED
@@ -1,5 +1,22 @@
1
1
  // Pre-sorted CSS properties list.
2
- import PROPERTIES_LIST from './properties/index.js'
2
+ export const PROPERTIES_LIST = await Promise.all([
3
+ 'composes',
4
+ 'all',
5
+ import('#properties/01-interaction'),
6
+ import('#properties/02-positioning'),
7
+ import('#properties/03-layout'),
8
+ import('#properties/04-box-model'),
9
+ import('#properties/05-typography'),
10
+ import('#properties/06-appearance'),
11
+ import('#properties/07-svg-relevant'),
12
+ import('#properties/08-transition'),
13
+ ].map(fragments => (
14
+ typeof fragments === 'string'
15
+ ? Promise.resolve(fragments)
16
+ : fragments.then(({ default: properties }) => properties)
17
+ ))).then(properties => (
18
+ properties.flat()
19
+ ))
3
20
 
4
21
  /** @type {import('stylelint').Config} */
5
22
  export default {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cichol/stylelint-config",
3
- "version": "5.4.5",
3
+ "version": "6.0.0",
4
4
  "description": "An universal Stylelint configuration for personal projects.",
5
5
  "homepage": "https://github.com/morrighan/packages",
6
6
  "bugs": {
@@ -13,8 +13,16 @@
13
13
  "url": "https://www.cichol.com/"
14
14
  },
15
15
  "type": "module",
16
- "main": "index.js",
17
- "types": "index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "default": "./index.js",
19
+ "types": "./index.d.ts"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "imports": {
24
+ "#*": "./*.js"
25
+ },
18
26
  "repository": {
19
27
  "type": "git",
20
28
  "url": "git+https://github.com/morrighan/packages.git",
@@ -25,11 +33,11 @@
25
33
  "stylelint-order": "^8.1.1"
26
34
  },
27
35
  "peerDependencies": {
28
- "stylelint": "^17.6.0"
36
+ "stylelint": "^17.8.0"
29
37
  },
30
38
  "engines": {
31
- "node": "^22.21.1 || ^24.11.1",
32
- "npm": "^11.6.4"
39
+ "node": "^24.15.0",
40
+ "npm": "^11.12.1"
33
41
  },
34
42
  "publishConfig": {
35
43
  "registry": "https://registry.npmjs.org/",
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF, DIRECTIONAL } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF, DIRECTIONAL } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('pointer-events'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF, LOGICAL, TOP_RIGHT_BOTTOM_LEFT } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF, LOGICAL, TOP_RIGHT_BOTTOM_LEFT } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('isolation'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF, AXIAL } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF, AXIAL } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('container', [ ITSELF, 'name', 'type' ]),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF, RANGE_BOUNDABLE, DIRECTIONAL, DIAGONAL } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF, RANGE_BOUNDABLE, DIRECTIONAL, DIAGONAL } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('box-sizing'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('writing-mode'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF, AXIAL } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF, AXIAL } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('appearance'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('alignment-baseline'),
@@ -1,6 +1,6 @@
1
1
  // Local helpers.
2
- import _ from '../helpers/generator.js'
3
- import { ITSELF } from '../helpers/fragments.js'
2
+ import _ from '#helpers/generator'
3
+ import { ITSELF } from '#helpers/fragments'
4
4
 
5
5
  export default _([
6
6
  _('transition', [ ITSELF, 'delay', 'timing-function', 'duration', 'property' ]),
@@ -1,18 +0,0 @@
1
- export default await Promise.all([
2
- 'composes',
3
- 'all',
4
- import('./01-interaction.js'),
5
- import('./02-positioning.js'),
6
- import('./03-layout.js'),
7
- import('./04-box-model.js'),
8
- import('./05-typography.js'),
9
- import('./06-appearance.js'),
10
- import('./07-svg-relevant.js'),
11
- import('./08-transition.js'),
12
- ].map(fragments => (
13
- typeof fragments === 'string'
14
- ? Promise.resolve(fragments)
15
- : fragments.then(({ default: properties }) => properties)
16
- ))).then(properties => (
17
- properties.flat()
18
- ))