https://github.com/zakodium/eslint-config
Various shared ESLint configurations for Zakodium projects
https://github.com/zakodium/eslint-config
Last synced: 5 months ago
JSON representation
Various shared ESLint configurations for Zakodium projects
- Host: GitHub
- URL: https://github.com/zakodium/eslint-config
- Owner: zakodium
- License: mit
- Created: 2020-07-28T11:32:22.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-11-11T13:55:02.000Z (7 months ago)
- Last Synced: 2025-11-11T15:22:53.174Z (7 months ago)
- Language: JavaScript
- Size: 108 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-zakodium
Various shared ESLint configurations for Zakodium projects.
## Installation
```console
npm install -D eslint-config-zakodium eslint
```
## Configuration
Create a file named `eslint.config.mjs` at the root of the project and extend the
config that you want to use. Example:
```js
import { defineConfig } from 'eslint/config';
import ts from 'eslint-config-zakodium/ts';
import adonisV5 from 'eslint-config-zakodium/adonis-v5';
export default defineConfig(ts, adonisV5);
```
### Globals
This package re-exports [`globals`](https://github.com/sindresorhus/globals) for convenience:
```js
import { defineConfig } from 'eslint/config';
import { globals } from 'eslint-config-zakodium';
export default defineConfig({
languageOptions: {
globals: {
...globals.nodeBuiltin,
},
},
});
```
### Monorepo
In a monorepo, you may want to apply different configs for different paths. The `defineConfig` ESLint helper allows to do that with `extends`:
```js
import { defineConfig, globalIgnores } from 'eslint/config';
import ts from 'eslint-config-zakodium/ts';
import adonisV5 from 'eslint-config-zakodium/adonis-v5';
import react from 'eslint-config-zakodium/react';
export default defineConfig(
// Global ignore patterns.
globalIgnores(['**/build']),
// Apply TypeScript config on the whole project.
ts,
{
// Apply Adonis v5 config only to the api.
files: ['api/**'],
extends: [adonisV5],
},
{
// Apply React config only to the frontend.
files: ['front/**'],
extends: [react],
},
);
```
## Available configs
- `zakodium/js`: Same as [cheminfo/base](https://github.com/cheminfo/eslint-config/blob/main/configs/base.js).
- `zakodium/ts`: Same as [cheminfo-typescript/base](https://github.com/cheminfo/eslint-config-cheminfo-typescript/blob/main/configs/base.js). Also includes `cheminfo/base`!
- `zakodium/jsdoc`: Same as [cheminfo/jsdoc](https://github.com/cheminfo/eslint-config/blob/main/configs/jsdoc.js).
- `zakodium/unicorn`: Same as [cheminfo/unicorn](https://github.com/cheminfo/eslint-config/blob/main/configs/unicorn.js).
- `zakodium/react`: Same as [cheminfo-react/base](https://github.com/cheminfo/eslint-config-cheminfo-react/blob/main/base.js)
- `zakodium/adonis-v5`: Adapts some rules for AdonisJS 5 projects. Should be combined with `zakodium/ts`.
- `zakodium/tailwind`: Class rules for Tailwind CSS projects. Should only be used with Tailwind CSS v4.
- `zakodium/vitest`: Same as [cheminfo/vitest](https://github.com/cheminfo/eslint-config/blob/main/configs/vitest.js).
- `zakodium/vitest-ts`: Same as [cheminfo-typescript/vitest](https://github.com/cheminfo/eslint-config-cheminfo-typescript/blob/main/configs/vitest.js). Also includes `cheminfo/vitest`!