@css-modules-kit/codegen@1.3.0
Patch Changes
@css-modules-kit/core@1.3.0
Minor Changes
-
#412
a247518- refactor(core): parse@valuewith postcss-value-parserThe
@valueparser is reimplemented on top of postcss-value-parser. Behavior for syntax supported by css-loader is unchanged.For syntax that css-loader does not support (where css-modules-kit does not guarantee a specific behavior), the result changed:
@value \\c: #000;and@value \'d: #000;are now parsed as a token declaration instead of reporting an error.@value \31 e: #000;is now read as the token name\31instead ofe.
-
#409
4f59d0c- feat(core, ts-plugin): supportcomposes: <name> from '<specifier>'Class names referenced via
composes: foo from './other.module.css';are now linked to the.foo {...}declaration in the referenced file. Go to Definition jumps from the reference to the declaration, Find All References lists reference sites across files, and Rename updates the declaration and every reference together.Two diagnostics are also emitted in the check phase:
Cannot import module '<specifier>'when the specifier cannot be resolved.Module '<specifier>' has no exported token '<name>'.when the referenced file does not export the token.
-
#408
947d06d- feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes propertyClass names referenced via
composes: foo;are now linked back to the.foo {...}declaration. Go to Definition jumps from a reference to the declaration, Find All References lists every reference site, and Rename updates the declaration and every reference together. Space-separated names (composes: foo bar;), comma-separated names (composes: foo, bar;), and mixes of both are supported.composes: global(foo);,composes: foo from global;, andcomposes: foo from '<specifier>';do not produce references (support forfrom '<specifier>'is planned).Two diagnostics are also emitted for invalid usage:
- Parse phase: a
fromclause not followed by a quoted specifier or theglobalkeyword is reported. - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as
Cannot find token '<name>'..
The
no-unused-class-namesrule in eslint-plugin and stylelint-plugin now treats names referenced viacomposesfrom within the same CSS as used, so they are no longer reported as unused. - Parse phase: a
Patch Changes
@css-modules-kit/eslint-plugin@1.3.0
Patch Changes
-
#408
947d06d- feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes propertyClass names referenced via
composes: foo;are now linked back to the.foo {...}declaration. Go to Definition jumps from a reference to the declaration, Find All References lists every reference site, and Rename updates the declaration and every reference together. Space-separated names (composes: foo bar;), comma-separated names (composes: foo, bar;), and mixes of both are supported.composes: global(foo);,composes: foo from global;, andcomposes: foo from '<specifier>';do not produce references (support forfrom '<specifier>'is planned).Two diagnostics are also emitted for invalid usage:
- Parse phase: a
fromclause not followed by a quoted specifier or theglobalkeyword is reported. - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as
Cannot find token '<name>'..
The
no-unused-class-namesrule in eslint-plugin and stylelint-plugin now treats names referenced viacomposesfrom within the same CSS as used, so they are no longer reported as unused. - Parse phase: a
-
Updated dependencies [
e9315e4,a247518,4f59d0c,947d06d,f40f511]:- @css-modules-kit/core@1.3.0
@css-modules-kit/stylelint-plugin@1.3.0
Patch Changes
-
#408
947d06d- feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes propertyClass names referenced via
composes: foo;are now linked back to the.foo {...}declaration. Go to Definition jumps from a reference to the declaration, Find All References lists every reference site, and Rename updates the declaration and every reference together. Space-separated names (composes: foo bar;), comma-separated names (composes: foo, bar;), and mixes of both are supported.composes: global(foo);,composes: foo from global;, andcomposes: foo from '<specifier>';do not produce references (support forfrom '<specifier>'is planned).Two diagnostics are also emitted for invalid usage:
- Parse phase: a
fromclause not followed by a quoted specifier or theglobalkeyword is reported. - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as
Cannot find token '<name>'..
The
no-unused-class-namesrule in eslint-plugin and stylelint-plugin now treats names referenced viacomposesfrom within the same CSS as used, so they are no longer reported as unused. - Parse phase: a
-
Updated dependencies [
e9315e4,a247518,4f59d0c,947d06d,f40f511]:- @css-modules-kit/core@1.3.0
@css-modules-kit/ts-plugin@1.3.0
Minor Changes
-
#409
4f59d0c- feat(core, ts-plugin): supportcomposes: <name> from '<specifier>'Class names referenced via
composes: foo from './other.module.css';are now linked to the.foo {...}declaration in the referenced file. Go to Definition jumps from the reference to the declaration, Find All References lists reference sites across files, and Rename updates the declaration and every reference together.Two diagnostics are also emitted in the check phase:
Cannot import module '<specifier>'when the specifier cannot be resolved.Module '<specifier>' has no exported token '<name>'.when the referenced file does not export the token.
-
#408
947d06d- feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes propertyClass names referenced via
composes: foo;are now linked back to the.foo {...}declaration. Go to Definition jumps from a reference to the declaration, Find All References lists every reference site, and Rename updates the declaration and every reference together. Space-separated names (composes: foo bar;), comma-separated names (composes: foo, bar;), and mixes of both are supported.composes: global(foo);,composes: foo from global;, andcomposes: foo from '<specifier>';do not produce references (support forfrom '<specifier>'is planned).Two diagnostics are also emitted for invalid usage:
- Parse phase: a
fromclause not followed by a quoted specifier or theglobalkeyword is reported. - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as
Cannot find token '<name>'..
The
no-unused-class-namesrule in eslint-plugin and stylelint-plugin now treats names referenced viacomposesfrom within the same CSS as used, so they are no longer reported as unused. - Parse phase: a
Patch Changes
-
#410
41ec0a2- fix(ts-plugin): omit thedefaultmember from namespace member completionWhen
namedExportsis enabled andprioritizeNamedImportsis disabled, completing members of a namespace import (import * as styles from './a.module.css'; styles.) no longer suggests adefaultmember that the CSS module does not export. -
Updated dependencies [
e9315e4,a247518,4f59d0c,947d06d,f40f511]:- @css-modules-kit/core@1.3.0