├── .editorconfig
├── .eslintcache
├── .github
└── workflows
│ └── test.yml
├── .gitignore
├── .rollup.mjs
├── .tape.js
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── index.cjs
├── index.cjs.map
├── index.js
├── index.mjs
├── index.mjs.map
├── lib
├── maps.js
├── messages.js
├── rule-name.js
├── validate.js
└── walk.js
├── package-lock.json
└── package.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | indent_style = tab
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
10 | [*.md]
11 | trim_trailing_whitespace = false
12 |
13 | [*.{json,md,yml}]
14 | indent_size = 2
15 | indent_style = space
16 |
--------------------------------------------------------------------------------
/.eslintcache:
--------------------------------------------------------------------------------
1 | [{"/Users/romainmenke/projects/stylelint-use-logical/index.js":"1","/Users/romainmenke/projects/stylelint-use-logical/lib/maps.js":"2","/Users/romainmenke/projects/stylelint-use-logical/lib/messages.js":"3","/Users/romainmenke/projects/stylelint-use-logical/lib/rule-name.js":"4","/Users/romainmenke/projects/stylelint-use-logical/lib/validate.js":"5","/Users/romainmenke/projects/stylelint-use-logical/lib/walk.js":"6"},{"size":5861,"mtime":1709461857333,"results":"7","hashOfConfig":"8"},{"size":3248,"mtime":1709460306105,"results":"9","hashOfConfig":"8"},{"size":429,"mtime":1709460306106,"results":"10","hashOfConfig":"8"},{"size":39,"mtime":1709460306106,"results":"11","hashOfConfig":"8"},{"size":462,"mtime":1709460306106,"results":"12","hashOfConfig":"8"},{"size":471,"mtime":1709460306106,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"gd8gf4",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/romainmenke/projects/stylelint-use-logical/index.js",[],[],"/Users/romainmenke/projects/stylelint-use-logical/lib/maps.js",[],[],"/Users/romainmenke/projects/stylelint-use-logical/lib/messages.js",[],[],"/Users/romainmenke/projects/stylelint-use-logical/lib/rule-name.js",[],[],"/Users/romainmenke/projects/stylelint-use-logical/lib/validate.js",[],[],"/Users/romainmenke/projects/stylelint-use-logical/lib/walk.js",[],[]]
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test
2 | on:
3 | push:
4 |
5 | jobs:
6 | test:
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v4
10 | - uses: actions/setup-node@v4
11 | with:
12 | node-version: 'lts/*'
13 |
14 | - run: npm ci
15 | - run: npm run build
16 | - run: npm run test
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log*
3 |
4 |
--------------------------------------------------------------------------------
/.rollup.mjs:
--------------------------------------------------------------------------------
1 | export default {
2 | input: 'index.js',
3 | output: [
4 | { file: 'index.cjs', format: 'cjs', sourcemap: true },
5 | { file: 'index.mjs', format: 'es', sourcemap: true }
6 | ]
7 | };
8 |
--------------------------------------------------------------------------------
/.tape.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | 'csstools/use-logical': [{
3 | source: 'body { left: 0 }',
4 | args: 'always',
5 | warnings: 1,
6 | }, {
7 | source: 'body { left: 0 }',
8 | args: [ 'always', { except: 'left' }],
9 | warnings: 0,
10 | }, {
11 | source: 'body { top: -4px; left: 0; }',
12 | args: 'always',
13 | warnings: 2,
14 | }, {
15 | source: 'body { top: -4px; left: 0; }',
16 | args: ['always', { except: 'top' }],
17 | warnings: 1,
18 | }, {
19 | source: 'body { top: -4px; left: 0; }',
20 | args: ['always', { except: 'left' }],
21 | warnings: 1,
22 | }, {
23 | source: 'body { top: -4px; left: 0; }',
24 | args: ['always', { except: ['top', 'left'] }],
25 | warnings: 0,
26 | }, {
27 | source: 'body { margin-top: 0.5rem; margin-bottom: 0.5rem; }',
28 | args: ['always', { except: ['margin-top'] }],
29 | warnings: 1,
30 | }, {
31 | source: 'body { margin-top: 0.5rem; margin-bottom: 0.5rem; }',
32 | args: ['always', { except: ['margin-top', 'margin-bottom'] }],
33 | warnings: 0,
34 | }, {
35 | source: 'body { top: 0; left: 0 }',
36 | args: 'always',
37 | warnings: 2
38 | }, {
39 | source: 'body { border-left: 0; left: 0 }',
40 | args: 'always',
41 | warnings: 2
42 | }, {
43 | source: 'body { top: 0; margin-left: 0 }',
44 | args: 'always',
45 | warnings: 2
46 | }, {
47 | source: 'body { top: 0; margin-left: 0 }',
48 | args: [ 'always', { except: [ 'top', /^margin/ ] }],
49 | warnings: 0
50 | }, {
51 | source: 'body { padding-left: 0; margin-right: 0 }',
52 | args: 'always',
53 | warnings: 2,
54 | }, {
55 | source: 'body { clear: left }',
56 | args: 'always',
57 | warnings: 1,
58 | }, {
59 | source: 'body { float: left }',
60 | args: 'always',
61 | warnings: 1,
62 | }, {
63 | source: 'body { text-align: left }',
64 | args: 'always',
65 | warnings: 1,
66 | }, {
67 | source: 'body:dir(ltr) { top: 0; margin-left: 0; float: left }',
68 | args: 'always',
69 | warnings: 0
70 | }, {
71 | source: 'body { left: 0 }',
72 | expect: 'body { inset-inline-start: 0 }',
73 | args: 'always'
74 | }, {
75 | source: 'body { left: 0; right: 0 }',
76 | expect: 'body { inset-inline: 0 }',
77 | args: 'always'
78 | }, {
79 | source: 'body { top: 0; right: 0; bottom: 0; left: 0 }',
80 | expect: 'body { inset: 0 }',
81 | args: 'always'
82 | }, {
83 | source: 'body { margin-top: 0; margin-right: 0; margin-left: 0 }',
84 | expect: 'body { margin-block-start: 0; margin-inline: 0 }',
85 | args: 'always'
86 | }, {
87 | source: 'body { margin-left: 0; }',
88 | expect: 'body { margin-inline-start: 0; }',
89 | args: 'always'
90 | }, {
91 | source: 'body { clear: left }',
92 | expect: 'body { clear: inline-start }',
93 | args: 'always'
94 | }, {
95 | source: 'body { float: right }',
96 | expect: 'body { float: inline-end }',
97 | args: 'always'
98 | }, {
99 | source: 'body { text-align: left }',
100 | expect: 'body { text-align: start }',
101 | args: 'always'
102 | }, {
103 | source: 'body:dir(ltr) { text-align: left }',
104 | expect: 'body:dir(ltr) { text-align: left }',
105 | args: [ 'always' ]
106 | }, {
107 | source: 'body { float: left; text-align: left }',
108 | expect: 'body { float: left; text-align: start }',
109 | args: [ 'always', {
110 | except: [ /^float$/i ]
111 | }]
112 | }, {
113 | source: 'body { width: 0; }',
114 | expect: 'body { inline-size: 0; }',
115 | args: 'always'
116 | }, {
117 | source: 'body { min-width: 0; }',
118 | expect: 'body { min-inline-size: 0; }',
119 | args: 'always'
120 | }, {
121 | source: 'body { max-width: 0; }',
122 | expect: 'body { max-inline-size: 0; }',
123 | args: 'always'
124 | }, {
125 | source: 'body { height: 0; }',
126 | expect: 'body { block-size: 0; }',
127 | args: 'always'
128 | }, {
129 | source: 'body { min-height: 0; }',
130 | expect: 'body { min-block-size: 0; }',
131 | args: 'always'
132 | }, {
133 | source: 'body { max-height: 0; }',
134 | expect: 'body { max-block-size: 0; }',
135 | args: 'always'
136 | }, {
137 | source: 'body { border-left: 0; }',
138 | expect: 'body { border-inline-start: 0; }',
139 | args: 'always'
140 | }, {
141 | source: 'body { border-right: 0; }',
142 | expect: 'body { border-inline-end: 0; }',
143 | args: 'always'
144 | }, {
145 | source: 'body { border-top: 0; }',
146 | expect: 'body { border-block-start: 0; }',
147 | args: 'always'
148 | }, {
149 | source: 'body { border-bottom: 0; }',
150 | expect: 'body { border-block-end: 0; }',
151 | args: 'always'
152 | }, {
153 | source: 'body { border-left-color: 0; }',
154 | expect: 'body { border-inline-start-color: 0; }',
155 | args: 'always'
156 | }, {
157 | source: 'body { border-right-color: 0; }',
158 | expect: 'body { border-inline-end-color: 0; }',
159 | args: 'always'
160 | }, {
161 | source: 'body { border-top-color: 0; }',
162 | expect: 'body { border-block-start-color: 0; }',
163 | args: 'always'
164 | }, {
165 | source: 'body { border-bottom-color: 0; }',
166 | expect: 'body { border-block-end-color: 0; }',
167 | args: 'always'
168 | }, {
169 | source: 'body { border-left-style: 0; }',
170 | expect: 'body { border-inline-start-style: 0; }',
171 | args: 'always'
172 | }, {
173 | source: 'body { border-right-style: 0; }',
174 | expect: 'body { border-inline-end-style: 0; }',
175 | args: 'always'
176 | }, {
177 | source: 'body { border-top-style: 0; }',
178 | expect: 'body { border-block-start-style: 0; }',
179 | args: 'always'
180 | }, {
181 | source: 'body { border-bottom-style: 0; }',
182 | expect: 'body { border-block-end-style: 0; }',
183 | args: 'always'
184 | }, {
185 | source: 'body { border-left-width: 0; }',
186 | expect: 'body { border-inline-start-width: 0; }',
187 | args: 'always'
188 | }, {
189 | source: 'body { border-right-width: 0; }',
190 | expect: 'body { border-inline-end-width: 0; }',
191 | args: 'always'
192 | }, {
193 | source: 'body { border-top-width: 0; }',
194 | expect: 'body { border-block-start-width: 0; }',
195 | args: 'always'
196 | }, {
197 | source: 'body { border-bottom-width: 0; }',
198 | expect: 'body { border-block-end-width: 0; }',
199 | args: 'always'
200 | }, {
201 | source: 'body { border-top-left-radius: 0; }',
202 | expect: 'body { border-start-start-radius: 0; }',
203 | args: 'always'
204 | }, {
205 | source: 'body { border-top-right-radius: 0; }',
206 | expect: 'body { border-start-end-radius: 0; }',
207 | args: 'always'
208 | }, {
209 | source: 'body { border-bottom-left-radius: 0; }',
210 | expect: 'body { border-end-start-radius: 0; }',
211 | args: 'always'
212 | }, {
213 | source: 'body { border-bottom-right-radius: 0; }',
214 | expect: 'body { border-end-end-radius: 0; }',
215 | args: 'always'
216 | }
217 | ]
218 | };
219 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changes to Property Use Logical
2 |
3 | ### 2.1.2 (March 3, 2024)
4 |
5 | - Fix `exports` in `package.json` [#25](https://github.com/csstools/stylelint-use-logical/issues/25)
6 | - Fix `except` plugin option [#3](https://github.com/csstools/stylelint-use-logical/issues/3)
7 |
8 | ### 2.1.1 (February 19, 2024)
9 |
10 | - Updated: peer `stylelint` to `>= 11 < 17` (patch) [#22](https://github.com/csstools/stylelint-use-logical/pull/22)
11 | - Fixed: compatibility with `stylelint` 16 (patch) [#22](https://github.com/csstools/stylelint-use-logical/pull/22)
12 |
13 | ### 2.1.0 (March 8, 2022)
14 |
15 | - Updated: peer `stylelint` to >= 11 < 16 (patch)
16 | - Added: Support for `width`, `height`, `min-width`, `min-height`, `max-width`, `max-height`.
17 |
18 | ### 2.0.0 (May 12, 2018)
19 |
20 | - Updated: peer `stylelint` to >= 11 < 15 (major)
21 | - Updated: Node 14+ compatibility (major)
22 |
23 | ### 1.1.0 (September 29, 2018)
24 |
25 | - Added: `direction` option to control whether properties and values are
26 | reported or autofixed using _left to right_ or _right to left_ counterparts
27 | - Fixed: Physical properties and values within `:dir(ltr)` or `:dir(rtl)` are
28 | ignored
29 |
30 | ### 1.0.1 (September 28, 2018)
31 |
32 | - Fix usage name
33 |
34 | ### 1.0.0 (September 26, 2018)
35 |
36 | - Initial version
37 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Property Use Logical
2 |
3 | You want to help? You rock! Now, take a moment to be sure your contributions
4 | make sense to everyone else.
5 |
6 | ## Reporting Issues
7 |
8 | Found a problem? Want a new feature?
9 |
10 | - See if your issue or idea has [already been reported].
11 | - Provide a [reduced test case] or a [live example].
12 |
13 | Remember, a bug is a _demonstrable problem_ caused by _our_ code.
14 |
15 | ## Submitting Pull Requests
16 |
17 | Pull requests are the greatest contributions, so be sure they are focused in
18 | scope and avoid unrelated commits.
19 |
20 | 1. To begin; [fork this project], clone your fork, and add our upstream.
21 | ```bash
22 | # Clone your fork of the repo into the current directory
23 | git clone git@github.com:YOUR_USER/stylelint-use-logical.git
24 |
25 | # Navigate to the newly cloned directory
26 | cd stylelint-use-logical
27 |
28 | # Assign the original repo to a remote called "upstream"
29 | git remote add upstream git@github.com:csstools/stylelint-use-logical.git
30 |
31 | # Install the tools necessary for testing
32 | npm install
33 | ```
34 |
35 | 2. Create a branch for your feature or fix:
36 | ```bash
37 | # Move into a new branch for your feature
38 | git checkout -b feature/thing
39 | ```
40 | ```bash
41 | # Move into a new branch for your fix
42 | git checkout -b fix/something
43 | ```
44 |
45 | 3. If your code follows our practices, then push your feature branch:
46 | ```bash
47 | # Test current code
48 | npm test
49 | ```
50 | ```bash
51 | # Push the branch for your new feature
52 | git push origin feature/thing
53 | ```
54 | ```bash
55 | # Or, push the branch for your update
56 | git push origin update/something
57 | ```
58 |
59 | That’s it! Now [open a pull request] with a clear title and description.
60 |
61 | [already been reported]: issues
62 | [fork this project]: fork
63 | [live example]: https://codepen.io/pen
64 | [open a pull request]: https://help.github.com/articles/using-pull-requests/
65 | [reduced test case]: https://css-tricks.com/reduced-test-cases/
66 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # CC0 1.0 Universal
2 |
3 | ## Statement of Purpose
4 |
5 | The laws of most jurisdictions throughout the world automatically confer
6 | exclusive Copyright and Related Rights (defined below) upon the creator and
7 | subsequent owner(s) (each and all, an “owner”) of an original work of
8 | authorship and/or a database (each, a “Work”).
9 |
10 | Certain owners wish to permanently relinquish those rights to a Work for the
11 | purpose of contributing to a commons of creative, cultural and scientific works
12 | (“Commons”) that the public can reliably and without fear of later claims of
13 | infringement build upon, modify, incorporate in other works, reuse and
14 | redistribute as freely as possible in any form whatsoever and for any purposes,
15 | including without limitation commercial purposes. These owners may contribute
16 | to the Commons to promote the ideal of a free culture and the further
17 | production of creative, cultural and scientific works, or to gain reputation or
18 | greater distribution for their Work in part through the use and efforts of
19 | others.
20 |
21 | For these and/or other purposes and motivations, and without any expectation of
22 | additional consideration or compensation, the person associating CC0 with a
23 | Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25 | publicly distribute the Work under its terms, with knowledge of his or her
26 | Copyright and Related Rights in the Work and the meaning and intended legal
27 | effect of CC0 on those rights.
28 |
29 | 1. Copyright and Related Rights. A Work made available under CC0 may be
30 | protected by copyright and related or neighboring rights (“Copyright and
31 | Related Rights”). Copyright and Related Rights include, but are not limited
32 | to, the following:
33 | 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34 | and translate a Work;
35 | 2. moral rights retained by the original author(s) and/or performer(s);
36 | 3. publicity and privacy rights pertaining to a person’s image or likeness
37 | depicted in a Work;
38 | 4. rights protecting against unfair competition in regards to a Work,
39 | subject to the limitations in paragraph 4(i), below;
40 | 5. rights protecting the extraction, dissemination, use and reuse of data in
41 | a Work;
42 | 6. database rights (such as those arising under Directive 96/9/EC of the
43 | European Parliament and of the Council of 11 March 1996 on the legal
44 | protection of databases, and under any national implementation thereof,
45 | including any amended or successor version of such directive); and
46 | 7. other similar, equivalent or corresponding rights throughout the world
47 | based on applicable law or treaty, and any national implementations
48 | thereof.
49 |
50 | 2. Waiver. To the greatest extent permitted by, but not in contravention of,
51 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52 | unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53 | and Related Rights and associated claims and causes of action, whether now
54 | known or unknown (including existing as well as future claims and causes of
55 | action), in the Work (i) in all territories worldwide, (ii) for the maximum
56 | duration provided by applicable law or treaty (including future time
57 | extensions), (iii) in any current or future medium and for any number of
58 | copies, and (iv) for any purpose whatsoever, including without limitation
59 | commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60 | makes the Waiver for the benefit of each member of the public at large and
61 | to the detriment of Affirmer’s heirs and successors, fully intending that
62 | such Waiver shall not be subject to revocation, rescission, cancellation,
63 | termination, or any other legal or equitable action to disrupt the quiet
64 | enjoyment of the Work by the public as contemplated by Affirmer’s express
65 | Statement of Purpose.
66 |
67 | 3. Public License Fallback. Should any part of the Waiver for any reason be
68 | judged legally invalid or ineffective under applicable law, then the Waiver
69 | shall be preserved to the maximum extent permitted taking into account
70 | Affirmer’s express Statement of Purpose. In addition, to the extent the
71 | Waiver is so judged Affirmer hereby grants to each affected person a
72 | royalty-free, non transferable, non sublicensable, non exclusive,
73 | irrevocable and unconditional license to exercise Affirmer’s Copyright and
74 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
75 | maximum duration provided by applicable law or treaty (including future time
76 | extensions), (iii) in any current or future medium and for any number of
77 | copies, and (iv) for any purpose whatsoever, including without limitation
78 | commercial, advertising or promotional purposes (the “License”). The License
79 | shall be deemed effective as of the date CC0 was applied by Affirmer to the
80 | Work. Should any part of the License for any reason be judged legally
81 | invalid or ineffective under applicable law, such partial invalidity or
82 | ineffectiveness shall not invalidate the remainder of the License, and in
83 | such case Affirmer hereby affirms that he or she will not (i) exercise any
84 | of his or her remaining Copyright and Related Rights in the Work or (ii)
85 | assert any associated claims and causes of action with respect to the Work,
86 | in either case contrary to Affirmer’s express Statement of Purpose.
87 |
88 | 4. Limitations and Disclaimers.
89 | 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90 | surrendered, licensed or otherwise affected by this document.
91 | 2. Affirmer offers the Work as-is and makes no representations or warranties
92 | of any kind concerning the Work, express, implied, statutory or
93 | otherwise, including without limitation warranties of title,
94 | merchantability, fitness for a particular purpose, non infringement, or
95 | the absence of latent or other defects, accuracy, or the present or
96 | absence of errors, whether or not discoverable, all to the greatest
97 | extent permissible under applicable law.
98 | 3. Affirmer disclaims responsibility for clearing rights of other persons
99 | that may apply to the Work or any use thereof, including without
100 | limitation any person’s Copyright and Related Rights in the Work.
101 | Further, Affirmer disclaims responsibility for obtaining any necessary
102 | consents, permissions or other rights required for any use of the Work.
103 | 4. Affirmer understands and acknowledges that Creative Commons is not a
104 | party to this document and has no duty or obligation with respect to this
105 | CC0 or use of the Work.
106 |
107 | For more information, please see
108 | http://creativecommons.org/publicdomain/zero/1.0/.
109 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Property Use Logical [
][stylelint]
2 |
3 | [![NPM Version][npm-img]][npm-url]
4 | [![Build Status][cli-img]][cli-url]
5 | [![Support Chat][git-img]][git-url]
6 |
7 | [Property Use Logical] is a [stylelint] rule to enforce the usage of
8 | [Logical Properties and Values] in CSS.
9 |
10 | Physical dimensions and directions are described _left_ to _right_ and _top_ to
11 | _bottom_, while their logical counterparts are described _start_ to _end_ and
12 | _inline_ or _block_.
13 |
14 | ---
15 |
16 | For example, to add spacing before the start of a paragraph, we might use the
17 | physical `padding-left` property.
18 |
19 | ```css
20 | p {
21 | padding-left: 2em;
22 | }
23 | ```
24 |
25 | Were the content Hebrew or Arabic — flowing _right to left_ — then we might
26 | use alternating `padding-left` and `padding-right` properties.
27 |
28 | ```css
29 | p:dir(ltr) {
30 | padding-left: 2em;
31 | }
32 |
33 | p:dir(rtl) {
34 | padding-right: 2em;
35 | }
36 | ```
37 |
38 | Selector weight aside, we can instead use the logical `padding-inline-start`
39 | property.
40 |
41 | ```css
42 | p {
43 | padding-inline-start: 2em;
44 | }
45 | ```
46 |
47 | Similarly, physical _horizontal_ and _vertical_ dimensions are described
48 | more succinctly using their logical counterparts.
49 |
50 | ```css
51 | h1, h2, h3 {
52 | margin-top: 1em;
53 | margin-bottom: 1em;
54 | }
55 |
56 | blockquote {
57 | margin-left: 1em;
58 | margin-right: 1em;
59 | }
60 |
61 | /* becomes */
62 |
63 | h1, h2, h3 {
64 | margin-block: 1em;
65 | }
66 |
67 | blockquote {
68 | margin-inline: 1em;
69 | }
70 | ```
71 |
72 | ## Usage
73 |
74 | Add [stylelint] and [Property Use Logical] to your project.
75 |
76 | ```bash
77 | npm install stylelint stylelint-use-logical --save-dev
78 | ```
79 |
80 | Add [Property Use Logical] to your [stylelint configuration].
81 |
82 | ```js
83 | {
84 | "plugins": [
85 | "stylelint-use-logical"
86 | ],
87 | "rules": {
88 | "csstools/use-logical": ("always" || true) || ("ignore" || false || null)
89 | }
90 | }
91 | ```
92 |
93 | ## Options
94 |
95 | ### always
96 |
97 | The `"always"` option (alternatively `true`) requires logical properties and
98 | values to be used, and the following patterns are _not_ considered violations:
99 |
100 | ```pcss
101 | .inset {
102 | inset: 0;
103 | }
104 |
105 | .margin {
106 | margin-inline-start: 0;
107 | }
108 |
109 | .padding {
110 | padding-inline: 0;
111 | }
112 |
113 | .float {
114 | float: inline-start;
115 | }
116 |
117 | .text-align {
118 | text-align: start;
119 | }
120 |
121 | .text-align-ignored:dir(ltr) {
122 | text-align: left;
123 | }
124 | ```
125 |
126 | While the following patterns _are_ considered violations:
127 |
128 | ```pcss
129 | .inset {
130 | top: 0;
131 | right: 0;
132 | bottom: 0;
133 | left: 0;
134 | }
135 |
136 | .margin {
137 | margin-left: 0;
138 | }
139 |
140 | .padding {
141 | padding-left: 0;
142 | padding-right: 0;
143 | }
144 |
145 | .float {
146 | float: left;
147 | }
148 |
149 | .text-align {
150 | text-align: left;
151 | }
152 | ```
153 |
154 | ### ignore
155 |
156 | The `"ignore"` option (alternatively `false` or `null`) disables the rule.
157 |
158 | ## Secondary Options
159 |
160 | ### except
161 |
162 | The `except` option ignores reporting or autofixing properties and values
163 | matching a case-insensitive string or regular expression.
164 |
165 | ```js
166 | {
167 | "rules": {
168 | "csstools/use-logical": ["always", { "except": ['float', /^margin/i] }]
169 | }
170 | }
171 | ```
172 |
173 | ### direction
174 |
175 | The `direction` option controls whether _left to right_ or _right to left_
176 | properties and values should be reported or autofixed.
177 |
178 | ```js
179 | {
180 | "rules": {
181 | "csstools/use-logical": ["always", { "direction": "ltr" || "rtl" }]
182 | }
183 | }
184 | ```
185 |
186 | ## Property and Value Mapping
187 |
188 | Assuming _left to right_ directionality:
189 |
190 | | Physical Property | Logical Property |
191 | | ----------------- | ---------------------- |
192 | | `top` | `inset-block-start` |
193 | | `right` | `inset-inline-end` |
194 | | `bottom` | `inset-block-end` |
195 | | `left` | `inset-inline-start` |
196 |
197 | | Physical Property | Logical Property |
198 | | ----------------- | ---------------------- |
199 | | `margin-top` | `margin-block-start` |
200 | | `margin-right` | `margin-inline-end` |
201 | | `margin-bottom` | `margin-block-end` |
202 | | `margin-left` | `margin-inline-start` |
203 |
204 | | Physical Property | Logical Property |
205 | | ----------------- | ---------------------- |
206 | | `padding-top` | `padding-block-start` |
207 | | `padding-right` | `padding-inline-end` |
208 | | `padding-bottom` | `padding-block-end` |
209 | | `padding-left` | `padding-inline-start` |
210 |
211 | | Physical Property | Logical Property |
212 | | ----------------- | ---------------------- |
213 | | `width` | `inline-size` |
214 | | `min-width` | `min-inline-size` |
215 | | `max-width` | `max-inline-size` |
216 | | `height` | `block-size` |
217 | | `min-height` | `min-block-size` |
218 | | `max-height` | `max-block-size` |
219 |
220 | | Physical Property | Logical Property |
221 | | --------------------------- | --------------------------- |
222 | | `border-top-left-radius` | `border-start-start-radius` |
223 | | `border-top-right-radius` | `border-start-end-radius` |
224 | | `border-bottom-left-radius` | `border-end-start-radius` |
225 | | `border-bottom-right-radius`| `border-end-end-radius` |
226 |
227 | | Physical Value | Logical Value |
228 | | -------------------- | --------------------- |
229 | | `text-align: left;` | `text-align: start;` |
230 | | `text-align: right;` | `text-align: end;` |
231 |
232 | [cli-img]: https://img.shields.io/travis/csstools/stylelint-use-logical.svg
233 | [cli-url]: https://travis-ci.org/csstools/stylelint-use-logical
234 | [git-img]: https://img.shields.io/badge/support-chat-blue.svg
235 | [git-url]: https://gitter.im/stylelint/stylelint
236 | [npm-img]: https://img.shields.io/npm/v/stylelint-use-logical.svg
237 | [npm-url]: https://www.npmjs.com/package/stylelint-use-logical
238 |
239 | [Logical Properties and Values]: https://www.w3.org/TR/css-logical-1/
240 | [stylelint]: https://github.com/stylelint/stylelint
241 | [stylelint configuration]: https://github.com/stylelint/stylelint/blob/master/docs/user-guide/configuration.md#readme
242 | [Property Use Logical]: https://github.com/csstools/stylelint-use-logical
243 |
--------------------------------------------------------------------------------
/index.cjs:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var stylelint = require('stylelint');
4 |
5 | const inline = {
6 | start: { ltr: 'left', rtl: 'right' },
7 | end: { ltr: 'right', rtl: 'left' }
8 | };
9 |
10 | const physical4Prop = [
11 | [ [ 'top', 'left', 'bottom', 'right' ], 'inset' ],
12 | [ [ 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' ], 'margin' ],
13 | [ [ 'padding-top', 'padding-left', 'padding-bottom', 'padding-right' ], 'padding' ]
14 | ];
15 |
16 | const physical2Prop = () => [
17 | [ [ 'top', 'bottom' ], 'inset-block' ],
18 | [ [ 'left', 'right' ], 'inset-inline' ],
19 |
20 | [ [ 'margin-top', 'margin-bottom' ], 'margin-block' ],
21 | [ [ 'margin-left', 'margin-right' ], 'margin-inline' ],
22 |
23 | [ [ 'padding-top', 'padding-bottom' ], 'padding-block' ],
24 | [ [ 'padding-left', 'padding-right' ], 'padding-inline' ],
25 | ];
26 |
27 | const physicalProp = dir => [
28 | [ [ 'top' ], 'inset-block-start' ],
29 | [ [ 'bottom' ], 'inset-block-end' ],
30 | [ [ inline.start[dir] ], 'inset-inline-start' ],
31 | [ [ inline.end[dir] ], 'inset-inline-end' ],
32 |
33 | [ [ 'margin-top' ], 'margin-block-start' ],
34 | [ [ 'margin-bottom' ], 'margin-block-end' ],
35 | [ [ `margin-${inline.start[dir]}` ], 'margin-inline-start' ],
36 | [ [ `margin-${inline.end[dir]}` ], 'margin-inline-end' ],
37 |
38 | [ [ 'padding-top' ], 'padding-block-start' ],
39 | [ [ 'padding-bottom' ], 'padding-block-end' ],
40 | [ [ `padding-${inline.start[dir]}` ], 'padding-inline-start' ],
41 | [ [ `padding-${inline.end[dir]}` ], 'padding-inline-end' ],
42 |
43 | // width, height
44 | [ [ 'width' ], 'inline-size' ],
45 | [ [ 'min-width' ], 'min-inline-size' ],
46 | [ [ 'max-width' ], 'max-inline-size' ],
47 | [ [ 'height' ], 'block-size' ],
48 | [ [ 'min-height' ], 'min-block-size' ],
49 | [ [ 'max-height' ], 'max-block-size' ],
50 |
51 | // border
52 | [ [ 'border-top' ], 'border-block-start' ],
53 | [ [ 'border-bottom' ], 'border-block-end' ],
54 | [ [ `border-${inline.start[dir]}` ], 'border-inline-start' ],
55 | [ [ `border-${inline.end[dir]}` ], 'border-inline-end' ],
56 |
57 | [ [ 'border-top-color' ], 'border-block-start-color' ],
58 | [ [ 'border-top-style' ], 'border-block-start-style' ],
59 | [ [ 'border-top-width' ], 'border-block-start-width' ],
60 | [ [ 'border-bottom-color' ], 'border-block-end-color' ],
61 | [ [ 'border-bottom-style' ], 'border-block-end-style' ],
62 | [ [ 'border-bottom-width' ], 'border-block-end-width' ],
63 |
64 |
65 | [ [ `border-${inline.start[dir]}-color` ], 'border-inline-start-color' ],
66 | [ [ `border-${inline.start[dir]}-style` ], 'border-inline-start-style' ],
67 | [ [ `border-${inline.start[dir]}-width` ], 'border-inline-start-width' ],
68 | [ [ `border-${inline.end[dir]}-color` ], 'border-inline-end-color' ],
69 | [ [ `border-${inline.end[dir]}-style` ], 'border-inline-end-style' ],
70 | [ [ `border-${inline.end[dir]}-width` ], 'border-inline-end-width' ],
71 |
72 |
73 |
74 | [ [ `border-top-${inline.start[dir]}-radius` ], 'border-start-start-radius' ],
75 | [ [ `border-bottom-${inline.start[dir]}-radius` ], 'border-end-start-radius' ],
76 | [ [ `border-top-${inline.end[dir]}-radius` ], 'border-start-end-radius' ],
77 | [ [ `border-bottom-${inline.end[dir]}-radius` ], 'border-end-end-radius' ],
78 |
79 | ];
80 |
81 | const physicalValue = dir => [
82 | [ /^clear$/i, {
83 | [inline.start[dir]]: 'inline-start',
84 | [inline.end[dir]]: 'inline-end'
85 | }],
86 | [ /^float$/i, {
87 | [inline.start[dir]]: 'inline-start',
88 | [inline.end[dir]]: 'inline-end'
89 | }],
90 | [ /^text-align$/i, {
91 | [inline.start[dir]]: 'start',
92 | [inline.end[dir]]: 'end'
93 | }]
94 | ];
95 |
96 | const validateRuleWithProps = (root, props, fn) => {
97 | // conditionally walk nodes with children
98 | if (root.nodes && root.nodes.length) {
99 | const args = [];
100 |
101 | const hasProps = props.every(prop => {
102 | const declIndex = root.nodes.findIndex(child => child.type === 'decl' && child.prop === prop);
103 | const decl = root.nodes[declIndex];
104 |
105 | if (decl) {
106 | args.push(decl, declIndex);
107 | }
108 |
109 | return decl;
110 | });
111 |
112 | if (hasProps) {
113 | fn(...args);
114 | }
115 | }
116 | };
117 |
118 | var ruleName = 'csstools/use-logical';
119 |
120 | var messages = stylelint.utils.ruleMessages(ruleName, {
121 | unexpectedProp(physicalProperty, logicalProperty) {
122 | return `Unexpected "${physicalProperty}" property. Use "${logicalProperty}".`;
123 | },
124 | unexpectedValue(property, physicalValue, logicalValue) {
125 | return `Unexpected "${physicalValue}" value in "${property}" property. Use "${logicalValue}".`;
126 | }
127 | });
128 |
129 | // walk all container nodes
130 | function walk(node, fn) {
131 | if (node.nodes && node.nodes.length) {
132 | const nodes = node.nodes.slice();
133 | const length = nodes.length;
134 | let index = -1;
135 |
136 | while (++index < length) {
137 | const child = nodes[index];
138 |
139 | if (!isDirRule(child)) {
140 | fn(child);
141 |
142 | walk(child, fn);
143 | }
144 | }
145 | }
146 | }
147 |
148 | const dirSelectorRegExp = /:dir\(ltr|rtl\)/i;
149 | const isDirRule = node => node.type === 'rule' && dirSelectorRegExp.test(node.selector);
150 |
151 | const reportedDecls = new WeakMap();
152 |
153 | function ruleFunc(method, opts, context) {
154 | const propExceptions = [].concat(Object(opts).except || []);
155 | const isAutofix = isContextAutofixing(context);
156 | const dir = /^rtl$/i.test(Object(opts).direction) ? 'rtl' : 'ltr';
157 |
158 | return (root, result) => {
159 | // validate the method
160 | const isMethodValid = stylelint.utils.validateOptions(result, ruleName, {
161 | actual: method,
162 | possible() {
163 | return isMethodIndifferent(method) ||
164 | isMethodAlways(method)
165 | }
166 | });
167 |
168 | const reportUnexpectedProperty = (decl, logicalProperty) => stylelint.utils.report({
169 | message: messages.unexpectedProp(decl.prop, logicalProperty),
170 | node: decl,
171 | result,
172 | ruleName
173 | });
174 |
175 | const reportUnexpectedValue = (node, value) => stylelint.utils.report({
176 | message: messages.unexpectedValue(node.prop, node.value, value),
177 | node,
178 | result,
179 | ruleName
180 | });
181 |
182 | if (isMethodValid && isMethodAlways(method)) {
183 | walk(root, node => {
184 | // validate or autofix 4 physical properties as logical shorthands
185 | physical4Prop.forEach(([ props, prop ]) => {
186 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex, blockEndDecl, blockEndIndex, inlineEndDecl, inlineEndIndex) => { // eslint-disable-line
187 | if (
188 | isDeclAnException(blockStartDecl, propExceptions) ||
189 | isDeclAnException(inlineStartDecl, propExceptions) ||
190 | isDeclAnException(blockEndDecl, propExceptions) ||
191 | isDeclAnException(inlineEndDecl, propExceptions)
192 | ) {
193 | return;
194 | }
195 |
196 | const firstInlineDecl = blockStartDecl;
197 |
198 | if (isAutofix) {
199 | const values = [ blockStartDecl.value, inlineStartDecl.value, blockEndDecl.value, inlineEndDecl.value ];
200 |
201 | if (values[1] === values[3]) {
202 | values.pop();
203 |
204 | if (values[2] === values[1]) {
205 | values.pop();
206 |
207 | if (values[1] === values[0]) {
208 | values.pop();
209 | }
210 | }
211 | }
212 |
213 | firstInlineDecl.cloneBefore({
214 | prop,
215 | value: values.length <= 2 ? values.join(' ') : `logical ${values.join(' ')}`
216 | });
217 |
218 | blockStartDecl.remove();
219 | inlineStartDecl.remove();
220 | blockEndDecl.remove();
221 | inlineEndDecl.remove();
222 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl) && !isDeclReported(blockEndDecl) && !isDeclReported(inlineEndDecl)) {
223 | reportUnexpectedProperty(firstInlineDecl, prop);
224 |
225 | reportedDecls.set(blockStartDecl);
226 | reportedDecls.set(inlineStartDecl);
227 | reportedDecls.set(blockEndDecl);
228 | reportedDecls.set(inlineEndDecl);
229 | }
230 | });
231 | });
232 |
233 | // validate or autofix 2 physical properties as logical shorthands
234 | physical2Prop().forEach(([ props, prop ]) => {
235 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex) => { // eslint-disable-line
236 | if (
237 | isDeclAnException(blockStartDecl, propExceptions) ||
238 | isDeclAnException(inlineStartDecl, propExceptions)
239 | ) {
240 | return;
241 | }
242 |
243 | const firstInlineDecl = blockStartIndex < inlineStartIndex
244 | ? blockStartDecl
245 | : inlineStartDecl;
246 |
247 | if (isAutofix) {
248 | firstInlineDecl.cloneBefore({
249 | prop,
250 | value: blockStartDecl.value === inlineStartDecl.value
251 | ? blockStartDecl.value
252 | : [ blockStartDecl.value, inlineStartDecl.value ].join(' ')
253 | });
254 |
255 | blockStartDecl.remove();
256 | inlineStartDecl.remove();
257 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl)) {
258 | reportUnexpectedProperty(firstInlineDecl, prop);
259 |
260 | reportedDecls.set(blockStartDecl);
261 | reportedDecls.set(inlineStartDecl);
262 | }
263 | });
264 | });
265 |
266 | // validate or autofix physical properties as logical
267 | physicalProp(dir).forEach(([ props, prop ]) => {
268 | validateRuleWithProps(node, props, physicalDecl => {
269 | if (isDeclAnException(physicalDecl, propExceptions)) {
270 | return;
271 | }
272 |
273 | if (isAutofix) {
274 | physicalDecl.prop = prop;
275 | } else if (!isDeclReported(physicalDecl)) {
276 | reportUnexpectedProperty(physicalDecl, prop);
277 |
278 | reportedDecls.set(physicalDecl);
279 | }
280 | });
281 | });
282 |
283 | // validate or autofix physical values as logical
284 | physicalValue(dir).forEach(([ regexp, props ]) => {
285 | if (!isNodeMatchingDecl(node, regexp)) {
286 | return;
287 | }
288 |
289 | if (isDeclAnException(node, propExceptions)) {
290 | return;
291 | }
292 |
293 | const valuekey = node.value.toLowerCase();
294 |
295 | if (valuekey in props) {
296 | const value = props[valuekey];
297 |
298 | if (isAutofix) {
299 | node.value = value;
300 | } else {
301 | reportUnexpectedValue(node, value);
302 |
303 | reportedDecls.set(node);
304 | }
305 | }
306 | });
307 | });
308 | }
309 | };
310 | }ruleFunc.ruleName = ruleName;
311 |
312 | var index = stylelint.createPlugin(ruleName, ruleFunc);
313 |
314 | const isMethodIndifferent = method => method === 'ignore' || method === false || method === null;
315 | const isMethodAlways = method => method === 'always' || method === true;
316 | const isContextAutofixing = context => Boolean(Object(context).fix);
317 | const isNodeMatchingDecl = (decl, regexp) => decl.type === 'decl' && regexp.test(decl.prop);
318 |
319 | const isDeclAnException = (decl, propExceptions) => {
320 | if (!decl || decl.type !== 'decl') {
321 | return false;
322 | }
323 |
324 | return propExceptions.some((match) => {
325 | if (match instanceof RegExp) {
326 | return match.test(decl.prop);
327 | }
328 |
329 | return String(match || '').toLowerCase() === String(decl.prop || '').toLowerCase();
330 | });
331 | };
332 |
333 | const isDeclReported = decl => reportedDecls.has(decl);
334 |
335 | module.exports = index;
336 | //# sourceMappingURL=index.cjs.map
337 |
--------------------------------------------------------------------------------
/index.cjs.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.cjs","sources":["lib/maps.js","lib/validate.js","lib/rule-name.js","lib/messages.js","lib/walk.js","index.js"],"sourcesContent":["const inline = {\n\tstart: { ltr: 'left', rtl: 'right' },\n\tend: { ltr: 'right', rtl: 'left' }\n}\n\nexport const physical4Prop = [\n\t[ [ 'top', 'left', 'bottom', 'right' ], 'inset' ],\n\t[ [ 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' ], 'margin' ],\n\t[ [ 'padding-top', 'padding-left', 'padding-bottom', 'padding-right' ], 'padding' ]\n];\n\nexport const physical2Prop = () => [\n\t[ [ 'top', 'bottom' ], 'inset-block' ],\n\t[ [ 'left', 'right' ], 'inset-inline' ],\n\n\t[ [ 'margin-top', 'margin-bottom' ], 'margin-block' ],\n\t[ [ 'margin-left', 'margin-right' ], 'margin-inline' ],\n\n\t[ [ 'padding-top', 'padding-bottom' ], 'padding-block' ],\n\t[ [ 'padding-left', 'padding-right' ], 'padding-inline' ],\n];\n\nexport const physicalProp = dir => [\n\t[ [ 'top' ], 'inset-block-start' ],\n\t[ [ 'bottom' ], 'inset-block-end' ],\n\t[ [ inline.start[dir] ], 'inset-inline-start' ],\n\t[ [ inline.end[dir] ], 'inset-inline-end' ],\n\n\t[ [ 'margin-top' ], 'margin-block-start' ],\n\t[ [ 'margin-bottom' ], 'margin-block-end' ],\n\t[ [ `margin-${inline.start[dir]}` ], 'margin-inline-start' ],\n\t[ [ `margin-${inline.end[dir]}` ], 'margin-inline-end' ],\n\n\t[ [ 'padding-top' ], 'padding-block-start' ],\n\t[ [ 'padding-bottom' ], 'padding-block-end' ],\n\t[ [ `padding-${inline.start[dir]}` ], 'padding-inline-start' ],\n\t[ [ `padding-${inline.end[dir]}` ], 'padding-inline-end' ],\n\n\t// width, height\n\t[ [ 'width' ], 'inline-size' ],\n\t[ [ 'min-width' ], 'min-inline-size' ],\n\t[ [ 'max-width' ], 'max-inline-size' ],\n\t[ [ 'height' ], 'block-size' ],\n\t[ [ 'min-height' ], 'min-block-size' ],\n\t[ [ 'max-height' ], 'max-block-size' ],\n\n\t// border\n\t[ [ 'border-top' ], 'border-block-start' ],\n\t[ [ 'border-bottom' ], 'border-block-end' ],\n\t[ [ `border-${inline.start[dir]}` ], 'border-inline-start' ],\n\t[ [ `border-${inline.end[dir]}` ], 'border-inline-end' ],\n\n\t[ [ 'border-top-color' ], 'border-block-start-color' ],\n\t[ [ 'border-top-style' ], 'border-block-start-style' ],\n\t[ [ 'border-top-width' ], 'border-block-start-width' ],\n\t[ [ 'border-bottom-color' ], 'border-block-end-color' ],\n\t[ [ 'border-bottom-style' ], 'border-block-end-style' ],\n\t[ [ 'border-bottom-width' ], 'border-block-end-width' ],\n\n\n\t[ [ `border-${inline.start[dir]}-color` ], 'border-inline-start-color' ],\n\t[ [ `border-${inline.start[dir]}-style` ], 'border-inline-start-style' ],\n\t[ [ `border-${inline.start[dir]}-width` ], 'border-inline-start-width' ],\n\t[ [ `border-${inline.end[dir]}-color` ], 'border-inline-end-color' ],\n\t[ [ `border-${inline.end[dir]}-style` ], 'border-inline-end-style' ],\n\t[ [ `border-${inline.end[dir]}-width` ], 'border-inline-end-width' ],\n\n\n\n\t[ [ `border-top-${inline.start[dir]}-radius` ], 'border-start-start-radius' ],\n\t[ [ `border-bottom-${inline.start[dir]}-radius` ], 'border-end-start-radius' ],\n\t[ [ `border-top-${inline.end[dir]}-radius` ], 'border-start-end-radius' ],\n\t[ [ `border-bottom-${inline.end[dir]}-radius` ], 'border-end-end-radius' ],\n\n];\n\nexport const physicalValue = dir => [\n\t[ /^clear$/i, {\n\t\t[inline.start[dir]]: 'inline-start',\n\t\t[inline.end[dir]]: 'inline-end'\n\t}],\n\t[ /^float$/i, {\n\t\t[inline.start[dir]]: 'inline-start',\n\t\t[inline.end[dir]]: 'inline-end'\n\t}],\n\t[ /^text-align$/i, {\n\t\t[inline.start[dir]]: 'start',\n\t\t[inline.end[dir]]: 'end'\n\t}]\n];\n","export const validateRuleWithProps = (root, props, fn) => {\n\t// conditionally walk nodes with children\n\tif (root.nodes && root.nodes.length) {\n\t\tconst args = [];\n\n\t\tconst hasProps = props.every(prop => {\n\t\t\tconst declIndex = root.nodes.findIndex(child => child.type === 'decl' && child.prop === prop);\n\t\t\tconst decl = root.nodes[declIndex];\n\n\t\t\tif (decl) {\n\t\t\t\targs.push(decl, declIndex);\n\t\t\t}\n\n\t\t\treturn decl;\n\t\t});\n\n\t\tif (hasProps) {\n\t\t\tfn(...args);\n\t\t}\n\t}\n};\n","export default 'csstools/use-logical';\n","import stylelint from 'stylelint';\nimport ruleName from './rule-name';\n\nexport default stylelint.utils.ruleMessages(ruleName, {\n\tunexpectedProp(physicalProperty, logicalProperty) {\n\t\treturn `Unexpected \"${physicalProperty}\" property. Use \"${logicalProperty}\".`;\n\t},\n\tunexpectedValue(property, physicalValue, logicalValue) {\n\t\treturn `Unexpected \"${physicalValue}\" value in \"${property}\" property. Use \"${logicalValue}\".`;\n\t}\n});\n","// walk all container nodes\nexport default function walk(node, fn) {\n\tif (node.nodes && node.nodes.length) {\n\t\tconst nodes = node.nodes.slice();\n\t\tconst length = nodes.length;\n\t\tlet index = -1;\n\n\t\twhile (++index < length) {\n\t\t\tconst child = nodes[index];\n\n\t\t\tif (!isDirRule(child)) {\n\t\t\t\tfn(child);\n\n\t\t\t\twalk(child, fn);\n\t\t\t}\n\t\t}\n\t}\n}\n\nconst dirSelectorRegExp = /:dir\\(ltr|rtl\\)/i;\nconst isDirRule = node => node.type === 'rule' && dirSelectorRegExp.test(node.selector);\n","import stylelint from 'stylelint';\nimport { physicalProp, physical2Prop, physical4Prop, physicalValue } from './lib/maps';\nimport { validateRuleWithProps } from './lib/validate';\nimport ruleName from './lib/rule-name';\nimport messages from './lib/messages';\nimport walk from './lib/walk';\n\nconst reportedDecls = new WeakMap();\n\nfunction ruleFunc(method, opts, context) {\n\tconst propExceptions = [].concat(Object(opts).except || []);\n\tconst isAutofix = isContextAutofixing(context);\n\tconst dir = /^rtl$/i.test(Object(opts).direction) ? 'rtl' : 'ltr';\n\n\treturn (root, result) => {\n\t\t// validate the method\n\t\tconst isMethodValid = stylelint.utils.validateOptions(result, ruleName, {\n\t\t\tactual: method,\n\t\t\tpossible() {\n\t\t\t\treturn isMethodIndifferent(method) ||\n\t\t\t\t\tisMethodAlways(method)\n\t\t\t}\n\t\t});\n\n\t\tconst reportUnexpectedProperty = (decl, logicalProperty) => stylelint.utils.report({\n\t\t\tmessage: messages.unexpectedProp(decl.prop, logicalProperty),\n\t\t\tnode: decl,\n\t\t\tresult,\n\t\t\truleName\n\t\t});\n\n\t\tconst reportUnexpectedValue = (node, value) => stylelint.utils.report({\n\t\t\tmessage: messages.unexpectedValue(node.prop, node.value, value),\n\t\t\tnode,\n\t\t\tresult,\n\t\t\truleName\n\t\t});\n\n\t\tif (isMethodValid && isMethodAlways(method)) {\n\t\t\twalk(root, node => {\n\t\t\t\t// validate or autofix 4 physical properties as logical shorthands\n\t\t\t\tphysical4Prop.forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex, blockEndDecl, blockEndIndex, inlineEndDecl, inlineEndIndex) => { // eslint-disable-line\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisDeclAnException(blockStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(blockEndDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineEndDecl, propExceptions)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst firstInlineDecl = blockStartDecl;\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tconst values = [ blockStartDecl.value, inlineStartDecl.value, blockEndDecl.value, inlineEndDecl.value ];\n\n\t\t\t\t\t\t\tif (values[1] === values[3]) {\n\t\t\t\t\t\t\t\tvalues.pop();\n\n\t\t\t\t\t\t\t\tif (values[2] === values[1]) {\n\t\t\t\t\t\t\t\t\tvalues.pop();\n\n\t\t\t\t\t\t\t\t\tif (values[1] === values[0]) {\n\t\t\t\t\t\t\t\t\t\tvalues.pop();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfirstInlineDecl.cloneBefore({\n\t\t\t\t\t\t\t\tprop,\n\t\t\t\t\t\t\t\tvalue: values.length <= 2 ? values.join(' ') : `logical ${values.join(' ')}`\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tblockStartDecl.remove();\n\t\t\t\t\t\t\tinlineStartDecl.remove();\n\t\t\t\t\t\t\tblockEndDecl.remove();\n\t\t\t\t\t\t\tinlineEndDecl.remove();\n\t\t\t\t\t\t} else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl) && !isDeclReported(blockEndDecl) && !isDeclReported(inlineEndDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(firstInlineDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(blockStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(blockEndDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineEndDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix 2 physical properties as logical shorthands\n\t\t\t\tphysical2Prop().forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex) => { // eslint-disable-line\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisDeclAnException(blockStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineStartDecl, propExceptions)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst firstInlineDecl = blockStartIndex < inlineStartIndex\n\t\t\t\t\t\t\t? blockStartDecl\n\t\t\t\t\t\t: inlineStartDecl;\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tfirstInlineDecl.cloneBefore({\n\t\t\t\t\t\t\t\tprop,\n\t\t\t\t\t\t\t\tvalue: blockStartDecl.value === inlineStartDecl.value\n\t\t\t\t\t\t\t\t\t? blockStartDecl.value\n\t\t\t\t\t\t\t\t: [ blockStartDecl.value, inlineStartDecl.value ].join(' ')\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tblockStartDecl.remove();\n\t\t\t\t\t\t\tinlineStartDecl.remove();\n\t\t\t\t\t\t} else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(firstInlineDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(blockStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineStartDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix physical properties as logical\n\t\t\t\tphysicalProp(dir).forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, physicalDecl => {\n\t\t\t\t\t\tif (isDeclAnException(physicalDecl, propExceptions)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tphysicalDecl.prop = prop;\n\t\t\t\t\t\t} else if (!isDeclReported(physicalDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(physicalDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(physicalDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix physical values as logical\n\t\t\t\tphysicalValue(dir).forEach(([ regexp, props ]) => {\n\t\t\t\t\tif (!isNodeMatchingDecl(node, regexp)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDeclAnException(node, propExceptions)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst valuekey = node.value.toLowerCase();\n\n\t\t\t\t\tif (valuekey in props) {\n\t\t\t\t\t\tconst value = props[valuekey];\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tnode.value = value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treportUnexpectedValue(node, value);\n\n\t\t\t\t\t\t\treportedDecls.set(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t};\n};\nruleFunc.ruleName = ruleName;\n\nexport default stylelint.createPlugin(ruleName, ruleFunc);\n\nconst isMethodIndifferent = method => method === 'ignore' || method === false || method === null;\nconst isMethodAlways = method => method === 'always' || method === true;\nconst isContextAutofixing = context => Boolean(Object(context).fix);\nconst isNodeMatchingDecl = (decl, regexp) => decl.type === 'decl' && regexp.test(decl.prop);\n\nconst isDeclAnException = (decl, propExceptions) => {\n\tif (!decl || decl.type !== 'decl') {\n\t\treturn false;\n\t}\n\n\treturn propExceptions.some((match) => {\n\t\tif (match instanceof RegExp) {\n\t\t\treturn match.test(decl.prop);\n\t\t}\n\n\t\treturn String(match || '').toLowerCase() === String(decl.prop || '').toLowerCase();\n\t});\n}\n\nconst isDeclReported = decl => reportedDecls.has(decl);\n"],"names":[],"mappings":";;;;AAAA,MAAM,MAAM,GAAG;AACf,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE;AACrC,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM;AACjC;;AAEO,MAAM,aAAa,GAAG;AAC7B,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE;AAClD,CAAC,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE;AAC/E,CAAC,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,SAAS;AAClF,CAAC;;AAEM,MAAM,aAAa,GAAG,MAAM;AACnC,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE;AACvC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE;;AAExC,CAAC,EAAE,EAAE,YAAY,EAAE,eAAe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,GAAG,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B;;AAEA,EAAE,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE;AACpF,EAAE,CAAC;AACH;;AAEA,MAAM,cAAc,GAAG,IAAI,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;;;;"}
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import stylelint from 'stylelint';
2 | import { physicalProp, physical2Prop, physical4Prop, physicalValue } from './lib/maps';
3 | import { validateRuleWithProps } from './lib/validate';
4 | import ruleName from './lib/rule-name';
5 | import messages from './lib/messages';
6 | import walk from './lib/walk';
7 |
8 | const reportedDecls = new WeakMap();
9 |
10 | function ruleFunc(method, opts, context) {
11 | const propExceptions = [].concat(Object(opts).except || []);
12 | const isAutofix = isContextAutofixing(context);
13 | const dir = /^rtl$/i.test(Object(opts).direction) ? 'rtl' : 'ltr';
14 |
15 | return (root, result) => {
16 | // validate the method
17 | const isMethodValid = stylelint.utils.validateOptions(result, ruleName, {
18 | actual: method,
19 | possible() {
20 | return isMethodIndifferent(method) ||
21 | isMethodAlways(method)
22 | }
23 | });
24 |
25 | const reportUnexpectedProperty = (decl, logicalProperty) => stylelint.utils.report({
26 | message: messages.unexpectedProp(decl.prop, logicalProperty),
27 | node: decl,
28 | result,
29 | ruleName
30 | });
31 |
32 | const reportUnexpectedValue = (node, value) => stylelint.utils.report({
33 | message: messages.unexpectedValue(node.prop, node.value, value),
34 | node,
35 | result,
36 | ruleName
37 | });
38 |
39 | if (isMethodValid && isMethodAlways(method)) {
40 | walk(root, node => {
41 | // validate or autofix 4 physical properties as logical shorthands
42 | physical4Prop.forEach(([ props, prop ]) => {
43 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex, blockEndDecl, blockEndIndex, inlineEndDecl, inlineEndIndex) => { // eslint-disable-line
44 | if (
45 | isDeclAnException(blockStartDecl, propExceptions) ||
46 | isDeclAnException(inlineStartDecl, propExceptions) ||
47 | isDeclAnException(blockEndDecl, propExceptions) ||
48 | isDeclAnException(inlineEndDecl, propExceptions)
49 | ) {
50 | return;
51 | }
52 |
53 | const firstInlineDecl = blockStartDecl;
54 |
55 | if (isAutofix) {
56 | const values = [ blockStartDecl.value, inlineStartDecl.value, blockEndDecl.value, inlineEndDecl.value ];
57 |
58 | if (values[1] === values[3]) {
59 | values.pop();
60 |
61 | if (values[2] === values[1]) {
62 | values.pop();
63 |
64 | if (values[1] === values[0]) {
65 | values.pop();
66 | }
67 | }
68 | }
69 |
70 | firstInlineDecl.cloneBefore({
71 | prop,
72 | value: values.length <= 2 ? values.join(' ') : `logical ${values.join(' ')}`
73 | });
74 |
75 | blockStartDecl.remove();
76 | inlineStartDecl.remove();
77 | blockEndDecl.remove();
78 | inlineEndDecl.remove();
79 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl) && !isDeclReported(blockEndDecl) && !isDeclReported(inlineEndDecl)) {
80 | reportUnexpectedProperty(firstInlineDecl, prop);
81 |
82 | reportedDecls.set(blockStartDecl);
83 | reportedDecls.set(inlineStartDecl);
84 | reportedDecls.set(blockEndDecl);
85 | reportedDecls.set(inlineEndDecl);
86 | }
87 | });
88 | });
89 |
90 | // validate or autofix 2 physical properties as logical shorthands
91 | physical2Prop().forEach(([ props, prop ]) => {
92 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex) => { // eslint-disable-line
93 | if (
94 | isDeclAnException(blockStartDecl, propExceptions) ||
95 | isDeclAnException(inlineStartDecl, propExceptions)
96 | ) {
97 | return;
98 | }
99 |
100 | const firstInlineDecl = blockStartIndex < inlineStartIndex
101 | ? blockStartDecl
102 | : inlineStartDecl;
103 |
104 | if (isAutofix) {
105 | firstInlineDecl.cloneBefore({
106 | prop,
107 | value: blockStartDecl.value === inlineStartDecl.value
108 | ? blockStartDecl.value
109 | : [ blockStartDecl.value, inlineStartDecl.value ].join(' ')
110 | });
111 |
112 | blockStartDecl.remove();
113 | inlineStartDecl.remove();
114 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl)) {
115 | reportUnexpectedProperty(firstInlineDecl, prop);
116 |
117 | reportedDecls.set(blockStartDecl);
118 | reportedDecls.set(inlineStartDecl);
119 | }
120 | });
121 | });
122 |
123 | // validate or autofix physical properties as logical
124 | physicalProp(dir).forEach(([ props, prop ]) => {
125 | validateRuleWithProps(node, props, physicalDecl => {
126 | if (isDeclAnException(physicalDecl, propExceptions)) {
127 | return;
128 | }
129 |
130 | if (isAutofix) {
131 | physicalDecl.prop = prop;
132 | } else if (!isDeclReported(physicalDecl)) {
133 | reportUnexpectedProperty(physicalDecl, prop);
134 |
135 | reportedDecls.set(physicalDecl);
136 | }
137 | });
138 | });
139 |
140 | // validate or autofix physical values as logical
141 | physicalValue(dir).forEach(([ regexp, props ]) => {
142 | if (!isNodeMatchingDecl(node, regexp)) {
143 | return;
144 | }
145 |
146 | if (isDeclAnException(node, propExceptions)) {
147 | return;
148 | }
149 |
150 | const valuekey = node.value.toLowerCase();
151 |
152 | if (valuekey in props) {
153 | const value = props[valuekey];
154 |
155 | if (isAutofix) {
156 | node.value = value;
157 | } else {
158 | reportUnexpectedValue(node, value);
159 |
160 | reportedDecls.set(node);
161 | }
162 | }
163 | });
164 | });
165 | }
166 | };
167 | };
168 | ruleFunc.ruleName = ruleName;
169 |
170 | export default stylelint.createPlugin(ruleName, ruleFunc);
171 |
172 | const isMethodIndifferent = method => method === 'ignore' || method === false || method === null;
173 | const isMethodAlways = method => method === 'always' || method === true;
174 | const isContextAutofixing = context => Boolean(Object(context).fix);
175 | const isNodeMatchingDecl = (decl, regexp) => decl.type === 'decl' && regexp.test(decl.prop);
176 |
177 | const isDeclAnException = (decl, propExceptions) => {
178 | if (!decl || decl.type !== 'decl') {
179 | return false;
180 | }
181 |
182 | return propExceptions.some((match) => {
183 | if (match instanceof RegExp) {
184 | return match.test(decl.prop);
185 | }
186 |
187 | return String(match || '').toLowerCase() === String(decl.prop || '').toLowerCase();
188 | });
189 | }
190 |
191 | const isDeclReported = decl => reportedDecls.has(decl);
192 |
--------------------------------------------------------------------------------
/index.mjs:
--------------------------------------------------------------------------------
1 | import stylelint from 'stylelint';
2 |
3 | const inline = {
4 | start: { ltr: 'left', rtl: 'right' },
5 | end: { ltr: 'right', rtl: 'left' }
6 | };
7 |
8 | const physical4Prop = [
9 | [ [ 'top', 'left', 'bottom', 'right' ], 'inset' ],
10 | [ [ 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' ], 'margin' ],
11 | [ [ 'padding-top', 'padding-left', 'padding-bottom', 'padding-right' ], 'padding' ]
12 | ];
13 |
14 | const physical2Prop = () => [
15 | [ [ 'top', 'bottom' ], 'inset-block' ],
16 | [ [ 'left', 'right' ], 'inset-inline' ],
17 |
18 | [ [ 'margin-top', 'margin-bottom' ], 'margin-block' ],
19 | [ [ 'margin-left', 'margin-right' ], 'margin-inline' ],
20 |
21 | [ [ 'padding-top', 'padding-bottom' ], 'padding-block' ],
22 | [ [ 'padding-left', 'padding-right' ], 'padding-inline' ],
23 | ];
24 |
25 | const physicalProp = dir => [
26 | [ [ 'top' ], 'inset-block-start' ],
27 | [ [ 'bottom' ], 'inset-block-end' ],
28 | [ [ inline.start[dir] ], 'inset-inline-start' ],
29 | [ [ inline.end[dir] ], 'inset-inline-end' ],
30 |
31 | [ [ 'margin-top' ], 'margin-block-start' ],
32 | [ [ 'margin-bottom' ], 'margin-block-end' ],
33 | [ [ `margin-${inline.start[dir]}` ], 'margin-inline-start' ],
34 | [ [ `margin-${inline.end[dir]}` ], 'margin-inline-end' ],
35 |
36 | [ [ 'padding-top' ], 'padding-block-start' ],
37 | [ [ 'padding-bottom' ], 'padding-block-end' ],
38 | [ [ `padding-${inline.start[dir]}` ], 'padding-inline-start' ],
39 | [ [ `padding-${inline.end[dir]}` ], 'padding-inline-end' ],
40 |
41 | // width, height
42 | [ [ 'width' ], 'inline-size' ],
43 | [ [ 'min-width' ], 'min-inline-size' ],
44 | [ [ 'max-width' ], 'max-inline-size' ],
45 | [ [ 'height' ], 'block-size' ],
46 | [ [ 'min-height' ], 'min-block-size' ],
47 | [ [ 'max-height' ], 'max-block-size' ],
48 |
49 | // border
50 | [ [ 'border-top' ], 'border-block-start' ],
51 | [ [ 'border-bottom' ], 'border-block-end' ],
52 | [ [ `border-${inline.start[dir]}` ], 'border-inline-start' ],
53 | [ [ `border-${inline.end[dir]}` ], 'border-inline-end' ],
54 |
55 | [ [ 'border-top-color' ], 'border-block-start-color' ],
56 | [ [ 'border-top-style' ], 'border-block-start-style' ],
57 | [ [ 'border-top-width' ], 'border-block-start-width' ],
58 | [ [ 'border-bottom-color' ], 'border-block-end-color' ],
59 | [ [ 'border-bottom-style' ], 'border-block-end-style' ],
60 | [ [ 'border-bottom-width' ], 'border-block-end-width' ],
61 |
62 |
63 | [ [ `border-${inline.start[dir]}-color` ], 'border-inline-start-color' ],
64 | [ [ `border-${inline.start[dir]}-style` ], 'border-inline-start-style' ],
65 | [ [ `border-${inline.start[dir]}-width` ], 'border-inline-start-width' ],
66 | [ [ `border-${inline.end[dir]}-color` ], 'border-inline-end-color' ],
67 | [ [ `border-${inline.end[dir]}-style` ], 'border-inline-end-style' ],
68 | [ [ `border-${inline.end[dir]}-width` ], 'border-inline-end-width' ],
69 |
70 |
71 |
72 | [ [ `border-top-${inline.start[dir]}-radius` ], 'border-start-start-radius' ],
73 | [ [ `border-bottom-${inline.start[dir]}-radius` ], 'border-end-start-radius' ],
74 | [ [ `border-top-${inline.end[dir]}-radius` ], 'border-start-end-radius' ],
75 | [ [ `border-bottom-${inline.end[dir]}-radius` ], 'border-end-end-radius' ],
76 |
77 | ];
78 |
79 | const physicalValue = dir => [
80 | [ /^clear$/i, {
81 | [inline.start[dir]]: 'inline-start',
82 | [inline.end[dir]]: 'inline-end'
83 | }],
84 | [ /^float$/i, {
85 | [inline.start[dir]]: 'inline-start',
86 | [inline.end[dir]]: 'inline-end'
87 | }],
88 | [ /^text-align$/i, {
89 | [inline.start[dir]]: 'start',
90 | [inline.end[dir]]: 'end'
91 | }]
92 | ];
93 |
94 | const validateRuleWithProps = (root, props, fn) => {
95 | // conditionally walk nodes with children
96 | if (root.nodes && root.nodes.length) {
97 | const args = [];
98 |
99 | const hasProps = props.every(prop => {
100 | const declIndex = root.nodes.findIndex(child => child.type === 'decl' && child.prop === prop);
101 | const decl = root.nodes[declIndex];
102 |
103 | if (decl) {
104 | args.push(decl, declIndex);
105 | }
106 |
107 | return decl;
108 | });
109 |
110 | if (hasProps) {
111 | fn(...args);
112 | }
113 | }
114 | };
115 |
116 | var ruleName = 'csstools/use-logical';
117 |
118 | var messages = stylelint.utils.ruleMessages(ruleName, {
119 | unexpectedProp(physicalProperty, logicalProperty) {
120 | return `Unexpected "${physicalProperty}" property. Use "${logicalProperty}".`;
121 | },
122 | unexpectedValue(property, physicalValue, logicalValue) {
123 | return `Unexpected "${physicalValue}" value in "${property}" property. Use "${logicalValue}".`;
124 | }
125 | });
126 |
127 | // walk all container nodes
128 | function walk(node, fn) {
129 | if (node.nodes && node.nodes.length) {
130 | const nodes = node.nodes.slice();
131 | const length = nodes.length;
132 | let index = -1;
133 |
134 | while (++index < length) {
135 | const child = nodes[index];
136 |
137 | if (!isDirRule(child)) {
138 | fn(child);
139 |
140 | walk(child, fn);
141 | }
142 | }
143 | }
144 | }
145 |
146 | const dirSelectorRegExp = /:dir\(ltr|rtl\)/i;
147 | const isDirRule = node => node.type === 'rule' && dirSelectorRegExp.test(node.selector);
148 |
149 | const reportedDecls = new WeakMap();
150 |
151 | function ruleFunc(method, opts, context) {
152 | const propExceptions = [].concat(Object(opts).except || []);
153 | const isAutofix = isContextAutofixing(context);
154 | const dir = /^rtl$/i.test(Object(opts).direction) ? 'rtl' : 'ltr';
155 |
156 | return (root, result) => {
157 | // validate the method
158 | const isMethodValid = stylelint.utils.validateOptions(result, ruleName, {
159 | actual: method,
160 | possible() {
161 | return isMethodIndifferent(method) ||
162 | isMethodAlways(method)
163 | }
164 | });
165 |
166 | const reportUnexpectedProperty = (decl, logicalProperty) => stylelint.utils.report({
167 | message: messages.unexpectedProp(decl.prop, logicalProperty),
168 | node: decl,
169 | result,
170 | ruleName
171 | });
172 |
173 | const reportUnexpectedValue = (node, value) => stylelint.utils.report({
174 | message: messages.unexpectedValue(node.prop, node.value, value),
175 | node,
176 | result,
177 | ruleName
178 | });
179 |
180 | if (isMethodValid && isMethodAlways(method)) {
181 | walk(root, node => {
182 | // validate or autofix 4 physical properties as logical shorthands
183 | physical4Prop.forEach(([ props, prop ]) => {
184 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex, blockEndDecl, blockEndIndex, inlineEndDecl, inlineEndIndex) => { // eslint-disable-line
185 | if (
186 | isDeclAnException(blockStartDecl, propExceptions) ||
187 | isDeclAnException(inlineStartDecl, propExceptions) ||
188 | isDeclAnException(blockEndDecl, propExceptions) ||
189 | isDeclAnException(inlineEndDecl, propExceptions)
190 | ) {
191 | return;
192 | }
193 |
194 | const firstInlineDecl = blockStartDecl;
195 |
196 | if (isAutofix) {
197 | const values = [ blockStartDecl.value, inlineStartDecl.value, blockEndDecl.value, inlineEndDecl.value ];
198 |
199 | if (values[1] === values[3]) {
200 | values.pop();
201 |
202 | if (values[2] === values[1]) {
203 | values.pop();
204 |
205 | if (values[1] === values[0]) {
206 | values.pop();
207 | }
208 | }
209 | }
210 |
211 | firstInlineDecl.cloneBefore({
212 | prop,
213 | value: values.length <= 2 ? values.join(' ') : `logical ${values.join(' ')}`
214 | });
215 |
216 | blockStartDecl.remove();
217 | inlineStartDecl.remove();
218 | blockEndDecl.remove();
219 | inlineEndDecl.remove();
220 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl) && !isDeclReported(blockEndDecl) && !isDeclReported(inlineEndDecl)) {
221 | reportUnexpectedProperty(firstInlineDecl, prop);
222 |
223 | reportedDecls.set(blockStartDecl);
224 | reportedDecls.set(inlineStartDecl);
225 | reportedDecls.set(blockEndDecl);
226 | reportedDecls.set(inlineEndDecl);
227 | }
228 | });
229 | });
230 |
231 | // validate or autofix 2 physical properties as logical shorthands
232 | physical2Prop().forEach(([ props, prop ]) => {
233 | validateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex) => { // eslint-disable-line
234 | if (
235 | isDeclAnException(blockStartDecl, propExceptions) ||
236 | isDeclAnException(inlineStartDecl, propExceptions)
237 | ) {
238 | return;
239 | }
240 |
241 | const firstInlineDecl = blockStartIndex < inlineStartIndex
242 | ? blockStartDecl
243 | : inlineStartDecl;
244 |
245 | if (isAutofix) {
246 | firstInlineDecl.cloneBefore({
247 | prop,
248 | value: blockStartDecl.value === inlineStartDecl.value
249 | ? blockStartDecl.value
250 | : [ blockStartDecl.value, inlineStartDecl.value ].join(' ')
251 | });
252 |
253 | blockStartDecl.remove();
254 | inlineStartDecl.remove();
255 | } else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl)) {
256 | reportUnexpectedProperty(firstInlineDecl, prop);
257 |
258 | reportedDecls.set(blockStartDecl);
259 | reportedDecls.set(inlineStartDecl);
260 | }
261 | });
262 | });
263 |
264 | // validate or autofix physical properties as logical
265 | physicalProp(dir).forEach(([ props, prop ]) => {
266 | validateRuleWithProps(node, props, physicalDecl => {
267 | if (isDeclAnException(physicalDecl, propExceptions)) {
268 | return;
269 | }
270 |
271 | if (isAutofix) {
272 | physicalDecl.prop = prop;
273 | } else if (!isDeclReported(physicalDecl)) {
274 | reportUnexpectedProperty(physicalDecl, prop);
275 |
276 | reportedDecls.set(physicalDecl);
277 | }
278 | });
279 | });
280 |
281 | // validate or autofix physical values as logical
282 | physicalValue(dir).forEach(([ regexp, props ]) => {
283 | if (!isNodeMatchingDecl(node, regexp)) {
284 | return;
285 | }
286 |
287 | if (isDeclAnException(node, propExceptions)) {
288 | return;
289 | }
290 |
291 | const valuekey = node.value.toLowerCase();
292 |
293 | if (valuekey in props) {
294 | const value = props[valuekey];
295 |
296 | if (isAutofix) {
297 | node.value = value;
298 | } else {
299 | reportUnexpectedValue(node, value);
300 |
301 | reportedDecls.set(node);
302 | }
303 | }
304 | });
305 | });
306 | }
307 | };
308 | }ruleFunc.ruleName = ruleName;
309 |
310 | var index = stylelint.createPlugin(ruleName, ruleFunc);
311 |
312 | const isMethodIndifferent = method => method === 'ignore' || method === false || method === null;
313 | const isMethodAlways = method => method === 'always' || method === true;
314 | const isContextAutofixing = context => Boolean(Object(context).fix);
315 | const isNodeMatchingDecl = (decl, regexp) => decl.type === 'decl' && regexp.test(decl.prop);
316 |
317 | const isDeclAnException = (decl, propExceptions) => {
318 | if (!decl || decl.type !== 'decl') {
319 | return false;
320 | }
321 |
322 | return propExceptions.some((match) => {
323 | if (match instanceof RegExp) {
324 | return match.test(decl.prop);
325 | }
326 |
327 | return String(match || '').toLowerCase() === String(decl.prop || '').toLowerCase();
328 | });
329 | };
330 |
331 | const isDeclReported = decl => reportedDecls.has(decl);
332 |
333 | export { index as default };
334 | //# sourceMappingURL=index.mjs.map
335 |
--------------------------------------------------------------------------------
/index.mjs.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.mjs","sources":["lib/maps.js","lib/validate.js","lib/rule-name.js","lib/messages.js","lib/walk.js","index.js"],"sourcesContent":["const inline = {\n\tstart: { ltr: 'left', rtl: 'right' },\n\tend: { ltr: 'right', rtl: 'left' }\n}\n\nexport const physical4Prop = [\n\t[ [ 'top', 'left', 'bottom', 'right' ], 'inset' ],\n\t[ [ 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' ], 'margin' ],\n\t[ [ 'padding-top', 'padding-left', 'padding-bottom', 'padding-right' ], 'padding' ]\n];\n\nexport const physical2Prop = () => [\n\t[ [ 'top', 'bottom' ], 'inset-block' ],\n\t[ [ 'left', 'right' ], 'inset-inline' ],\n\n\t[ [ 'margin-top', 'margin-bottom' ], 'margin-block' ],\n\t[ [ 'margin-left', 'margin-right' ], 'margin-inline' ],\n\n\t[ [ 'padding-top', 'padding-bottom' ], 'padding-block' ],\n\t[ [ 'padding-left', 'padding-right' ], 'padding-inline' ],\n];\n\nexport const physicalProp = dir => [\n\t[ [ 'top' ], 'inset-block-start' ],\n\t[ [ 'bottom' ], 'inset-block-end' ],\n\t[ [ inline.start[dir] ], 'inset-inline-start' ],\n\t[ [ inline.end[dir] ], 'inset-inline-end' ],\n\n\t[ [ 'margin-top' ], 'margin-block-start' ],\n\t[ [ 'margin-bottom' ], 'margin-block-end' ],\n\t[ [ `margin-${inline.start[dir]}` ], 'margin-inline-start' ],\n\t[ [ `margin-${inline.end[dir]}` ], 'margin-inline-end' ],\n\n\t[ [ 'padding-top' ], 'padding-block-start' ],\n\t[ [ 'padding-bottom' ], 'padding-block-end' ],\n\t[ [ `padding-${inline.start[dir]}` ], 'padding-inline-start' ],\n\t[ [ `padding-${inline.end[dir]}` ], 'padding-inline-end' ],\n\n\t// width, height\n\t[ [ 'width' ], 'inline-size' ],\n\t[ [ 'min-width' ], 'min-inline-size' ],\n\t[ [ 'max-width' ], 'max-inline-size' ],\n\t[ [ 'height' ], 'block-size' ],\n\t[ [ 'min-height' ], 'min-block-size' ],\n\t[ [ 'max-height' ], 'max-block-size' ],\n\n\t// border\n\t[ [ 'border-top' ], 'border-block-start' ],\n\t[ [ 'border-bottom' ], 'border-block-end' ],\n\t[ [ `border-${inline.start[dir]}` ], 'border-inline-start' ],\n\t[ [ `border-${inline.end[dir]}` ], 'border-inline-end' ],\n\n\t[ [ 'border-top-color' ], 'border-block-start-color' ],\n\t[ [ 'border-top-style' ], 'border-block-start-style' ],\n\t[ [ 'border-top-width' ], 'border-block-start-width' ],\n\t[ [ 'border-bottom-color' ], 'border-block-end-color' ],\n\t[ [ 'border-bottom-style' ], 'border-block-end-style' ],\n\t[ [ 'border-bottom-width' ], 'border-block-end-width' ],\n\n\n\t[ [ `border-${inline.start[dir]}-color` ], 'border-inline-start-color' ],\n\t[ [ `border-${inline.start[dir]}-style` ], 'border-inline-start-style' ],\n\t[ [ `border-${inline.start[dir]}-width` ], 'border-inline-start-width' ],\n\t[ [ `border-${inline.end[dir]}-color` ], 'border-inline-end-color' ],\n\t[ [ `border-${inline.end[dir]}-style` ], 'border-inline-end-style' ],\n\t[ [ `border-${inline.end[dir]}-width` ], 'border-inline-end-width' ],\n\n\n\n\t[ [ `border-top-${inline.start[dir]}-radius` ], 'border-start-start-radius' ],\n\t[ [ `border-bottom-${inline.start[dir]}-radius` ], 'border-end-start-radius' ],\n\t[ [ `border-top-${inline.end[dir]}-radius` ], 'border-start-end-radius' ],\n\t[ [ `border-bottom-${inline.end[dir]}-radius` ], 'border-end-end-radius' ],\n\n];\n\nexport const physicalValue = dir => [\n\t[ /^clear$/i, {\n\t\t[inline.start[dir]]: 'inline-start',\n\t\t[inline.end[dir]]: 'inline-end'\n\t}],\n\t[ /^float$/i, {\n\t\t[inline.start[dir]]: 'inline-start',\n\t\t[inline.end[dir]]: 'inline-end'\n\t}],\n\t[ /^text-align$/i, {\n\t\t[inline.start[dir]]: 'start',\n\t\t[inline.end[dir]]: 'end'\n\t}]\n];\n","export const validateRuleWithProps = (root, props, fn) => {\n\t// conditionally walk nodes with children\n\tif (root.nodes && root.nodes.length) {\n\t\tconst args = [];\n\n\t\tconst hasProps = props.every(prop => {\n\t\t\tconst declIndex = root.nodes.findIndex(child => child.type === 'decl' && child.prop === prop);\n\t\t\tconst decl = root.nodes[declIndex];\n\n\t\t\tif (decl) {\n\t\t\t\targs.push(decl, declIndex);\n\t\t\t}\n\n\t\t\treturn decl;\n\t\t});\n\n\t\tif (hasProps) {\n\t\t\tfn(...args);\n\t\t}\n\t}\n};\n","export default 'csstools/use-logical';\n","import stylelint from 'stylelint';\nimport ruleName from './rule-name';\n\nexport default stylelint.utils.ruleMessages(ruleName, {\n\tunexpectedProp(physicalProperty, logicalProperty) {\n\t\treturn `Unexpected \"${physicalProperty}\" property. Use \"${logicalProperty}\".`;\n\t},\n\tunexpectedValue(property, physicalValue, logicalValue) {\n\t\treturn `Unexpected \"${physicalValue}\" value in \"${property}\" property. Use \"${logicalValue}\".`;\n\t}\n});\n","// walk all container nodes\nexport default function walk(node, fn) {\n\tif (node.nodes && node.nodes.length) {\n\t\tconst nodes = node.nodes.slice();\n\t\tconst length = nodes.length;\n\t\tlet index = -1;\n\n\t\twhile (++index < length) {\n\t\t\tconst child = nodes[index];\n\n\t\t\tif (!isDirRule(child)) {\n\t\t\t\tfn(child);\n\n\t\t\t\twalk(child, fn);\n\t\t\t}\n\t\t}\n\t}\n}\n\nconst dirSelectorRegExp = /:dir\\(ltr|rtl\\)/i;\nconst isDirRule = node => node.type === 'rule' && dirSelectorRegExp.test(node.selector);\n","import stylelint from 'stylelint';\nimport { physicalProp, physical2Prop, physical4Prop, physicalValue } from './lib/maps';\nimport { validateRuleWithProps } from './lib/validate';\nimport ruleName from './lib/rule-name';\nimport messages from './lib/messages';\nimport walk from './lib/walk';\n\nconst reportedDecls = new WeakMap();\n\nfunction ruleFunc(method, opts, context) {\n\tconst propExceptions = [].concat(Object(opts).except || []);\n\tconst isAutofix = isContextAutofixing(context);\n\tconst dir = /^rtl$/i.test(Object(opts).direction) ? 'rtl' : 'ltr';\n\n\treturn (root, result) => {\n\t\t// validate the method\n\t\tconst isMethodValid = stylelint.utils.validateOptions(result, ruleName, {\n\t\t\tactual: method,\n\t\t\tpossible() {\n\t\t\t\treturn isMethodIndifferent(method) ||\n\t\t\t\t\tisMethodAlways(method)\n\t\t\t}\n\t\t});\n\n\t\tconst reportUnexpectedProperty = (decl, logicalProperty) => stylelint.utils.report({\n\t\t\tmessage: messages.unexpectedProp(decl.prop, logicalProperty),\n\t\t\tnode: decl,\n\t\t\tresult,\n\t\t\truleName\n\t\t});\n\n\t\tconst reportUnexpectedValue = (node, value) => stylelint.utils.report({\n\t\t\tmessage: messages.unexpectedValue(node.prop, node.value, value),\n\t\t\tnode,\n\t\t\tresult,\n\t\t\truleName\n\t\t});\n\n\t\tif (isMethodValid && isMethodAlways(method)) {\n\t\t\twalk(root, node => {\n\t\t\t\t// validate or autofix 4 physical properties as logical shorthands\n\t\t\t\tphysical4Prop.forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex, blockEndDecl, blockEndIndex, inlineEndDecl, inlineEndIndex) => { // eslint-disable-line\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisDeclAnException(blockStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(blockEndDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineEndDecl, propExceptions)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst firstInlineDecl = blockStartDecl;\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tconst values = [ blockStartDecl.value, inlineStartDecl.value, blockEndDecl.value, inlineEndDecl.value ];\n\n\t\t\t\t\t\t\tif (values[1] === values[3]) {\n\t\t\t\t\t\t\t\tvalues.pop();\n\n\t\t\t\t\t\t\t\tif (values[2] === values[1]) {\n\t\t\t\t\t\t\t\t\tvalues.pop();\n\n\t\t\t\t\t\t\t\t\tif (values[1] === values[0]) {\n\t\t\t\t\t\t\t\t\t\tvalues.pop();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfirstInlineDecl.cloneBefore({\n\t\t\t\t\t\t\t\tprop,\n\t\t\t\t\t\t\t\tvalue: values.length <= 2 ? values.join(' ') : `logical ${values.join(' ')}`\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tblockStartDecl.remove();\n\t\t\t\t\t\t\tinlineStartDecl.remove();\n\t\t\t\t\t\t\tblockEndDecl.remove();\n\t\t\t\t\t\t\tinlineEndDecl.remove();\n\t\t\t\t\t\t} else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl) && !isDeclReported(blockEndDecl) && !isDeclReported(inlineEndDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(firstInlineDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(blockStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(blockEndDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineEndDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix 2 physical properties as logical shorthands\n\t\t\t\tphysical2Prop().forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, (blockStartDecl, blockStartIndex, inlineStartDecl, inlineStartIndex) => { // eslint-disable-line\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tisDeclAnException(blockStartDecl, propExceptions) ||\n\t\t\t\t\t\t\tisDeclAnException(inlineStartDecl, propExceptions)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst firstInlineDecl = blockStartIndex < inlineStartIndex\n\t\t\t\t\t\t\t? blockStartDecl\n\t\t\t\t\t\t: inlineStartDecl;\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tfirstInlineDecl.cloneBefore({\n\t\t\t\t\t\t\t\tprop,\n\t\t\t\t\t\t\t\tvalue: blockStartDecl.value === inlineStartDecl.value\n\t\t\t\t\t\t\t\t\t? blockStartDecl.value\n\t\t\t\t\t\t\t\t: [ blockStartDecl.value, inlineStartDecl.value ].join(' ')\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tblockStartDecl.remove();\n\t\t\t\t\t\t\tinlineStartDecl.remove();\n\t\t\t\t\t\t} else if (!isDeclReported(blockStartDecl) && !isDeclReported(inlineStartDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(firstInlineDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(blockStartDecl);\n\t\t\t\t\t\t\treportedDecls.set(inlineStartDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix physical properties as logical\n\t\t\t\tphysicalProp(dir).forEach(([ props, prop ]) => {\n\t\t\t\t\tvalidateRuleWithProps(node, props, physicalDecl => {\n\t\t\t\t\t\tif (isDeclAnException(physicalDecl, propExceptions)) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tphysicalDecl.prop = prop;\n\t\t\t\t\t\t} else if (!isDeclReported(physicalDecl)) {\n\t\t\t\t\t\t\treportUnexpectedProperty(physicalDecl, prop);\n\n\t\t\t\t\t\t\treportedDecls.set(physicalDecl);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t// validate or autofix physical values as logical\n\t\t\t\tphysicalValue(dir).forEach(([ regexp, props ]) => {\n\t\t\t\t\tif (!isNodeMatchingDecl(node, regexp)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isDeclAnException(node, propExceptions)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst valuekey = node.value.toLowerCase();\n\n\t\t\t\t\tif (valuekey in props) {\n\t\t\t\t\t\tconst value = props[valuekey];\n\n\t\t\t\t\t\tif (isAutofix) {\n\t\t\t\t\t\t\tnode.value = value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treportUnexpectedValue(node, value);\n\n\t\t\t\t\t\t\treportedDecls.set(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t};\n};\nruleFunc.ruleName = ruleName;\n\nexport default stylelint.createPlugin(ruleName, ruleFunc);\n\nconst isMethodIndifferent = method => method === 'ignore' || method === false || method === null;\nconst isMethodAlways = method => method === 'always' || method === true;\nconst isContextAutofixing = context => Boolean(Object(context).fix);\nconst isNodeMatchingDecl = (decl, regexp) => decl.type === 'decl' && regexp.test(decl.prop);\n\nconst isDeclAnException = (decl, propExceptions) => {\n\tif (!decl || decl.type !== 'decl') {\n\t\treturn false;\n\t}\n\n\treturn propExceptions.some((match) => {\n\t\tif (match instanceof RegExp) {\n\t\t\treturn match.test(decl.prop);\n\t\t}\n\n\t\treturn String(match || '').toLowerCase() === String(decl.prop || '').toLowerCase();\n\t});\n}\n\nconst isDeclReported = decl => reportedDecls.has(decl);\n"],"names":[],"mappings":";;AAAA,MAAM,MAAM,GAAG;AACf,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE;AACrC,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM;AACjC;;AAEO,MAAM,aAAa,GAAG;AAC7B,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE;AAClD,CAAC,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE;AAC/E,CAAC,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,EAAE,SAAS;AAClF,CAAC;;AAEM,MAAM,aAAa,GAAG,MAAM;AACnC,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE;AACvC,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE;;AAExC,CAAC,EAAE,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,cAAc,EAAE;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IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B;;AAEA,EAAE,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE;AACpF,EAAE,CAAC;AACH;;AAEA,MAAM,cAAc,GAAG,IAAI,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC;;;;"}
--------------------------------------------------------------------------------
/lib/maps.js:
--------------------------------------------------------------------------------
1 | const inline = {
2 | start: { ltr: 'left', rtl: 'right' },
3 | end: { ltr: 'right', rtl: 'left' }
4 | }
5 |
6 | export const physical4Prop = [
7 | [ [ 'top', 'left', 'bottom', 'right' ], 'inset' ],
8 | [ [ 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' ], 'margin' ],
9 | [ [ 'padding-top', 'padding-left', 'padding-bottom', 'padding-right' ], 'padding' ]
10 | ];
11 |
12 | export const physical2Prop = () => [
13 | [ [ 'top', 'bottom' ], 'inset-block' ],
14 | [ [ 'left', 'right' ], 'inset-inline' ],
15 |
16 | [ [ 'margin-top', 'margin-bottom' ], 'margin-block' ],
17 | [ [ 'margin-left', 'margin-right' ], 'margin-inline' ],
18 |
19 | [ [ 'padding-top', 'padding-bottom' ], 'padding-block' ],
20 | [ [ 'padding-left', 'padding-right' ], 'padding-inline' ],
21 | ];
22 |
23 | export const physicalProp = dir => [
24 | [ [ 'top' ], 'inset-block-start' ],
25 | [ [ 'bottom' ], 'inset-block-end' ],
26 | [ [ inline.start[dir] ], 'inset-inline-start' ],
27 | [ [ inline.end[dir] ], 'inset-inline-end' ],
28 |
29 | [ [ 'margin-top' ], 'margin-block-start' ],
30 | [ [ 'margin-bottom' ], 'margin-block-end' ],
31 | [ [ `margin-${inline.start[dir]}` ], 'margin-inline-start' ],
32 | [ [ `margin-${inline.end[dir]}` ], 'margin-inline-end' ],
33 |
34 | [ [ 'padding-top' ], 'padding-block-start' ],
35 | [ [ 'padding-bottom' ], 'padding-block-end' ],
36 | [ [ `padding-${inline.start[dir]}` ], 'padding-inline-start' ],
37 | [ [ `padding-${inline.end[dir]}` ], 'padding-inline-end' ],
38 |
39 | // width, height
40 | [ [ 'width' ], 'inline-size' ],
41 | [ [ 'min-width' ], 'min-inline-size' ],
42 | [ [ 'max-width' ], 'max-inline-size' ],
43 | [ [ 'height' ], 'block-size' ],
44 | [ [ 'min-height' ], 'min-block-size' ],
45 | [ [ 'max-height' ], 'max-block-size' ],
46 |
47 | // border
48 | [ [ 'border-top' ], 'border-block-start' ],
49 | [ [ 'border-bottom' ], 'border-block-end' ],
50 | [ [ `border-${inline.start[dir]}` ], 'border-inline-start' ],
51 | [ [ `border-${inline.end[dir]}` ], 'border-inline-end' ],
52 |
53 | [ [ 'border-top-color' ], 'border-block-start-color' ],
54 | [ [ 'border-top-style' ], 'border-block-start-style' ],
55 | [ [ 'border-top-width' ], 'border-block-start-width' ],
56 | [ [ 'border-bottom-color' ], 'border-block-end-color' ],
57 | [ [ 'border-bottom-style' ], 'border-block-end-style' ],
58 | [ [ 'border-bottom-width' ], 'border-block-end-width' ],
59 |
60 |
61 | [ [ `border-${inline.start[dir]}-color` ], 'border-inline-start-color' ],
62 | [ [ `border-${inline.start[dir]}-style` ], 'border-inline-start-style' ],
63 | [ [ `border-${inline.start[dir]}-width` ], 'border-inline-start-width' ],
64 | [ [ `border-${inline.end[dir]}-color` ], 'border-inline-end-color' ],
65 | [ [ `border-${inline.end[dir]}-style` ], 'border-inline-end-style' ],
66 | [ [ `border-${inline.end[dir]}-width` ], 'border-inline-end-width' ],
67 |
68 |
69 |
70 | [ [ `border-top-${inline.start[dir]}-radius` ], 'border-start-start-radius' ],
71 | [ [ `border-bottom-${inline.start[dir]}-radius` ], 'border-end-start-radius' ],
72 | [ [ `border-top-${inline.end[dir]}-radius` ], 'border-start-end-radius' ],
73 | [ [ `border-bottom-${inline.end[dir]}-radius` ], 'border-end-end-radius' ],
74 |
75 | ];
76 |
77 | export const physicalValue = dir => [
78 | [ /^clear$/i, {
79 | [inline.start[dir]]: 'inline-start',
80 | [inline.end[dir]]: 'inline-end'
81 | }],
82 | [ /^float$/i, {
83 | [inline.start[dir]]: 'inline-start',
84 | [inline.end[dir]]: 'inline-end'
85 | }],
86 | [ /^text-align$/i, {
87 | [inline.start[dir]]: 'start',
88 | [inline.end[dir]]: 'end'
89 | }]
90 | ];
91 |
--------------------------------------------------------------------------------
/lib/messages.js:
--------------------------------------------------------------------------------
1 | import stylelint from 'stylelint';
2 | import ruleName from './rule-name';
3 |
4 | export default stylelint.utils.ruleMessages(ruleName, {
5 | unexpectedProp(physicalProperty, logicalProperty) {
6 | return `Unexpected "${physicalProperty}" property. Use "${logicalProperty}".`;
7 | },
8 | unexpectedValue(property, physicalValue, logicalValue) {
9 | return `Unexpected "${physicalValue}" value in "${property}" property. Use "${logicalValue}".`;
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/lib/rule-name.js:
--------------------------------------------------------------------------------
1 | export default 'csstools/use-logical';
2 |
--------------------------------------------------------------------------------
/lib/validate.js:
--------------------------------------------------------------------------------
1 | export const validateRuleWithProps = (root, props, fn) => {
2 | // conditionally walk nodes with children
3 | if (root.nodes && root.nodes.length) {
4 | const args = [];
5 |
6 | const hasProps = props.every(prop => {
7 | const declIndex = root.nodes.findIndex(child => child.type === 'decl' && child.prop === prop);
8 | const decl = root.nodes[declIndex];
9 |
10 | if (decl) {
11 | args.push(decl, declIndex);
12 | }
13 |
14 | return decl;
15 | });
16 |
17 | if (hasProps) {
18 | fn(...args);
19 | }
20 | }
21 | };
22 |
--------------------------------------------------------------------------------
/lib/walk.js:
--------------------------------------------------------------------------------
1 | // walk all container nodes
2 | export default function walk(node, fn) {
3 | if (node.nodes && node.nodes.length) {
4 | const nodes = node.nodes.slice();
5 | const length = nodes.length;
6 | let index = -1;
7 |
8 | while (++index < length) {
9 | const child = nodes[index];
10 |
11 | if (!isDirRule(child)) {
12 | fn(child);
13 |
14 | walk(child, fn);
15 | }
16 | }
17 | }
18 | }
19 |
20 | const dirSelectorRegExp = /:dir\(ltr|rtl\)/i;
21 | const isDirRule = node => node.type === 'rule' && dirSelectorRegExp.test(node.selector);
22 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stylelint-use-logical",
3 | "version": "2.1.2",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "stylelint-use-logical",
9 | "version": "2.1.2",
10 | "license": "CC0-1.0",
11 | "devDependencies": {
12 | "rollup": "^4.0.0",
13 | "stylelint": "^16.0.0",
14 | "stylelint-tape": "^5.0.0"
15 | },
16 | "engines": {
17 | "node": ">=14.0.0"
18 | },
19 | "peerDependencies": {
20 | "stylelint": ">= 11 < 17"
21 | }
22 | },
23 | "node_modules/@babel/code-frame": {
24 | "version": "7.26.2",
25 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
26 | "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
27 | "dev": true,
28 | "license": "MIT",
29 | "dependencies": {
30 | "@babel/helper-validator-identifier": "^7.25.9",
31 | "js-tokens": "^4.0.0",
32 | "picocolors": "^1.0.0"
33 | },
34 | "engines": {
35 | "node": ">=6.9.0"
36 | }
37 | },
38 | "node_modules/@babel/helper-validator-identifier": {
39 | "version": "7.25.9",
40 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
41 | "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
42 | "dev": true,
43 | "license": "MIT",
44 | "engines": {
45 | "node": ">=6.9.0"
46 | }
47 | },
48 | "node_modules/@csstools/css-parser-algorithms": {
49 | "version": "3.0.4",
50 | "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz",
51 | "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==",
52 | "dev": true,
53 | "funding": [
54 | {
55 | "type": "github",
56 | "url": "https://github.com/sponsors/csstools"
57 | },
58 | {
59 | "type": "opencollective",
60 | "url": "https://opencollective.com/csstools"
61 | }
62 | ],
63 | "license": "MIT",
64 | "engines": {
65 | "node": ">=18"
66 | },
67 | "peerDependencies": {
68 | "@csstools/css-tokenizer": "^3.0.3"
69 | }
70 | },
71 | "node_modules/@csstools/css-tokenizer": {
72 | "version": "3.0.3",
73 | "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz",
74 | "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==",
75 | "dev": true,
76 | "funding": [
77 | {
78 | "type": "github",
79 | "url": "https://github.com/sponsors/csstools"
80 | },
81 | {
82 | "type": "opencollective",
83 | "url": "https://opencollective.com/csstools"
84 | }
85 | ],
86 | "license": "MIT",
87 | "engines": {
88 | "node": ">=18"
89 | }
90 | },
91 | "node_modules/@csstools/media-query-list-parser": {
92 | "version": "4.0.2",
93 | "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-4.0.2.tgz",
94 | "integrity": "sha512-EUos465uvVvMJehckATTlNqGj4UJWkTmdWuDMjqvSUkjGpmOyFZBVwb4knxCm/k2GMTXY+c/5RkdndzFYWeX5A==",
95 | "dev": true,
96 | "funding": [
97 | {
98 | "type": "github",
99 | "url": "https://github.com/sponsors/csstools"
100 | },
101 | {
102 | "type": "opencollective",
103 | "url": "https://opencollective.com/csstools"
104 | }
105 | ],
106 | "license": "MIT",
107 | "engines": {
108 | "node": ">=18"
109 | },
110 | "peerDependencies": {
111 | "@csstools/css-parser-algorithms": "^3.0.4",
112 | "@csstools/css-tokenizer": "^3.0.3"
113 | }
114 | },
115 | "node_modules/@csstools/selector-specificity": {
116 | "version": "5.0.0",
117 | "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-5.0.0.tgz",
118 | "integrity": "sha512-PCqQV3c4CoVm3kdPhyeZ07VmBRdH2EpMFA/pd9OASpOEC3aXNGoqPDAZ80D0cLpMBxnmk0+yNhGsEx31hq7Gtw==",
119 | "dev": true,
120 | "funding": [
121 | {
122 | "type": "github",
123 | "url": "https://github.com/sponsors/csstools"
124 | },
125 | {
126 | "type": "opencollective",
127 | "url": "https://opencollective.com/csstools"
128 | }
129 | ],
130 | "license": "MIT-0",
131 | "engines": {
132 | "node": ">=18"
133 | },
134 | "peerDependencies": {
135 | "postcss-selector-parser": "^7.0.0"
136 | }
137 | },
138 | "node_modules/@dual-bundle/import-meta-resolve": {
139 | "version": "4.1.0",
140 | "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz",
141 | "integrity": "sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==",
142 | "dev": true,
143 | "license": "MIT",
144 | "funding": {
145 | "type": "github",
146 | "url": "https://github.com/sponsors/wooorm"
147 | }
148 | },
149 | "node_modules/@nodelib/fs.scandir": {
150 | "version": "2.1.5",
151 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
152 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
153 | "dev": true,
154 | "license": "MIT",
155 | "dependencies": {
156 | "@nodelib/fs.stat": "2.0.5",
157 | "run-parallel": "^1.1.9"
158 | },
159 | "engines": {
160 | "node": ">= 8"
161 | }
162 | },
163 | "node_modules/@nodelib/fs.stat": {
164 | "version": "2.0.5",
165 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
166 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
167 | "dev": true,
168 | "license": "MIT",
169 | "engines": {
170 | "node": ">= 8"
171 | }
172 | },
173 | "node_modules/@nodelib/fs.walk": {
174 | "version": "1.2.8",
175 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
176 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
177 | "dev": true,
178 | "license": "MIT",
179 | "dependencies": {
180 | "@nodelib/fs.scandir": "2.1.5",
181 | "fastq": "^1.6.0"
182 | },
183 | "engines": {
184 | "node": ">= 8"
185 | }
186 | },
187 | "node_modules/@rollup/rollup-android-arm-eabi": {
188 | "version": "4.29.1",
189 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz",
190 | "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==",
191 | "cpu": [
192 | "arm"
193 | ],
194 | "dev": true,
195 | "license": "MIT",
196 | "optional": true,
197 | "os": [
198 | "android"
199 | ]
200 | },
201 | "node_modules/@rollup/rollup-android-arm64": {
202 | "version": "4.29.1",
203 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz",
204 | "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==",
205 | "cpu": [
206 | "arm64"
207 | ],
208 | "dev": true,
209 | "license": "MIT",
210 | "optional": true,
211 | "os": [
212 | "android"
213 | ]
214 | },
215 | "node_modules/@rollup/rollup-darwin-arm64": {
216 | "version": "4.29.1",
217 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz",
218 | "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==",
219 | "cpu": [
220 | "arm64"
221 | ],
222 | "dev": true,
223 | "license": "MIT",
224 | "optional": true,
225 | "os": [
226 | "darwin"
227 | ]
228 | },
229 | "node_modules/@rollup/rollup-darwin-x64": {
230 | "version": "4.29.1",
231 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz",
232 | "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==",
233 | "cpu": [
234 | "x64"
235 | ],
236 | "dev": true,
237 | "license": "MIT",
238 | "optional": true,
239 | "os": [
240 | "darwin"
241 | ]
242 | },
243 | "node_modules/@rollup/rollup-freebsd-arm64": {
244 | "version": "4.29.1",
245 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz",
246 | "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==",
247 | "cpu": [
248 | "arm64"
249 | ],
250 | "dev": true,
251 | "license": "MIT",
252 | "optional": true,
253 | "os": [
254 | "freebsd"
255 | ]
256 | },
257 | "node_modules/@rollup/rollup-freebsd-x64": {
258 | "version": "4.29.1",
259 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz",
260 | "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==",
261 | "cpu": [
262 | "x64"
263 | ],
264 | "dev": true,
265 | "license": "MIT",
266 | "optional": true,
267 | "os": [
268 | "freebsd"
269 | ]
270 | },
271 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
272 | "version": "4.29.1",
273 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz",
274 | "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==",
275 | "cpu": [
276 | "arm"
277 | ],
278 | "dev": true,
279 | "license": "MIT",
280 | "optional": true,
281 | "os": [
282 | "linux"
283 | ]
284 | },
285 | "node_modules/@rollup/rollup-linux-arm-musleabihf": {
286 | "version": "4.29.1",
287 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz",
288 | "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==",
289 | "cpu": [
290 | "arm"
291 | ],
292 | "dev": true,
293 | "license": "MIT",
294 | "optional": true,
295 | "os": [
296 | "linux"
297 | ]
298 | },
299 | "node_modules/@rollup/rollup-linux-arm64-gnu": {
300 | "version": "4.29.1",
301 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz",
302 | "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==",
303 | "cpu": [
304 | "arm64"
305 | ],
306 | "dev": true,
307 | "license": "MIT",
308 | "optional": true,
309 | "os": [
310 | "linux"
311 | ]
312 | },
313 | "node_modules/@rollup/rollup-linux-arm64-musl": {
314 | "version": "4.29.1",
315 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz",
316 | "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==",
317 | "cpu": [
318 | "arm64"
319 | ],
320 | "dev": true,
321 | "license": "MIT",
322 | "optional": true,
323 | "os": [
324 | "linux"
325 | ]
326 | },
327 | "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
328 | "version": "4.29.1",
329 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz",
330 | "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==",
331 | "cpu": [
332 | "loong64"
333 | ],
334 | "dev": true,
335 | "license": "MIT",
336 | "optional": true,
337 | "os": [
338 | "linux"
339 | ]
340 | },
341 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
342 | "version": "4.29.1",
343 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz",
344 | "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==",
345 | "cpu": [
346 | "ppc64"
347 | ],
348 | "dev": true,
349 | "license": "MIT",
350 | "optional": true,
351 | "os": [
352 | "linux"
353 | ]
354 | },
355 | "node_modules/@rollup/rollup-linux-riscv64-gnu": {
356 | "version": "4.29.1",
357 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz",
358 | "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==",
359 | "cpu": [
360 | "riscv64"
361 | ],
362 | "dev": true,
363 | "license": "MIT",
364 | "optional": true,
365 | "os": [
366 | "linux"
367 | ]
368 | },
369 | "node_modules/@rollup/rollup-linux-s390x-gnu": {
370 | "version": "4.29.1",
371 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz",
372 | "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==",
373 | "cpu": [
374 | "s390x"
375 | ],
376 | "dev": true,
377 | "license": "MIT",
378 | "optional": true,
379 | "os": [
380 | "linux"
381 | ]
382 | },
383 | "node_modules/@rollup/rollup-linux-x64-gnu": {
384 | "version": "4.29.1",
385 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz",
386 | "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==",
387 | "cpu": [
388 | "x64"
389 | ],
390 | "dev": true,
391 | "license": "MIT",
392 | "optional": true,
393 | "os": [
394 | "linux"
395 | ]
396 | },
397 | "node_modules/@rollup/rollup-linux-x64-musl": {
398 | "version": "4.29.1",
399 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz",
400 | "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==",
401 | "cpu": [
402 | "x64"
403 | ],
404 | "dev": true,
405 | "license": "MIT",
406 | "optional": true,
407 | "os": [
408 | "linux"
409 | ]
410 | },
411 | "node_modules/@rollup/rollup-win32-arm64-msvc": {
412 | "version": "4.29.1",
413 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz",
414 | "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==",
415 | "cpu": [
416 | "arm64"
417 | ],
418 | "dev": true,
419 | "license": "MIT",
420 | "optional": true,
421 | "os": [
422 | "win32"
423 | ]
424 | },
425 | "node_modules/@rollup/rollup-win32-ia32-msvc": {
426 | "version": "4.29.1",
427 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz",
428 | "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==",
429 | "cpu": [
430 | "ia32"
431 | ],
432 | "dev": true,
433 | "license": "MIT",
434 | "optional": true,
435 | "os": [
436 | "win32"
437 | ]
438 | },
439 | "node_modules/@rollup/rollup-win32-x64-msvc": {
440 | "version": "4.29.1",
441 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz",
442 | "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==",
443 | "cpu": [
444 | "x64"
445 | ],
446 | "dev": true,
447 | "license": "MIT",
448 | "optional": true,
449 | "os": [
450 | "win32"
451 | ]
452 | },
453 | "node_modules/@types/estree": {
454 | "version": "1.0.6",
455 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
456 | "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
457 | "dev": true,
458 | "license": "MIT"
459 | },
460 | "node_modules/ajv": {
461 | "version": "8.17.1",
462 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz",
463 | "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==",
464 | "dev": true,
465 | "license": "MIT",
466 | "dependencies": {
467 | "fast-deep-equal": "^3.1.3",
468 | "fast-uri": "^3.0.1",
469 | "json-schema-traverse": "^1.0.0",
470 | "require-from-string": "^2.0.2"
471 | },
472 | "funding": {
473 | "type": "github",
474 | "url": "https://github.com/sponsors/epoberezkin"
475 | }
476 | },
477 | "node_modules/ansi-escapes": {
478 | "version": "4.3.2",
479 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
480 | "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
481 | "dev": true,
482 | "license": "MIT",
483 | "dependencies": {
484 | "type-fest": "^0.21.3"
485 | },
486 | "engines": {
487 | "node": ">=8"
488 | },
489 | "funding": {
490 | "url": "https://github.com/sponsors/sindresorhus"
491 | }
492 | },
493 | "node_modules/ansi-regex": {
494 | "version": "5.0.1",
495 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
496 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
497 | "dev": true,
498 | "license": "MIT",
499 | "engines": {
500 | "node": ">=8"
501 | }
502 | },
503 | "node_modules/ansi-styles": {
504 | "version": "4.3.0",
505 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
506 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
507 | "dev": true,
508 | "license": "MIT",
509 | "dependencies": {
510 | "color-convert": "^2.0.1"
511 | },
512 | "engines": {
513 | "node": ">=8"
514 | },
515 | "funding": {
516 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
517 | }
518 | },
519 | "node_modules/argparse": {
520 | "version": "2.0.1",
521 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
522 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
523 | "dev": true,
524 | "license": "Python-2.0"
525 | },
526 | "node_modules/array-union": {
527 | "version": "2.1.0",
528 | "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
529 | "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
530 | "dev": true,
531 | "license": "MIT",
532 | "engines": {
533 | "node": ">=8"
534 | }
535 | },
536 | "node_modules/astral-regex": {
537 | "version": "2.0.0",
538 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
539 | "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
540 | "dev": true,
541 | "license": "MIT",
542 | "engines": {
543 | "node": ">=8"
544 | }
545 | },
546 | "node_modules/balanced-match": {
547 | "version": "2.0.0",
548 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
549 | "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
550 | "dev": true,
551 | "license": "MIT"
552 | },
553 | "node_modules/braces": {
554 | "version": "3.0.3",
555 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
556 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
557 | "dev": true,
558 | "license": "MIT",
559 | "dependencies": {
560 | "fill-range": "^7.1.1"
561 | },
562 | "engines": {
563 | "node": ">=8"
564 | }
565 | },
566 | "node_modules/callsites": {
567 | "version": "3.1.0",
568 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
569 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
570 | "dev": true,
571 | "license": "MIT",
572 | "engines": {
573 | "node": ">=6"
574 | }
575 | },
576 | "node_modules/cli-cursor": {
577 | "version": "3.1.0",
578 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
579 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
580 | "dev": true,
581 | "license": "MIT",
582 | "dependencies": {
583 | "restore-cursor": "^3.1.0"
584 | },
585 | "engines": {
586 | "node": ">=8"
587 | }
588 | },
589 | "node_modules/color-convert": {
590 | "version": "2.0.1",
591 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
592 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
593 | "dev": true,
594 | "license": "MIT",
595 | "dependencies": {
596 | "color-name": "~1.1.4"
597 | },
598 | "engines": {
599 | "node": ">=7.0.0"
600 | }
601 | },
602 | "node_modules/color-name": {
603 | "version": "1.1.4",
604 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
605 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
606 | "dev": true,
607 | "license": "MIT"
608 | },
609 | "node_modules/colord": {
610 | "version": "2.9.3",
611 | "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
612 | "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==",
613 | "dev": true,
614 | "license": "MIT"
615 | },
616 | "node_modules/cosmiconfig": {
617 | "version": "9.0.0",
618 | "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz",
619 | "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==",
620 | "dev": true,
621 | "license": "MIT",
622 | "dependencies": {
623 | "env-paths": "^2.2.1",
624 | "import-fresh": "^3.3.0",
625 | "js-yaml": "^4.1.0",
626 | "parse-json": "^5.2.0"
627 | },
628 | "engines": {
629 | "node": ">=14"
630 | },
631 | "funding": {
632 | "url": "https://github.com/sponsors/d-fischer"
633 | },
634 | "peerDependencies": {
635 | "typescript": ">=4.9.5"
636 | },
637 | "peerDependenciesMeta": {
638 | "typescript": {
639 | "optional": true
640 | }
641 | }
642 | },
643 | "node_modules/css-functions-list": {
644 | "version": "3.2.3",
645 | "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.2.3.tgz",
646 | "integrity": "sha512-IQOkD3hbR5KrN93MtcYuad6YPuTSUhntLHDuLEbFWE+ff2/XSZNdZG+LcbbIW5AXKg/WFIfYItIzVoHngHXZzA==",
647 | "dev": true,
648 | "license": "MIT",
649 | "engines": {
650 | "node": ">=12 || >=16"
651 | }
652 | },
653 | "node_modules/css-tree": {
654 | "version": "3.1.0",
655 | "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.1.0.tgz",
656 | "integrity": "sha512-0eW44TGN5SQXU1mWSkKwFstI/22X2bG1nYzZTYMAWjylYURhse752YgbE4Cx46AC+bAvI+/dYTPRk1LqSUnu6w==",
657 | "dev": true,
658 | "license": "MIT",
659 | "dependencies": {
660 | "mdn-data": "2.12.2",
661 | "source-map-js": "^1.0.1"
662 | },
663 | "engines": {
664 | "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
665 | }
666 | },
667 | "node_modules/cssesc": {
668 | "version": "3.0.0",
669 | "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
670 | "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
671 | "dev": true,
672 | "license": "MIT",
673 | "bin": {
674 | "cssesc": "bin/cssesc"
675 | },
676 | "engines": {
677 | "node": ">=4"
678 | }
679 | },
680 | "node_modules/debug": {
681 | "version": "4.4.0",
682 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
683 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
684 | "dev": true,
685 | "license": "MIT",
686 | "dependencies": {
687 | "ms": "^2.1.3"
688 | },
689 | "engines": {
690 | "node": ">=6.0"
691 | },
692 | "peerDependenciesMeta": {
693 | "supports-color": {
694 | "optional": true
695 | }
696 | }
697 | },
698 | "node_modules/dir-glob": {
699 | "version": "3.0.1",
700 | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
701 | "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
702 | "dev": true,
703 | "license": "MIT",
704 | "dependencies": {
705 | "path-type": "^4.0.0"
706 | },
707 | "engines": {
708 | "node": ">=8"
709 | }
710 | },
711 | "node_modules/emoji-regex": {
712 | "version": "8.0.0",
713 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
714 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
715 | "dev": true,
716 | "license": "MIT"
717 | },
718 | "node_modules/env-paths": {
719 | "version": "2.2.1",
720 | "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
721 | "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
722 | "dev": true,
723 | "license": "MIT",
724 | "engines": {
725 | "node": ">=6"
726 | }
727 | },
728 | "node_modules/error-ex": {
729 | "version": "1.3.2",
730 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
731 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
732 | "dev": true,
733 | "license": "MIT",
734 | "dependencies": {
735 | "is-arrayish": "^0.2.1"
736 | }
737 | },
738 | "node_modules/fast-deep-equal": {
739 | "version": "3.1.3",
740 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
741 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
742 | "dev": true,
743 | "license": "MIT"
744 | },
745 | "node_modules/fast-glob": {
746 | "version": "3.3.2",
747 | "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
748 | "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
749 | "dev": true,
750 | "license": "MIT",
751 | "dependencies": {
752 | "@nodelib/fs.stat": "^2.0.2",
753 | "@nodelib/fs.walk": "^1.2.3",
754 | "glob-parent": "^5.1.2",
755 | "merge2": "^1.3.0",
756 | "micromatch": "^4.0.4"
757 | },
758 | "engines": {
759 | "node": ">=8.6.0"
760 | }
761 | },
762 | "node_modules/fast-uri": {
763 | "version": "3.0.3",
764 | "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz",
765 | "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==",
766 | "dev": true,
767 | "license": "BSD-3-Clause"
768 | },
769 | "node_modules/fastest-levenshtein": {
770 | "version": "1.0.16",
771 | "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
772 | "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
773 | "dev": true,
774 | "license": "MIT",
775 | "engines": {
776 | "node": ">= 4.9.1"
777 | }
778 | },
779 | "node_modules/fastq": {
780 | "version": "1.18.0",
781 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz",
782 | "integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==",
783 | "dev": true,
784 | "license": "ISC",
785 | "dependencies": {
786 | "reusify": "^1.0.4"
787 | }
788 | },
789 | "node_modules/file-entry-cache": {
790 | "version": "9.1.0",
791 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-9.1.0.tgz",
792 | "integrity": "sha512-/pqPFG+FdxWQj+/WSuzXSDaNzxgTLr/OrR1QuqfEZzDakpdYE70PwUxL7BPUa8hpjbvY1+qvCl8k+8Tq34xJgg==",
793 | "dev": true,
794 | "license": "MIT",
795 | "dependencies": {
796 | "flat-cache": "^5.0.0"
797 | },
798 | "engines": {
799 | "node": ">=18"
800 | }
801 | },
802 | "node_modules/fill-range": {
803 | "version": "7.1.1",
804 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
805 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
806 | "dev": true,
807 | "license": "MIT",
808 | "dependencies": {
809 | "to-regex-range": "^5.0.1"
810 | },
811 | "engines": {
812 | "node": ">=8"
813 | }
814 | },
815 | "node_modules/flat-cache": {
816 | "version": "5.0.0",
817 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-5.0.0.tgz",
818 | "integrity": "sha512-JrqFmyUl2PnPi1OvLyTVHnQvwQ0S+e6lGSwu8OkAZlSaNIZciTY2H/cOOROxsBA1m/LZNHDsqAgDZt6akWcjsQ==",
819 | "dev": true,
820 | "license": "MIT",
821 | "dependencies": {
822 | "flatted": "^3.3.1",
823 | "keyv": "^4.5.4"
824 | },
825 | "engines": {
826 | "node": ">=18"
827 | }
828 | },
829 | "node_modules/flatted": {
830 | "version": "3.3.2",
831 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz",
832 | "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==",
833 | "dev": true,
834 | "license": "ISC"
835 | },
836 | "node_modules/fsevents": {
837 | "version": "2.3.3",
838 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
839 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
840 | "dev": true,
841 | "hasInstallScript": true,
842 | "license": "MIT",
843 | "optional": true,
844 | "os": [
845 | "darwin"
846 | ],
847 | "engines": {
848 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
849 | }
850 | },
851 | "node_modules/glob-parent": {
852 | "version": "5.1.2",
853 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
854 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
855 | "dev": true,
856 | "license": "ISC",
857 | "dependencies": {
858 | "is-glob": "^4.0.1"
859 | },
860 | "engines": {
861 | "node": ">= 6"
862 | }
863 | },
864 | "node_modules/global-modules": {
865 | "version": "2.0.0",
866 | "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz",
867 | "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==",
868 | "dev": true,
869 | "license": "MIT",
870 | "dependencies": {
871 | "global-prefix": "^3.0.0"
872 | },
873 | "engines": {
874 | "node": ">=6"
875 | }
876 | },
877 | "node_modules/global-prefix": {
878 | "version": "3.0.0",
879 | "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz",
880 | "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==",
881 | "dev": true,
882 | "license": "MIT",
883 | "dependencies": {
884 | "ini": "^1.3.5",
885 | "kind-of": "^6.0.2",
886 | "which": "^1.3.1"
887 | },
888 | "engines": {
889 | "node": ">=6"
890 | }
891 | },
892 | "node_modules/globby": {
893 | "version": "11.1.0",
894 | "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
895 | "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
896 | "dev": true,
897 | "license": "MIT",
898 | "dependencies": {
899 | "array-union": "^2.1.0",
900 | "dir-glob": "^3.0.1",
901 | "fast-glob": "^3.2.9",
902 | "ignore": "^5.2.0",
903 | "merge2": "^1.4.1",
904 | "slash": "^3.0.0"
905 | },
906 | "engines": {
907 | "node": ">=10"
908 | },
909 | "funding": {
910 | "url": "https://github.com/sponsors/sindresorhus"
911 | }
912 | },
913 | "node_modules/globby/node_modules/ignore": {
914 | "version": "5.3.2",
915 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
916 | "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==",
917 | "dev": true,
918 | "license": "MIT",
919 | "engines": {
920 | "node": ">= 4"
921 | }
922 | },
923 | "node_modules/globjoin": {
924 | "version": "0.1.4",
925 | "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz",
926 | "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==",
927 | "dev": true,
928 | "license": "MIT"
929 | },
930 | "node_modules/has-flag": {
931 | "version": "4.0.0",
932 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
933 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
934 | "dev": true,
935 | "license": "MIT",
936 | "engines": {
937 | "node": ">=8"
938 | }
939 | },
940 | "node_modules/html-tags": {
941 | "version": "3.3.1",
942 | "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz",
943 | "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==",
944 | "dev": true,
945 | "license": "MIT",
946 | "engines": {
947 | "node": ">=8"
948 | },
949 | "funding": {
950 | "url": "https://github.com/sponsors/sindresorhus"
951 | }
952 | },
953 | "node_modules/ignore": {
954 | "version": "6.0.2",
955 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz",
956 | "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==",
957 | "dev": true,
958 | "license": "MIT",
959 | "engines": {
960 | "node": ">= 4"
961 | }
962 | },
963 | "node_modules/import-fresh": {
964 | "version": "3.3.0",
965 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
966 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
967 | "dev": true,
968 | "license": "MIT",
969 | "dependencies": {
970 | "parent-module": "^1.0.0",
971 | "resolve-from": "^4.0.0"
972 | },
973 | "engines": {
974 | "node": ">=6"
975 | },
976 | "funding": {
977 | "url": "https://github.com/sponsors/sindresorhus"
978 | }
979 | },
980 | "node_modules/import-fresh/node_modules/resolve-from": {
981 | "version": "4.0.0",
982 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
983 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
984 | "dev": true,
985 | "license": "MIT",
986 | "engines": {
987 | "node": ">=4"
988 | }
989 | },
990 | "node_modules/imurmurhash": {
991 | "version": "0.1.4",
992 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
993 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
994 | "dev": true,
995 | "license": "MIT",
996 | "engines": {
997 | "node": ">=0.8.19"
998 | }
999 | },
1000 | "node_modules/ini": {
1001 | "version": "1.3.8",
1002 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
1003 | "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
1004 | "dev": true,
1005 | "license": "ISC"
1006 | },
1007 | "node_modules/is-arrayish": {
1008 | "version": "0.2.1",
1009 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
1010 | "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
1011 | "dev": true,
1012 | "license": "MIT"
1013 | },
1014 | "node_modules/is-extglob": {
1015 | "version": "2.1.1",
1016 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1017 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
1018 | "dev": true,
1019 | "license": "MIT",
1020 | "engines": {
1021 | "node": ">=0.10.0"
1022 | }
1023 | },
1024 | "node_modules/is-fullwidth-code-point": {
1025 | "version": "3.0.0",
1026 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
1027 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
1028 | "dev": true,
1029 | "license": "MIT",
1030 | "engines": {
1031 | "node": ">=8"
1032 | }
1033 | },
1034 | "node_modules/is-glob": {
1035 | "version": "4.0.3",
1036 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1037 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1038 | "dev": true,
1039 | "license": "MIT",
1040 | "dependencies": {
1041 | "is-extglob": "^2.1.1"
1042 | },
1043 | "engines": {
1044 | "node": ">=0.10.0"
1045 | }
1046 | },
1047 | "node_modules/is-number": {
1048 | "version": "7.0.0",
1049 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
1050 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
1051 | "dev": true,
1052 | "license": "MIT",
1053 | "engines": {
1054 | "node": ">=0.12.0"
1055 | }
1056 | },
1057 | "node_modules/is-plain-object": {
1058 | "version": "5.0.0",
1059 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
1060 | "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
1061 | "dev": true,
1062 | "license": "MIT",
1063 | "engines": {
1064 | "node": ">=0.10.0"
1065 | }
1066 | },
1067 | "node_modules/isexe": {
1068 | "version": "2.0.0",
1069 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1070 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
1071 | "dev": true,
1072 | "license": "ISC"
1073 | },
1074 | "node_modules/js-tokens": {
1075 | "version": "4.0.0",
1076 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
1077 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
1078 | "dev": true,
1079 | "license": "MIT"
1080 | },
1081 | "node_modules/js-yaml": {
1082 | "version": "4.1.0",
1083 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
1084 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
1085 | "dev": true,
1086 | "license": "MIT",
1087 | "dependencies": {
1088 | "argparse": "^2.0.1"
1089 | },
1090 | "bin": {
1091 | "js-yaml": "bin/js-yaml.js"
1092 | }
1093 | },
1094 | "node_modules/json-buffer": {
1095 | "version": "3.0.1",
1096 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
1097 | "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
1098 | "dev": true,
1099 | "license": "MIT"
1100 | },
1101 | "node_modules/json-parse-even-better-errors": {
1102 | "version": "2.3.1",
1103 | "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
1104 | "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
1105 | "dev": true,
1106 | "license": "MIT"
1107 | },
1108 | "node_modules/json-schema-traverse": {
1109 | "version": "1.0.0",
1110 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
1111 | "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
1112 | "dev": true,
1113 | "license": "MIT"
1114 | },
1115 | "node_modules/keyv": {
1116 | "version": "4.5.4",
1117 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
1118 | "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
1119 | "dev": true,
1120 | "license": "MIT",
1121 | "dependencies": {
1122 | "json-buffer": "3.0.1"
1123 | }
1124 | },
1125 | "node_modules/kind-of": {
1126 | "version": "6.0.3",
1127 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
1128 | "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
1129 | "dev": true,
1130 | "license": "MIT",
1131 | "engines": {
1132 | "node": ">=0.10.0"
1133 | }
1134 | },
1135 | "node_modules/known-css-properties": {
1136 | "version": "0.35.0",
1137 | "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz",
1138 | "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==",
1139 | "dev": true,
1140 | "license": "MIT"
1141 | },
1142 | "node_modules/lines-and-columns": {
1143 | "version": "1.2.4",
1144 | "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
1145 | "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
1146 | "dev": true,
1147 | "license": "MIT"
1148 | },
1149 | "node_modules/lodash.truncate": {
1150 | "version": "4.4.2",
1151 | "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
1152 | "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==",
1153 | "dev": true,
1154 | "license": "MIT"
1155 | },
1156 | "node_modules/log-update": {
1157 | "version": "4.0.0",
1158 | "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz",
1159 | "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==",
1160 | "dev": true,
1161 | "license": "MIT",
1162 | "dependencies": {
1163 | "ansi-escapes": "^4.3.0",
1164 | "cli-cursor": "^3.1.0",
1165 | "slice-ansi": "^4.0.0",
1166 | "wrap-ansi": "^6.2.0"
1167 | },
1168 | "engines": {
1169 | "node": ">=10"
1170 | },
1171 | "funding": {
1172 | "url": "https://github.com/sponsors/sindresorhus"
1173 | }
1174 | },
1175 | "node_modules/mathml-tag-names": {
1176 | "version": "2.1.3",
1177 | "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz",
1178 | "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==",
1179 | "dev": true,
1180 | "license": "MIT",
1181 | "funding": {
1182 | "type": "github",
1183 | "url": "https://github.com/sponsors/wooorm"
1184 | }
1185 | },
1186 | "node_modules/mdn-data": {
1187 | "version": "2.12.2",
1188 | "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.12.2.tgz",
1189 | "integrity": "sha512-IEn+pegP1aManZuckezWCO+XZQDplx1366JoVhTpMpBB1sPey/SbveZQUosKiKiGYjg1wH4pMlNgXbCiYgihQA==",
1190 | "dev": true,
1191 | "license": "CC0-1.0"
1192 | },
1193 | "node_modules/meow": {
1194 | "version": "13.2.0",
1195 | "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz",
1196 | "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==",
1197 | "dev": true,
1198 | "license": "MIT",
1199 | "engines": {
1200 | "node": ">=18"
1201 | },
1202 | "funding": {
1203 | "url": "https://github.com/sponsors/sindresorhus"
1204 | }
1205 | },
1206 | "node_modules/merge2": {
1207 | "version": "1.4.1",
1208 | "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
1209 | "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
1210 | "dev": true,
1211 | "license": "MIT",
1212 | "engines": {
1213 | "node": ">= 8"
1214 | }
1215 | },
1216 | "node_modules/micromatch": {
1217 | "version": "4.0.8",
1218 | "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
1219 | "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
1220 | "dev": true,
1221 | "license": "MIT",
1222 | "dependencies": {
1223 | "braces": "^3.0.3",
1224 | "picomatch": "^2.3.1"
1225 | },
1226 | "engines": {
1227 | "node": ">=8.6"
1228 | }
1229 | },
1230 | "node_modules/mimic-fn": {
1231 | "version": "2.1.0",
1232 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
1233 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
1234 | "dev": true,
1235 | "license": "MIT",
1236 | "engines": {
1237 | "node": ">=6"
1238 | }
1239 | },
1240 | "node_modules/ms": {
1241 | "version": "2.1.3",
1242 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1243 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
1244 | "dev": true,
1245 | "license": "MIT"
1246 | },
1247 | "node_modules/nanoid": {
1248 | "version": "3.3.8",
1249 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
1250 | "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
1251 | "dev": true,
1252 | "funding": [
1253 | {
1254 | "type": "github",
1255 | "url": "https://github.com/sponsors/ai"
1256 | }
1257 | ],
1258 | "license": "MIT",
1259 | "bin": {
1260 | "nanoid": "bin/nanoid.cjs"
1261 | },
1262 | "engines": {
1263 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
1264 | }
1265 | },
1266 | "node_modules/normalize-path": {
1267 | "version": "3.0.0",
1268 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
1269 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
1270 | "dev": true,
1271 | "license": "MIT",
1272 | "engines": {
1273 | "node": ">=0.10.0"
1274 | }
1275 | },
1276 | "node_modules/onetime": {
1277 | "version": "5.1.2",
1278 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
1279 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
1280 | "dev": true,
1281 | "license": "MIT",
1282 | "dependencies": {
1283 | "mimic-fn": "^2.1.0"
1284 | },
1285 | "engines": {
1286 | "node": ">=6"
1287 | },
1288 | "funding": {
1289 | "url": "https://github.com/sponsors/sindresorhus"
1290 | }
1291 | },
1292 | "node_modules/parent-module": {
1293 | "version": "1.0.1",
1294 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
1295 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
1296 | "dev": true,
1297 | "license": "MIT",
1298 | "dependencies": {
1299 | "callsites": "^3.0.0"
1300 | },
1301 | "engines": {
1302 | "node": ">=6"
1303 | }
1304 | },
1305 | "node_modules/parse-json": {
1306 | "version": "5.2.0",
1307 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
1308 | "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
1309 | "dev": true,
1310 | "license": "MIT",
1311 | "dependencies": {
1312 | "@babel/code-frame": "^7.0.0",
1313 | "error-ex": "^1.3.1",
1314 | "json-parse-even-better-errors": "^2.3.0",
1315 | "lines-and-columns": "^1.1.6"
1316 | },
1317 | "engines": {
1318 | "node": ">=8"
1319 | },
1320 | "funding": {
1321 | "url": "https://github.com/sponsors/sindresorhus"
1322 | }
1323 | },
1324 | "node_modules/path-type": {
1325 | "version": "4.0.0",
1326 | "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
1327 | "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
1328 | "dev": true,
1329 | "license": "MIT",
1330 | "engines": {
1331 | "node": ">=8"
1332 | }
1333 | },
1334 | "node_modules/picocolors": {
1335 | "version": "1.1.1",
1336 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
1337 | "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
1338 | "dev": true,
1339 | "license": "ISC"
1340 | },
1341 | "node_modules/picomatch": {
1342 | "version": "2.3.1",
1343 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1344 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1345 | "dev": true,
1346 | "license": "MIT",
1347 | "engines": {
1348 | "node": ">=8.6"
1349 | },
1350 | "funding": {
1351 | "url": "https://github.com/sponsors/jonschlinkert"
1352 | }
1353 | },
1354 | "node_modules/postcss": {
1355 | "version": "8.4.49",
1356 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
1357 | "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
1358 | "dev": true,
1359 | "funding": [
1360 | {
1361 | "type": "opencollective",
1362 | "url": "https://opencollective.com/postcss/"
1363 | },
1364 | {
1365 | "type": "tidelift",
1366 | "url": "https://tidelift.com/funding/github/npm/postcss"
1367 | },
1368 | {
1369 | "type": "github",
1370 | "url": "https://github.com/sponsors/ai"
1371 | }
1372 | ],
1373 | "license": "MIT",
1374 | "dependencies": {
1375 | "nanoid": "^3.3.7",
1376 | "picocolors": "^1.1.1",
1377 | "source-map-js": "^1.2.1"
1378 | },
1379 | "engines": {
1380 | "node": "^10 || ^12 || >=14"
1381 | }
1382 | },
1383 | "node_modules/postcss-resolve-nested-selector": {
1384 | "version": "0.1.6",
1385 | "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.6.tgz",
1386 | "integrity": "sha512-0sglIs9Wmkzbr8lQwEyIzlDOOC9bGmfVKcJTaxv3vMmd3uo4o4DerC3En0bnmgceeql9BfC8hRkp7cg0fjdVqw==",
1387 | "dev": true,
1388 | "license": "MIT"
1389 | },
1390 | "node_modules/postcss-safe-parser": {
1391 | "version": "7.0.1",
1392 | "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-7.0.1.tgz",
1393 | "integrity": "sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==",
1394 | "dev": true,
1395 | "funding": [
1396 | {
1397 | "type": "opencollective",
1398 | "url": "https://opencollective.com/postcss/"
1399 | },
1400 | {
1401 | "type": "tidelift",
1402 | "url": "https://tidelift.com/funding/github/npm/postcss-safe-parser"
1403 | },
1404 | {
1405 | "type": "github",
1406 | "url": "https://github.com/sponsors/ai"
1407 | }
1408 | ],
1409 | "license": "MIT",
1410 | "engines": {
1411 | "node": ">=18.0"
1412 | },
1413 | "peerDependencies": {
1414 | "postcss": "^8.4.31"
1415 | }
1416 | },
1417 | "node_modules/postcss-selector-parser": {
1418 | "version": "7.0.0",
1419 | "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz",
1420 | "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==",
1421 | "dev": true,
1422 | "license": "MIT",
1423 | "dependencies": {
1424 | "cssesc": "^3.0.0",
1425 | "util-deprecate": "^1.0.2"
1426 | },
1427 | "engines": {
1428 | "node": ">=4"
1429 | }
1430 | },
1431 | "node_modules/postcss-value-parser": {
1432 | "version": "4.2.0",
1433 | "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
1434 | "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
1435 | "dev": true,
1436 | "license": "MIT"
1437 | },
1438 | "node_modules/queue-microtask": {
1439 | "version": "1.2.3",
1440 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
1441 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
1442 | "dev": true,
1443 | "funding": [
1444 | {
1445 | "type": "github",
1446 | "url": "https://github.com/sponsors/feross"
1447 | },
1448 | {
1449 | "type": "patreon",
1450 | "url": "https://www.patreon.com/feross"
1451 | },
1452 | {
1453 | "type": "consulting",
1454 | "url": "https://feross.org/support"
1455 | }
1456 | ],
1457 | "license": "MIT"
1458 | },
1459 | "node_modules/require-from-string": {
1460 | "version": "2.0.2",
1461 | "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
1462 | "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
1463 | "dev": true,
1464 | "license": "MIT",
1465 | "engines": {
1466 | "node": ">=0.10.0"
1467 | }
1468 | },
1469 | "node_modules/resolve-from": {
1470 | "version": "5.0.0",
1471 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
1472 | "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
1473 | "dev": true,
1474 | "license": "MIT",
1475 | "engines": {
1476 | "node": ">=8"
1477 | }
1478 | },
1479 | "node_modules/restore-cursor": {
1480 | "version": "3.1.0",
1481 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
1482 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
1483 | "dev": true,
1484 | "license": "MIT",
1485 | "dependencies": {
1486 | "onetime": "^5.1.0",
1487 | "signal-exit": "^3.0.2"
1488 | },
1489 | "engines": {
1490 | "node": ">=8"
1491 | }
1492 | },
1493 | "node_modules/reusify": {
1494 | "version": "1.0.4",
1495 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
1496 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
1497 | "dev": true,
1498 | "license": "MIT",
1499 | "engines": {
1500 | "iojs": ">=1.0.0",
1501 | "node": ">=0.10.0"
1502 | }
1503 | },
1504 | "node_modules/rollup": {
1505 | "version": "4.29.1",
1506 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz",
1507 | "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==",
1508 | "dev": true,
1509 | "license": "MIT",
1510 | "dependencies": {
1511 | "@types/estree": "1.0.6"
1512 | },
1513 | "bin": {
1514 | "rollup": "dist/bin/rollup"
1515 | },
1516 | "engines": {
1517 | "node": ">=18.0.0",
1518 | "npm": ">=8.0.0"
1519 | },
1520 | "optionalDependencies": {
1521 | "@rollup/rollup-android-arm-eabi": "4.29.1",
1522 | "@rollup/rollup-android-arm64": "4.29.1",
1523 | "@rollup/rollup-darwin-arm64": "4.29.1",
1524 | "@rollup/rollup-darwin-x64": "4.29.1",
1525 | "@rollup/rollup-freebsd-arm64": "4.29.1",
1526 | "@rollup/rollup-freebsd-x64": "4.29.1",
1527 | "@rollup/rollup-linux-arm-gnueabihf": "4.29.1",
1528 | "@rollup/rollup-linux-arm-musleabihf": "4.29.1",
1529 | "@rollup/rollup-linux-arm64-gnu": "4.29.1",
1530 | "@rollup/rollup-linux-arm64-musl": "4.29.1",
1531 | "@rollup/rollup-linux-loongarch64-gnu": "4.29.1",
1532 | "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1",
1533 | "@rollup/rollup-linux-riscv64-gnu": "4.29.1",
1534 | "@rollup/rollup-linux-s390x-gnu": "4.29.1",
1535 | "@rollup/rollup-linux-x64-gnu": "4.29.1",
1536 | "@rollup/rollup-linux-x64-musl": "4.29.1",
1537 | "@rollup/rollup-win32-arm64-msvc": "4.29.1",
1538 | "@rollup/rollup-win32-ia32-msvc": "4.29.1",
1539 | "@rollup/rollup-win32-x64-msvc": "4.29.1",
1540 | "fsevents": "~2.3.2"
1541 | }
1542 | },
1543 | "node_modules/run-parallel": {
1544 | "version": "1.2.0",
1545 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
1546 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
1547 | "dev": true,
1548 | "funding": [
1549 | {
1550 | "type": "github",
1551 | "url": "https://github.com/sponsors/feross"
1552 | },
1553 | {
1554 | "type": "patreon",
1555 | "url": "https://www.patreon.com/feross"
1556 | },
1557 | {
1558 | "type": "consulting",
1559 | "url": "https://feross.org/support"
1560 | }
1561 | ],
1562 | "license": "MIT",
1563 | "dependencies": {
1564 | "queue-microtask": "^1.2.2"
1565 | }
1566 | },
1567 | "node_modules/signal-exit": {
1568 | "version": "3.0.7",
1569 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
1570 | "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
1571 | "dev": true,
1572 | "license": "ISC"
1573 | },
1574 | "node_modules/slash": {
1575 | "version": "3.0.0",
1576 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
1577 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
1578 | "dev": true,
1579 | "license": "MIT",
1580 | "engines": {
1581 | "node": ">=8"
1582 | }
1583 | },
1584 | "node_modules/slice-ansi": {
1585 | "version": "4.0.0",
1586 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
1587 | "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
1588 | "dev": true,
1589 | "license": "MIT",
1590 | "dependencies": {
1591 | "ansi-styles": "^4.0.0",
1592 | "astral-regex": "^2.0.0",
1593 | "is-fullwidth-code-point": "^3.0.0"
1594 | },
1595 | "engines": {
1596 | "node": ">=10"
1597 | },
1598 | "funding": {
1599 | "url": "https://github.com/chalk/slice-ansi?sponsor=1"
1600 | }
1601 | },
1602 | "node_modules/source-map-js": {
1603 | "version": "1.2.1",
1604 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
1605 | "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
1606 | "dev": true,
1607 | "license": "BSD-3-Clause",
1608 | "engines": {
1609 | "node": ">=0.10.0"
1610 | }
1611 | },
1612 | "node_modules/string-width": {
1613 | "version": "4.2.3",
1614 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
1615 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
1616 | "dev": true,
1617 | "license": "MIT",
1618 | "dependencies": {
1619 | "emoji-regex": "^8.0.0",
1620 | "is-fullwidth-code-point": "^3.0.0",
1621 | "strip-ansi": "^6.0.1"
1622 | },
1623 | "engines": {
1624 | "node": ">=8"
1625 | }
1626 | },
1627 | "node_modules/strip-ansi": {
1628 | "version": "6.0.1",
1629 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
1630 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
1631 | "dev": true,
1632 | "license": "MIT",
1633 | "dependencies": {
1634 | "ansi-regex": "^5.0.1"
1635 | },
1636 | "engines": {
1637 | "node": ">=8"
1638 | }
1639 | },
1640 | "node_modules/stylelint": {
1641 | "version": "16.12.0",
1642 | "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.12.0.tgz",
1643 | "integrity": "sha512-F8zZ3L/rBpuoBZRvI4JVT20ZanPLXfQLzMOZg1tzPflRVh9mKpOZ8qcSIhh1my3FjAjZWG4T2POwGnmn6a6hbg==",
1644 | "dev": true,
1645 | "funding": [
1646 | {
1647 | "type": "opencollective",
1648 | "url": "https://opencollective.com/stylelint"
1649 | },
1650 | {
1651 | "type": "github",
1652 | "url": "https://github.com/sponsors/stylelint"
1653 | }
1654 | ],
1655 | "license": "MIT",
1656 | "dependencies": {
1657 | "@csstools/css-parser-algorithms": "^3.0.4",
1658 | "@csstools/css-tokenizer": "^3.0.3",
1659 | "@csstools/media-query-list-parser": "^4.0.2",
1660 | "@csstools/selector-specificity": "^5.0.0",
1661 | "@dual-bundle/import-meta-resolve": "^4.1.0",
1662 | "balanced-match": "^2.0.0",
1663 | "colord": "^2.9.3",
1664 | "cosmiconfig": "^9.0.0",
1665 | "css-functions-list": "^3.2.3",
1666 | "css-tree": "^3.0.1",
1667 | "debug": "^4.3.7",
1668 | "fast-glob": "^3.3.2",
1669 | "fastest-levenshtein": "^1.0.16",
1670 | "file-entry-cache": "^9.1.0",
1671 | "global-modules": "^2.0.0",
1672 | "globby": "^11.1.0",
1673 | "globjoin": "^0.1.4",
1674 | "html-tags": "^3.3.1",
1675 | "ignore": "^6.0.2",
1676 | "imurmurhash": "^0.1.4",
1677 | "is-plain-object": "^5.0.0",
1678 | "known-css-properties": "^0.35.0",
1679 | "mathml-tag-names": "^2.1.3",
1680 | "meow": "^13.2.0",
1681 | "micromatch": "^4.0.8",
1682 | "normalize-path": "^3.0.0",
1683 | "picocolors": "^1.1.1",
1684 | "postcss": "^8.4.49",
1685 | "postcss-resolve-nested-selector": "^0.1.6",
1686 | "postcss-safe-parser": "^7.0.1",
1687 | "postcss-selector-parser": "^7.0.0",
1688 | "postcss-value-parser": "^4.2.0",
1689 | "resolve-from": "^5.0.0",
1690 | "string-width": "^4.2.3",
1691 | "supports-hyperlinks": "^3.1.0",
1692 | "svg-tags": "^1.0.0",
1693 | "table": "^6.9.0",
1694 | "write-file-atomic": "^5.0.1"
1695 | },
1696 | "bin": {
1697 | "stylelint": "bin/stylelint.mjs"
1698 | },
1699 | "engines": {
1700 | "node": ">=18.12.0"
1701 | }
1702 | },
1703 | "node_modules/stylelint-tape": {
1704 | "version": "5.0.1",
1705 | "resolved": "https://registry.npmjs.org/stylelint-tape/-/stylelint-tape-5.0.1.tgz",
1706 | "integrity": "sha512-CHQ6Qq7CVnRhGMTTGFHaOEyZirBmtQN4cpO01Kf/LbqzzcfM8UMwMTHyFwf2d3yHSZJmbI7N3MwatGn/QU5szw==",
1707 | "dev": true,
1708 | "license": "CC0-1.0",
1709 | "dependencies": {
1710 | "log-update": "^4"
1711 | },
1712 | "bin": {
1713 | "stylelint-tape": "cli.mjs"
1714 | },
1715 | "engines": {
1716 | "node": ">=20.0.0"
1717 | },
1718 | "peerDependencies": {
1719 | "stylelint": ">= 16"
1720 | }
1721 | },
1722 | "node_modules/supports-color": {
1723 | "version": "7.2.0",
1724 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
1725 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
1726 | "dev": true,
1727 | "license": "MIT",
1728 | "dependencies": {
1729 | "has-flag": "^4.0.0"
1730 | },
1731 | "engines": {
1732 | "node": ">=8"
1733 | }
1734 | },
1735 | "node_modules/supports-hyperlinks": {
1736 | "version": "3.1.0",
1737 | "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.1.0.tgz",
1738 | "integrity": "sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==",
1739 | "dev": true,
1740 | "license": "MIT",
1741 | "dependencies": {
1742 | "has-flag": "^4.0.0",
1743 | "supports-color": "^7.0.0"
1744 | },
1745 | "engines": {
1746 | "node": ">=14.18"
1747 | },
1748 | "funding": {
1749 | "url": "https://github.com/sponsors/sindresorhus"
1750 | }
1751 | },
1752 | "node_modules/svg-tags": {
1753 | "version": "1.0.0",
1754 | "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz",
1755 | "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==",
1756 | "dev": true
1757 | },
1758 | "node_modules/table": {
1759 | "version": "6.9.0",
1760 | "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz",
1761 | "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==",
1762 | "dev": true,
1763 | "license": "BSD-3-Clause",
1764 | "dependencies": {
1765 | "ajv": "^8.0.1",
1766 | "lodash.truncate": "^4.4.2",
1767 | "slice-ansi": "^4.0.0",
1768 | "string-width": "^4.2.3",
1769 | "strip-ansi": "^6.0.1"
1770 | },
1771 | "engines": {
1772 | "node": ">=10.0.0"
1773 | }
1774 | },
1775 | "node_modules/to-regex-range": {
1776 | "version": "5.0.1",
1777 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
1778 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
1779 | "dev": true,
1780 | "license": "MIT",
1781 | "dependencies": {
1782 | "is-number": "^7.0.0"
1783 | },
1784 | "engines": {
1785 | "node": ">=8.0"
1786 | }
1787 | },
1788 | "node_modules/type-fest": {
1789 | "version": "0.21.3",
1790 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
1791 | "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
1792 | "dev": true,
1793 | "license": "(MIT OR CC0-1.0)",
1794 | "engines": {
1795 | "node": ">=10"
1796 | },
1797 | "funding": {
1798 | "url": "https://github.com/sponsors/sindresorhus"
1799 | }
1800 | },
1801 | "node_modules/util-deprecate": {
1802 | "version": "1.0.2",
1803 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1804 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
1805 | "dev": true,
1806 | "license": "MIT"
1807 | },
1808 | "node_modules/which": {
1809 | "version": "1.3.1",
1810 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1811 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1812 | "dev": true,
1813 | "license": "ISC",
1814 | "dependencies": {
1815 | "isexe": "^2.0.0"
1816 | },
1817 | "bin": {
1818 | "which": "bin/which"
1819 | }
1820 | },
1821 | "node_modules/wrap-ansi": {
1822 | "version": "6.2.0",
1823 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
1824 | "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
1825 | "dev": true,
1826 | "license": "MIT",
1827 | "dependencies": {
1828 | "ansi-styles": "^4.0.0",
1829 | "string-width": "^4.1.0",
1830 | "strip-ansi": "^6.0.0"
1831 | },
1832 | "engines": {
1833 | "node": ">=8"
1834 | }
1835 | },
1836 | "node_modules/write-file-atomic": {
1837 | "version": "5.0.1",
1838 | "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
1839 | "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
1840 | "dev": true,
1841 | "license": "ISC",
1842 | "dependencies": {
1843 | "imurmurhash": "^0.1.4",
1844 | "signal-exit": "^4.0.1"
1845 | },
1846 | "engines": {
1847 | "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
1848 | }
1849 | },
1850 | "node_modules/write-file-atomic/node_modules/signal-exit": {
1851 | "version": "4.1.0",
1852 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
1853 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
1854 | "dev": true,
1855 | "license": "ISC",
1856 | "engines": {
1857 | "node": ">=14"
1858 | },
1859 | "funding": {
1860 | "url": "https://github.com/sponsors/isaacs"
1861 | }
1862 | }
1863 | }
1864 | }
1865 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "stylelint-use-logical",
3 | "version": "2.1.2",
4 | "description": "Enforce usage of logical properties and values in CSS",
5 | "license": "CC0-1.0",
6 | "author": "Jonathan Neal ",
7 | "repository": "csstools/stylelint-use-logical",
8 | "homepage": "https://github.com/csstools/stylelint-use-logical#readme",
9 | "bugs": "https://github.com/csstools/stylelint-use-logical/issues",
10 | "main": "index.cjs",
11 | "module": "index.mjs",
12 | "exports": {
13 | ".": {
14 | "import": "./index.mjs",
15 | "require": "./index.cjs"
16 | }
17 | },
18 | "files": [
19 | "index.cjs",
20 | "index.cjs.map",
21 | "index.mjs",
22 | "index.mjs.map"
23 | ],
24 | "scripts": {
25 | "build": "rollup -c .rollup.mjs --silent",
26 | "prepublishOnly": "npm test",
27 | "pretest": "npm run build",
28 | "test": "stylelint-tape --cwd ./ --plugin index.mjs"
29 | },
30 | "engines": {
31 | "node": ">=14.0.0"
32 | },
33 | "dependencies": {},
34 | "devDependencies": {
35 | "rollup": "^4.0.0",
36 | "stylelint": "^16.0.0",
37 | "stylelint-tape": "^5.0.0"
38 | },
39 | "peerDependencies": {
40 | "stylelint": ">= 11 < 17"
41 | },
42 | "eslintConfig": {
43 | "extends": "dev"
44 | },
45 | "keywords": [
46 | "stylelint",
47 | "stylelint-plugin",
48 | "css",
49 | "logical",
50 | "properties",
51 | "property",
52 | "flow",
53 | "relative",
54 | "values",
55 | "value",
56 | "ltr",
57 | "rtl",
58 | "directional",
59 | "dir",
60 | "inline",
61 | "block",
62 | "start",
63 | "end",
64 | "align",
65 | "border",
66 | "clear",
67 | "float",
68 | "margin",
69 | "padding",
70 | "size",
71 | "text"
72 | ]
73 | }
74 |
--------------------------------------------------------------------------------