- Notifications
You must be signed in to change notification settings - Fork1
Various shared ESLint configurations for Zakodium projects
License
NotificationsYou must be signed in to change notification settings
zakodium/eslint-config
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Various shared ESLint configurations for Zakodium projects.
npm install -D eslint-config-zakodium eslint
Create a file namedeslint.config.mjs
at the root of the project and extend theconfig that you want to use. Example:
import{defineConfig}from'eslint/config';importtsfrom'eslint-config-zakodium/ts';importadonisV5from'eslint-config-zakodium/adonis-v5';exportdefaultdefineConfig(ts,adonisV5);
This package re-exportsglobals
for convenience:
import{defineConfig}from'eslint/config';import{globals}from'eslint-config-zakodium';exportdefaultdefineConfig({languageOptions:{globals:{ ...globals.nodeBuiltin,},},});
In a monorepo, you may want to apply different configs for different paths. ThedefineConfig
ESLint helper allows to do that withextends
:
import{defineConfig,globalIgnores}from'eslint/config';importtsfrom'eslint-config-zakodium/ts';importadonisV5from'eslint-config-zakodium/adonis-v5';importreactfrom'eslint-config-zakodium/react';exportdefaultdefineConfig(// 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],},);
zakodium/js
: Same ascheminfo/base.zakodium/ts
: Same ascheminfo-typescript/base. Also includescheminfo/base
!zakodium/jsdoc
: Same ascheminfo/jsdoc.zakodium/unicorn
: Same ascheminfo/unicorn.zakodium/react
: Same ascheminfo-react/basezakodium/adonis-v5
: Adapts some rules for AdonisJS 5 projects. Should be combined withzakodium/ts
.zakodium/tailwind
: Class rules for Tailwind CSS projects. Should only be used with Tailwind CSS v4.zakodium/vitest
: Same ascheminfo/vitest.zakodium/vitest-ts
: Same ascheminfo-typescript/vitest. Also includescheminfo/vitest
!
About
Various shared ESLint configurations for Zakodium projects
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Contributors4
Uh oh!
There was an error while loading.Please reload this page.