A config by the 'team liebe' or 'team love' 💗 in english that lets you love your code by lending you a hand with powerful lints.
the configuration is splitted into logical components so that you only have to include the things you need.
- @eslint-config-liebe/eslint-config-base
- @eslint-config-liebe/eslint-config-jest
- @eslint-config-liebe/eslint-config-vitest
- @eslint-config-liebe/eslint-config-typescript
- @eslint-config-liebe/eslint-config-vue
In order to work around a known limitation in ESLint, we recommend you to use this package alongside @rushstack/eslint-patch, so that you don't have to install too many dependencies:
npm i -D @rushstack/eslint-patchEslint configs are installed with:
npm i -D @eslint-config-liebe/eslint-config-base
npm i -D @eslint-config-liebe/eslint-config-jest
npm i -D @eslint-config-liebe/eslint-config-vitest
npm i -D @eslint-config-liebe/eslint-config-typescript
npm i -D @eslint-config-liebe/eslint-config-vueInclude the configs you need in your .eslintrc and link your local tsconfig.json in case of typescript. The order is important!
require("@rushstack/eslint-patch/modern-module-resolution")
module.exports = {
extends: [
'@eslint-config-liebe/base',
// '@eslint-config-liebe/jest',
'@eslint-config-liebe/vitest',
'@eslint-config-liebe/typescript',
'@eslint-config-liebe/vue',
],
root: true,
parserOptions: {
project: 'tsconfig.json',
},
}Extend a tsconfig from either
- @eslint-config-liebe/eslint-config-typescript
- @eslint-config-liebe/eslint-config-vue
in your local tsconfig.json. include, types, paths and baseUrl are common properties which should be individually set.
{
"extends": "./node_modules/@eslint-config-liebe/eslint-config-typescript/tsconfig.json",
"compilerOptions": {
"baseUrl": "./resources/js",
"paths": {
"@/*": [
"*"
]
},
"types": [
"node",
"vitest/globals",
"vite/client",
],
},
"include": [
"resources/mix/*.js",
"resources/js/**/*.js",
"resources/js/**/*.ts",
"resources/js/**/*.vue"
]
}
yalc can add your current state of eslint-config-liebe in another project to be tested there.
In eslint-config-liebe project root run:
yalc publish package/base
yalc publish package/jest
yalc publish package/vitest
yalc publish package/typescript
yalc publish package/vueIn any local project root run to copy the package:
yalc add @eslint-config-liebe/[email protected]
yalc add @eslint-config-liebe/[email protected]
yalc add @eslint-config-liebe/[email protected]
yalc add @eslint-config-liebe/[email protected]
yalc add @eslint-config-liebe/[email protected]You may run to install the added packages' dependencies:
npm i # or similarInstead of yalc add there is yalc link to add a symbolic link rather then copying the package files.
Please look at CHANGELOG or Releases for information on what has changed recently.
The ISC License (ISC). Please see LICENSE for more information.