- Notifications
You must be signed in to change notification settings - Fork0
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.node,},},});
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
.
About
Various shared ESLint configurations for Zakodium projects
Resources
License
Stars
Watchers
Forks
Packages0
No packages published