Monorepo architecture tweaked from
@antfu/eslint-config
Personal ESLint config presets based on airbnb rules and other recommended presets. Used for:
- Linting JavaScript files
- Linting TypeScript files
- Linting Vue 3 applications
- Linting React applications
- Linting YML files
- Linting JSON files
- Ensuring consistent package.json properties order
# Using pnpm
pnpm add -D eslint @yungezeit/eslint-config
# Using yarn
yarn add -D eslint @yungezeit/eslint-config
# Using npm
npm i -D eslint @yungezeit/eslint-config
See Presets to refine your configuration install
Set the extends
property of ESLint's configuration :
{
"extends": "@yungezeit"
}
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
Create/edit the .vscode/settings.json
file and add the following:
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": [
"javascript",
"javascriptreact",
"yaml",
"json",
"jsonc",
"json5"
]
}
This will autofix files on save and let ESLint handle code formatting.
@yungezeit/eslint-config-base
This preset extends the following ones:
airbnb-base
plugin:import/recommended
plugin:jsonc/recommended-with-jsonc
plugin:yml/standard
plugin:markdown/recommended
@yungezeit/eslint-config-typescript
This preset extends the following ones:
plugin:import/typescript
plugin:@typescript-eslint/recommended
airbnb-typescript/base
@yungezeit/base
@yungezeit/eslint-config-react
This preset extends the following ones:
@yungezeit/eslint-config-vue
This preset extends the following ones:
@yungezeit/eslint-config-svelte
This preset extends the following ones:
@yungezeit/eslint-config-storybook
This preset extends the following ones: