{"name":"eslint-cssicorn","version":"0.0.0-stage","_id":"eslint-cssicorn@0.0.0-stage","stub":true,"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"82a2df0ed2b946972c3f5fac1b544589ff2fa0a2","tarball":"http://registry-npm.ywwl.com/eslint-cssicorn/download/eslint-cssicorn-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-sqeYViRdHY8Jy94eu12m0Qv/dExcau0YuGRikQmv6zQHGmw9bpuy+Mz6L0aFaeNh6zD1nD99PAA5ONcYsmTVCw==","signatures":[{"sig":"MEQCIB0KGoI/Z/8rycjXDaOUQZBrIfnHEtUPoT8FaBvuxBCrAiAIcxy/RzmK4pOBUkIvX8OrNvAPFDR1BfjWKxqAJy2DWA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":337,"size":365,"noattachment":false,"key":"/eslint-cssicorn/-/eslint-cssicorn-0.0.0-stage.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{},"readme":"# eslint-cssicorn\n\n> Powerful ESLint rules for CSS\n\nThe rules work with the [`@eslint/css`](https://github.com/eslint/css) language plugin.\n\n[`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn#non-javascript-files) has more rules that also lint CSS, such as `no-zero-fractions` and `no-shorthand-property-overrides`.\n\n[**Propose a new rule ➡**](.github/contributing.md)\n\n*We do not accept pull requests because of too much AI slop.*\n\n## Install\n\n```sh\nnpm install --save-dev eslint @eslint/css eslint-cssicorn\n```\n\n**Requires ESLint `>=10.4`, [flat config](https://eslint.org/docs/latest/use/configure/configuration-files), and [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c#how-can-i-make-my-typescript-project-output-esm).**\n\n## Usage\n\nUse a [preset config](#preset-configs) or configure each rule in `eslint.config.js`.\n\nIf you don't use a preset, set `language: 'css/css'` and add the `@eslint/css` plugin, as shown below.\n\n```js\nimport css from '@eslint/css';\nimport cssicorn from 'eslint-cssicorn';\nimport {defineConfig} from 'eslint/config';\n\nexport default defineConfig([\n\t{\n\t\tfiles: ['**/*.css'],\n\t\tplugins: {\n\t\t\tcss,\n\t\t\tcssicorn,\n\t\t},\n\t\tlanguage: 'css/css',\n\t\trules: {\n\t\t\t'cssicorn/prefer-short-hex-color': 'error',\n\t\t\t'cssicorn/…': 'error',\n\t\t},\n\t},\n\t// …\n]);\n```\n\n## Embedded CSS\n\nTo lint fenced CSS blocks in Markdown, configure the [`@eslint/markdown` processor](https://github.com/eslint/markdown/blob/main/docs/processors/markdown.md). The presets match its extracted `.css` files. Lint Markdown prose separately.\n\n```js\nimport markdown from '@eslint/markdown';\nimport cssicorn from 'eslint-cssicorn';\n\nexport default [\n\t{\n\t\tfiles: ['**/*.md'],\n\t\tplugins: {markdown},\n\t\tlanguage: 'markdown/commonmark',\n\t\tprocessor: 'markdown/markdown',\n\t},\n\tcssicorn.configs.recommended,\n];\n```\n\n## Rules\n\n<!-- Do not manually modify this list. Run: `npm run fix:eslint-docs` -->\n<!-- begin auto-generated rules list -->\n\n💼 [Configurations](https://github.com/sindresorhus/eslint-cssicorn#recommended-config) enabled in.\\\n✅ Set in the `recommended` [configuration](https://github.com/sindresorhus/eslint-cssicorn#recommended-config).\\\n☑️ Set in the `unopinionated` [configuration](https://github.com/sindresorhus/eslint-cssicorn#recommended-config).\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\\\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n| Name                                                                                           | Description                                                                                                  | 💼   | 🔧 | 💡 |\n| :--------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------- | :--- | :- | :- |\n| [consistent-compound-selector-order](docs/rules/consistent-compound-selector-order.md)         | Enforce consistent ordering of compound selector components.                                                 | ✅    | 🔧 |    |\n| [consistent-layer-order](docs/rules/consistent-layer-order.md)                                 | Enforce consistent ordering of cascade layer statements.                                                     | ✅    | 🔧 |    |\n| [consistent-property-order](docs/rules/consistent-property-order.md)                           | Enforce consistent ordering of CSS properties.                                                               |      | 🔧 | 💡 |\n| [consistent-value-order](docs/rules/consistent-value-order.md)                                 | Enforce consistent ordering of CSS value components.                                                         | ✅    | 🔧 |    |\n| [lowercase](docs/rules/lowercase.md)                                                           | Enforce lowercase CSS syntax.                                                                                | ✅    | 🔧 |    |\n| [no-clamped-values](docs/rules/no-clamped-values.md)                                           | Disallow CSS values that browsers silently clamp.                                                            | ✅    |    |    |\n| [no-declarations-after-nested-rules](docs/rules/no-declarations-after-nested-rules.md)         | Disallow declarations after nested rules.                                                                    | ✅ ☑️ |    |    |\n| [no-deprecated-features](docs/rules/no-deprecated-features.md)                                 | Disallow deprecated CSS features.                                                                            | ✅    | 🔧 | 💡 |\n| [no-descending-specificity](docs/rules/no-descending-specificity.md)                           | Disallow lower-specificity selectors from following higher-specificity selectors that set the same property. |      |    |    |\n| [no-disabled-pinch-zoom](docs/rules/no-disabled-pinch-zoom.md)                                 | Disallow `touch-action` values that disable browser pinch zoom.                                              | ✅    |    | 💡 |\n| [no-duplicate-at-rule-definitions](docs/rules/no-duplicate-at-rule-definitions.md)             | Disallow duplicate named at-rule definitions.                                                                | ✅    |    |    |\n| [no-duplicate-font-family-names](docs/rules/no-duplicate-font-family-names.md)                 | Disallow duplicate font family names.                                                                        | ✅ ☑️ | 🔧 |    |\n| [no-duplicate-properties](docs/rules/no-duplicate-properties.md)                               | Disallow duplicate properties within CSS declaration blocks.                                                 | ✅    |    | 💡 |\n| [no-duplicate-selectors](docs/rules/no-duplicate-selectors.md)                                 | Disallow duplicate CSS selectors.                                                                            | ✅    | 🔧 |    |\n| [no-ineffective-keyframe-declarations](docs/rules/no-ineffective-keyframe-declarations.md)     | Disallow ineffective declarations in keyframes.                                                              | ✅ ☑️ | 🔧 |    |\n| [no-ineffective-overrides](docs/rules/no-ineffective-overrides.md)                             | Disallow state and conditional overrides blocked by cascade priority.                                        | ✅    |    |    |\n| [no-ineffective-properties](docs/rules/no-ineffective-properties.md)                           | Disallow properties that have no effect given other declarations or shorthand defaults.                      | ✅ ☑️ |    |    |\n| [no-ineffective-selector-properties](docs/rules/no-ineffective-selector-properties.md)         | Disallow properties that cannot affect their selected targets.                                               | ✅ ☑️ | 🔧 |    |\n| [no-ineffective-supports-conditions](docs/rules/no-ineffective-supports-conditions.md)         | Disallow supports conditions that do not test their value functions.                                         | ✅    |    |    |\n| [no-ineffective-transitions](docs/rules/no-ineffective-transitions.md)                         | Disallow transition targets that cannot transition under the declared behavior.                              | ✅ ☑️ |    | 💡 |\n| [no-invalid-media-features](docs/rules/no-invalid-media-features.md)                           | Disallow unknown media features, invalid values, and invalid notation.                                       | ✅ ☑️ |    |    |\n| [no-invalid-property-references](docs/rules/no-invalid-property-references.md)                 | Disallow invalid property references in transitions and will-change.                                         | ✅ ☑️ |    |    |\n| [no-layout-animations](docs/rules/no-layout-animations.md)                                     | Disallow animating properties that can affect layout.                                                        |      |    |    |\n| [no-nesting-with-mixed-specificity](docs/rules/no-nesting-with-mixed-specificity.md)           | Disallow mixed specificity in nesting parents and selector-list pseudo-classes.                              | ✅    |    |    |\n| [no-overflow-axis-coercion](docs/rules/no-overflow-axis-coercion.md)                           | Disallow overflow values that are coerced by the other axis.                                                 | ✅ ☑️ |    |    |\n| [no-redundant-functions](docs/rules/no-redundant-functions.md)                                 | Disallow redundant function calls and arguments.                                                             | ✅    | 🔧 |    |\n| [no-redundant-longhand-properties](docs/rules/no-redundant-longhand-properties.md)             | Disallow longhand properties that can be combined into a shorthand.                                          | ✅    | 🔧 |    |\n| [no-redundant-nested-style-rules](docs/rules/no-redundant-nested-style-rules.md)               | Disallow nested style rules that do not modify the parent selector.                                          | ✅    | 🔧 |    |\n| [no-redundant-nesting-selector](docs/rules/no-redundant-nesting-selector.md)                   | Disallow redundant nesting selectors.                                                                        | ✅    | 🔧 |    |\n| [no-redundant-shorthand-values](docs/rules/no-redundant-shorthand-values.md)                   | Disallow redundant values in CSS shorthand properties.                                                       | ✅    | 🔧 |    |\n| [no-self-referencing-custom-properties](docs/rules/no-self-referencing-custom-properties.md)   | Disallow cyclic dependencies in CSS custom properties.                                                       | ✅ ☑️ |    |    |\n| [no-unknown-animations](docs/rules/no-unknown-animations.md)                                   | Disallow unknown animations.                                                                                 |      |    |    |\n| [no-unknown-annotations](docs/rules/no-unknown-annotations.md)                                 | Disallow unknown and noncanonical CSS annotations.                                                           | ✅ ☑️ |    | 💡 |\n| [no-unknown-pseudo-selectors](docs/rules/no-unknown-pseudo-selectors.md)                       | Disallow unknown pseudo-class and pseudo-element selectors.                                                  | ✅ ☑️ |    |    |\n| [no-unscoped-nesting-selector](docs/rules/no-unscoped-nesting-selector.md)                     | Disallow unscoped CSS nesting selectors.                                                                     | ✅ ☑️ |    |    |\n| [no-useless-is](docs/rules/no-useless-is.md)                                                   | Disallow unnecessary `:is()` wrappers.                                                                       | ✅ ☑️ | 🔧 |    |\n| [no-zero-length-unit](docs/rules/no-zero-length-unit.md)                                       | Disallow units on zero CSS lengths.                                                                          | ✅    | 🔧 |    |\n| [prefer-aspect-ratio](docs/rules/prefer-aspect-ratio.md)                                       | Prefer `aspect-ratio` over zero-height percentage-padding workarounds.                                       | ✅    |    |    |\n| [prefer-clamp](docs/rules/prefer-clamp.md)                                                     | Prefer `clamp()` over nested `min()` and `max()`.                                                            | ✅ ☑️ | 🔧 |    |\n| [prefer-current-color](docs/rules/prefer-current-color.md)                                     | Prefer currentcolor over repeating the foreground color.                                                     | ✅    |    | 💡 |\n| [prefer-existing-custom-properties](docs/rules/prefer-existing-custom-properties.md)           | Prefer existing custom properties over matching literal values.                                              | ✅    |    | 💡 |\n| [prefer-explicit-viewport-units](docs/rules/prefer-explicit-viewport-units.md)                 | Prefer explicit viewport units.                                                                              | ✅    |    | 💡 |\n| [prefer-individual-transform-properties](docs/rules/prefer-individual-transform-properties.md) | Prefer individual transform properties over transform functions.                                             | ✅    |    | 💡 |\n| [prefer-light-dark](docs/rules/prefer-light-dark.md)                                           | Prefer `light-dark()` over paired light and dark color declarations.                                         | ✅    |    | 💡 |\n| [prefer-media-feature-range-syntax](docs/rules/prefer-media-feature-range-syntax.md)           | Prefer modern media feature range syntax.                                                                    | ✅    | 🔧 | 💡 |\n| [prefer-merged-rules](docs/rules/prefer-merged-rules.md)                                       | Prefer merging adjacent rules with identical declarations or conditions.                                     | ✅    | 🔧 |    |\n| [prefer-modern-syntax](docs/rules/prefer-modern-syntax.md)                                     | Prefer modern CSS color and pseudo-element syntax.                                                           | ✅    | 🔧 |    |\n| [prefer-nesting](docs/rules/prefer-nesting.md)                                                 | Prefer CSS nesting for related rules and selector groups.                                                    | ✅    | 🔧 |    |\n| [prefer-relative-colors](docs/rules/prefer-relative-colors.md)                                 | Prefer relative colors for alpha variants of existing color custom properties.                               | ✅    |    | 💡 |\n| [prefer-short-hex-color](docs/rules/prefer-short-hex-color.md)                                 | Prefer short hexadecimal color notation.                                                                     | ✅    | 🔧 |    |\n| [require-prefers-reduced-motion](docs/rules/require-prefers-reduced-motion.md)                 | Require motion effects inside `prefers-reduced-motion: no-preference` media queries.                         |      |    |    |\n| [require-property-descriptors](docs/rules/require-property-descriptors.md)                     | Require descriptors in CSS `@property` rules.                                                                | ✅ ☑️ |    |    |\n| [require-selector-scope](docs/rules/require-selector-scope.md)                                 | Require a positive scoping boundary for every selector.                                                      |      |    |    |\n\n<!-- end auto-generated rules list -->\n\n## Preset configs\n\nSee the [ESLint docs](https://eslint.org/docs/latest/use/configure/configuration-files) for more information about extending config files.\n\n**Note**: The preset configs apply to `**/*.css` files. They also set `language: 'css/css'` and add the `@eslint/css` plugin.\n\n### Recommended config\n\nThis plugin exports a `recommended` config that enforces good practices.\n\n```js\nimport cssicorn from 'eslint-cssicorn';\nimport {defineConfig} from 'eslint/config';\n\nexport default defineConfig([\n\t// …\n\tcssicorn.configs.recommended,\n\t{\n\t\tfiles: ['**/*.css'],\n\t\trules: {\n\t\t\t'cssicorn/no-unknown-animations': 'error',\n\t\t},\n\t},\n]);\n```\n\n### Unopinionated config\n\nThis plugin exports an `unopinionated` config with bug checks and straightforward simplifications.\n\n```js\nimport cssicorn from 'eslint-cssicorn';\nimport {defineConfig} from 'eslint/config';\n\nexport default defineConfig([\n\t// …\n\tcssicorn.configs.unopinionated,\n]);\n```\n\n### All config\n\nThis plugin exports an `all` config that enables every rule.\n\n```js\nimport cssicorn from 'eslint-cssicorn';\nimport {defineConfig} from 'eslint/config';\n\nexport default defineConfig([\n\t// …\n\tcssicorn.configs.all,\n\t{\n\t\tfiles: ['**/*.css'],\n\t\trules: {\n\t\t\t'cssicorn/prefer-short-hex-color': 'off',\n\t\t},\n\t},\n]);\n```\n\n## Related\n\n- [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) — More than 300 powerful ESLint rules. Some of them also lint CSS.\n- [eslint-node-test](https://github.com/sindresorhus/eslint-node-test) — ESLint rules for the Node.js built-in test runner.\n- [eslint-package-json](https://github.com/sindresorhus/eslint-package-json) — Powerful ESLint rules for `package.json`.\n- [eslint-soml](https://github.com/soml-lang/eslint-soml) — ESLint rules for SOML config files.\n","publish_time":1791001996000,"_cnpm_publish_time":1791001996000,"dist-tags":{"latest":"0.3.0"}}