diff --git a/README.md b/README.md index 52530b5..3effd13 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ [![npm](https://img.shields.io/npm/v/@leedomjs/eslint-config?color=333&label=)](https://www.npmjs.com/package/@leedomjs/eslint-config) +- Support Vue 2 & 3 - Single quotes, no semi - Auto fix for formatting -- Available for vue 2 & 3 - Also lint for json - Only one-line of config @@ -26,7 +26,7 @@ pnpm add -D eslint @leedomjs/eslint-config } ```` -Add script for `package.json` +### Add script for `package.json` For example: @@ -57,7 +57,7 @@ Add the following settings to your `settings.json`: // It's better to put under project setting `.vscode/settings.json` // to avoid conflicts with working with different eslint configs. "eslint.validate": [ - "javascript", + "javascript",     "javascriptreact",     "vue", "json", @@ -69,13 +69,25 @@ Add the following settings to your `settings.json`: ### Tips -You can override the rules in your `.eslintrc` file. +- You can override the rules in your `.eslintrc` file. -```jsonc -{ - "extends": "@leedomjs", - "rules": { - // your rules... + ```jsonc + { + "extends": "@leedomjs", + "rules": { + // your rules... + } } -} -``` + ``` + +- No framework used, just for javascript, you can also use the package `@leedomjs/eslint-config-basic` + ```jsonc + // .eslintrc + { + "extends": "@leedomjs/eslint-config-basic" + } + + ``` + +### License +[MIT](https://github.com/leedomjs/eslint-config/blob/main/LICENSE) License © 2023-present [Leedom](https://github.com/leedom92) diff --git a/package.json b/package.json index 7aed065..82354af 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,15 @@ "private": true, "packageManager": "pnpm@8.6.12", "description": "Leedom's ESLint config presets", - "scripts": { - "lint": "eslint .", - "release": "bumpp -r && pnpm -r publish --access public" - }, "keywords": [ "eslint-config" ], "author": "Leedom", "license": "MIT", + "scripts": { + "lint": "eslint .", + "release": "bumpp -r && pnpm -r publish --access public" + }, "devDependencies": { "@leedomjs/eslint-config": "workspace:*", "bumpp": "^9.1.1", diff --git a/packages/eslint-config-basic/package.json b/packages/eslint-config-basic/package.json index 7a44203..9cb9369 100644 --- a/packages/eslint-config-basic/package.json +++ b/packages/eslint-config-basic/package.json @@ -3,27 +3,27 @@ "version": "0.4.0", "description": "", "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/leedomjs/eslint-config.git" - }, "keywords": [ "eslint-config" ], "author": "Leedom", "license": "MIT", + "homepage": "https://github.com/leedomjs/eslint-config", + "repository": { + "type": "git", + "url": "git+https://github.com/leedomjs/eslint-config.git" + }, "bugs": { "url": "https://github.com/leedomjs/eslint-config/issues" }, - "homepage": "https://github.com/leedomjs/eslint-config", "peerDependencies": { "eslint": ">=7.4.0" }, - "devDependencies": { - "eslint": "^8.47.0" - }, "dependencies": { "eslint-plugin-jsonc": "^2.9.0", "jsonc-eslint-parser": "^2.3.0" + }, + "devDependencies": { + "eslint": "^8.47.0" } } diff --git a/packages/eslint-config-vue/package.json b/packages/eslint-config-vue/package.json index 7297a93..f1e9501 100644 --- a/packages/eslint-config-vue/package.json +++ b/packages/eslint-config-vue/package.json @@ -3,19 +3,19 @@ "version": "0.4.0", "description": "", "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/leedomjs/eslint-config.git" - }, "keywords": [ "eslint-config" ], "author": "Leedom", "license": "MIT", + "homepage": "https://github.com/leedomjs/eslint-config", + "repository": { + "type": "git", + "url": "git+https://github.com/leedomjs/eslint-config.git" + }, "bugs": { "url": "https://github.com/leedomjs/eslint-config/issues" }, - "homepage": "https://github.com/leedomjs/eslint-config", "peerDependencies": { "eslint": ">=7.4.0" }, diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 3f386f2..467864a 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -3,26 +3,26 @@ "version": "0.4.0", "description": "Leedom's ESLint config presets", "main": "index.js", - "repository": { - "type": "git", - "url": "git+https://github.com/leedomjs/eslint-config.git" - }, "keywords": [ "eslint-config" ], "author": "Leedom", "license": "MIT", + "homepage": "https://github.com/leedomjs/eslint-config", + "repository": { + "type": "git", + "url": "git+https://github.com/leedomjs/eslint-config.git" + }, "bugs": { "url": "https://github.com/leedomjs/eslint-config/issues" }, - "homepage": "https://github.com/leedomjs/eslint-config", "peerDependencies": { "eslint": ">=7.4.0" }, - "devDependencies": { - "eslint": "^8.47.0" - }, "dependencies": { "@leedomjs/eslint-config-vue": "workspace:*" + }, + "devDependencies": { + "eslint": "^8.47.0" } }