Skip to content

Commit

Permalink
chore: lint package.json & update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
leedom92 committed Aug 23, 2023
1 parent b2483e8 commit 4d374d5
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 36 deletions.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -26,7 +26,7 @@ pnpm add -D eslint @leedomjs/eslint-config
}
````

Add script for `package.json`
### Add script for `package.json`

For example:

Expand Down Expand Up @@ -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",
Expand All @@ -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)
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
10 changes: 5 additions & 5 deletions packages/eslint-config-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 4d374d5

Please sign in to comment.