# @jchiam/eslint-plugin-css-in-js

> A CSS-in-JS plugin for ESLint.

Latest version **1.0.0** (published 2026-04-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jchiam/eslint-plugin-css-in-js
pnpm add @jchiam/eslint-plugin-css-in-js
yarn add @jchiam/eslint-plugin-css-in-js
bun add @jchiam/eslint-plugin-css-in-js
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2026-04-05 |
| First published | 2022-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 25 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 0 |
| Author | Jonathan Chiam |
| Maintainers | jchiam |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/@jchiam/eslint-plugin-css-in-js
- Repository: https://github.com/jchiam/eslint-plugin-css-in-js
- Homepage: https://github.com/jchiam/eslint-plugin-css-in-js#readme
- Issues: https://github.com/jchiam/eslint-plugin-css-in-js/issues
- npm.io page: https://npm.io/package/@jchiam/eslint-plugin-css-in-js

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2026-04-05
- 0.0.3 — 2022-08-21
- 0.0.2 — 2022-08-17
- 0.0.1 — 2022-08-17
- 0.0.0 — 2022-08-17

## README

[![npm](https://img.shields.io/npm/v/@jchiam/eslint-plugin-css-in-js.svg)](https://npmjs.org/package/@jchiam/eslint-plugin-css-in-js)
[![Codecov](https://img.shields.io/codecov/c/github/jchiam/eslint-plugin-css-in-js.svg)](https://github.com/jchiam/eslint-plugin-css-in-js)
[![GitHub last commit](https://img.shields.io/github/last-commit/jchiam/eslint-plugin-css-in-js.svg)](https://github.com/jchiam/eslint-plugin-css-in-js/)
[![license](https://img.shields.io/github/license/jchiam/eslint-plugin-css-in-js.svg)](https://opensource.org/licenses/MIT)

# eslint-plugin-css-in-js

This plugin provides a collection of ESLint rules that help with linting CSS-in-JS codebases.

## Requirements

- ESLint 9 or 10
- Node.js >= 22

## Installation

```sh
npm i -D eslint @jchiam/eslint-plugin-css-in-js
```

## Usage

Add the plugin to your `eslint.config.js`:

```js
import cssInJs from '@jchiam/eslint-plugin-css-in-js';

export default [
  {
    plugins: {
      '@jchiam/css-in-js': cssInJs
    },
    rules: {
      '@jchiam/css-in-js/css-concentric-order': 'warn'
    }
  }
];
```

No rules are enabled by default — add only the rules you need.

## Supported Rules

- [css-concentric-order](https://github.com/jchiam/eslint-plugin-css-in-js/tree/master/src/rules/css-concentric-order#readme) — enforce concentric ordering of CSS-in-JS properties

## Breaking Changes

### v0 (legacy) to current

Migrated to [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files) (required for ESLint 9+). The `.eslintrc` format is no longer supported.

Plugin registration changes from `.eslintrc`:

```json
{
  "plugins": ["@jchiam/eslint-plugin-css-in-js"],
  "rules": {
    "@jchiam/css-in-js/css-concentric-order": "warn"
  }
}
```

To `eslint.config.js`:

```js
import cssInJs from '@jchiam/eslint-plugin-css-in-js';

export default [
  {
    plugins: { '@jchiam/css-in-js': cssInJs },
    rules: { '@jchiam/css-in-js/css-concentric-order': 'warn' }
  }
];
```

---
_Source: https://npm.io/package/@jchiam/eslint-plugin-css-in-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
