Compare commits

..

9 Commits

Author SHA1 Message Date
Anthony Fu
1eb8214bb1 v0.12.1 2021-12-06 05:40:44 +08:00
Anthony Fu
6373bc7ec9 fix: rules 2021-12-06 05:40:37 +08:00
Anthony Fu
cc47ac65e6 v0.12.0 2021-12-04 23:56:56 +08:00
Anthony Fu
2e07691eeb feat: rules for tests 2021-12-04 23:56:37 +08:00
Anthony Fu
92540f2135 v0.11.1 2021-11-28 01:09:54 +08:00
Anthony Fu
eb76d9b8bb fix(vue): disable vue/multi-word-component-names 2021-11-28 01:09:24 +08:00
Anthony Fu
8b15a8349f v0.11.0 2021-11-28 01:02:05 +08:00
Anthony Fu
ffe704965f chore: update deps 2021-11-28 01:01:34 +08:00
云游君
3ac8a75af3 docs: add README (#66) 2021-10-31 22:58:00 +08:00
18 changed files with 595 additions and 411 deletions

View File

@@ -3,6 +3,47 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
### Bug Fixes
* rules ([6373bc7](https://github.com/antfu/eslint-config/commit/6373bc7ec95fd97379ee6b550148fa34f0611ace))
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
### Features
* rules for tests ([2e07691](https://github.com/antfu/eslint-config/commit/2e07691eebc3d74bf0c9d8b14cedc7ef7c89fbfb))
## [0.11.1](https://github.com/antfu/eslint-config/compare/v0.11.0...v0.11.1) (2021-11-27)
### Bug Fixes
* **vue:** disable `vue/multi-word-component-names` ([eb76d9b](https://github.com/antfu/eslint-config/commit/eb76d9b8bb2dd09ee8baaeec9c4e8610377e9e73))
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config-monorepo
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

53
README.md Normal file
View File

@@ -0,0 +1,53 @@
# @antfu/eslint-config
[![npm](https://img.shields.io/npm/v/@antfu/eslint-config)](https://npmjs.com/package/@antfu/eslint-config)
## Usage
### Install
```bash
pnpm add -D eslint @antfu/eslint-config
```
### Config `.eslintrc`
```json
{
"extends": [
"@antfu"
]
}
```
### Config `.eslintignore`
```txt
dist
public
```
### Add script for package.json
For example:
```json
{
"scripts": {
"lint": "eslint \"**/*.{vue,ts,js}\""
}
}
```
### Config VSCode auto fix
Create `.vscode/settings.json`
```json
{
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
```

View File

@@ -2,5 +2,5 @@
"packages": [ "packages": [
"packages/*" "packages/*"
], ],
"version": "0.10.0" "version": "0.12.1"
} }

View File

@@ -11,8 +11,8 @@
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "*", "@antfu/eslint-config": "*",
"eslint": "^8.0.1", "eslint": "^8.3.0",
"lerna": "^4.0.0", "lerna": "^4.0.0",
"typescript": "^4.4.4" "typescript": "^4.5.2"
} }
} }

View File

@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
**Note:** Version bump only for package @antfu/eslint-config
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
**Note:** Version bump only for package @antfu/eslint-config
## [0.11.1](https://github.com/antfu/eslint-config/compare/v0.11.0...v0.11.1) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

View File

@@ -1,6 +1,6 @@
{ {
"name": "@antfu/eslint-config", "name": "@antfu/eslint-config",
"version": "0.10.0", "version": "0.12.1",
"description": "", "description": "",
"keywords": [], "keywords": [],
"license": "MIT", "license": "MIT",
@@ -13,25 +13,25 @@
"eslint": ">=7.4.0" "eslint": ">=7.4.0"
}, },
"dependencies": { "dependencies": {
"@antfu/eslint-config-react": "^0.10.0", "@antfu/eslint-config-react": "^0.12.1",
"@antfu/eslint-config-vue": "^0.10.0", "@antfu/eslint-config-vue": "^0.12.1",
"@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.0.0", "@typescript-eslint/parser": "^5.4.0",
"eslint-config-standard": "^16.0.3", "eslint-config-standard": "^16.0.3",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^6.2.0", "eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.2", "eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsonc": "^1.7.0", "eslint-plugin-jsonc": "^2.0.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "^5.1.1",
"eslint-plugin-unicorn": "^37.0.1", "eslint-plugin-unicorn": "^39.0.0",
"eslint-plugin-vue": "7.19.1", "eslint-plugin-vue": "8.1.1",
"eslint-plugin-yml": "^0.10.1", "eslint-plugin-yml": "^0.12.0",
"jsonc-eslint-parser": "^1.4.1", "jsonc-eslint-parser": "^2.0.4",
"yaml-eslint-parser": "^0.4.1" "yaml-eslint-parser": "^0.5.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1" "eslint": "^8.3.0"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
### Bug Fixes
* rules ([6373bc7](https://github.com/antfu/eslint-config/commit/6373bc7ec95fd97379ee6b550148fa34f0611ace))
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
### Features
* rules for tests ([2e07691](https://github.com/antfu/eslint-config/commit/2e07691eebc3d74bf0c9d8b14cedc7ef7c89fbfb))
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config-basic
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

View File

@@ -31,8 +31,8 @@ module.exports = {
}, },
}, },
{ {
files: ["*.yaml", "*.yml"], files: ['*.yaml', '*.yml'],
parser: "yaml-eslint-parser", parser: 'yaml-eslint-parser',
}, },
{ {
files: ['package.json'], files: ['package.json'],
@@ -93,6 +93,12 @@ module.exports = {
'no-console': 'off', 'no-console': 'off',
}, },
}, },
{
files: ['*.test.ts', '*.test.js', '*.spec.ts', '*.spec.js'],
rules: {
'no-unused-expressions': 'off',
},
},
], ],
rules: { rules: {
// import // import
@@ -164,6 +170,17 @@ module.exports = {
'template-curly-spacing': 'error', 'template-curly-spacing': 'error',
'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }], 'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
'generator-star-spacing': 'off', 'generator-star-spacing': 'off',
'spaced-comment': ['error', 'always', {
line: {
markers: ['/'],
exceptions: ['/', '#'],
},
block: {
markers: ['!'],
exceptions: ['*'],
balanced: true,
},
}],
// best-practice // best-practice
'array-callback-return': 'error', 'array-callback-return': 'error',

View File

@@ -1,6 +1,6 @@
{ {
"name": "@antfu/eslint-config-basic", "name": "@antfu/eslint-config-basic",
"version": "0.10.0", "version": "0.12.1",
"description": "", "description": "",
"keywords": [], "keywords": [],
"license": "MIT", "license": "MIT",
@@ -19,17 +19,17 @@
"eslint-config-standard": "^16.0.3", "eslint-config-standard": "^16.0.3",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^6.2.0", "eslint-plugin-html": "^6.2.0",
"eslint-plugin-import": "^2.25.2", "eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsonc": "^1.7.0", "eslint-plugin-jsonc": "^2.0.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "^5.1.1",
"eslint-plugin-unicorn": "^37.0.1", "eslint-plugin-unicorn": "^39.0.0",
"eslint-plugin-yml": "^0.10.1", "eslint-plugin-yml": "^0.12.0",
"jsonc-eslint-parser": "^1.4.1", "jsonc-eslint-parser": "^2.0.4",
"yaml-eslint-parser": "^0.4.1" "yaml-eslint-parser": "^0.5.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1" "eslint": "^8.3.0"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
**Note:** Version bump only for package @antfu/eslint-config-react
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
**Note:** Version bump only for package @antfu/eslint-config-react
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config-react
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

View File

@@ -1,6 +1,6 @@
{ {
"name": "@antfu/eslint-config-react", "name": "@antfu/eslint-config-react",
"version": "0.10.0", "version": "0.12.1",
"description": "", "description": "",
"keywords": [], "keywords": [],
"license": "MIT", "license": "MIT",
@@ -19,12 +19,12 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@antfu/eslint-config-ts": "^0.10.0", "@antfu/eslint-config-ts": "^0.12.1",
"eslint-plugin-react": "^7.26.1" "eslint-plugin-react": "^7.27.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1", "eslint": "^8.3.0",
"react": "^17.0.2", "react": "^17.0.2",
"typescript": "^4.4.4" "typescript": "^4.5.2"
} }
} }

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
### Bug Fixes
* rules ([6373bc7](https://github.com/antfu/eslint-config/commit/6373bc7ec95fd97379ee6b550148fa34f0611ace))
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
**Note:** Version bump only for package @antfu/eslint-config-ts
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config-ts
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

View File

@@ -36,5 +36,6 @@ module.exports = {
'@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/ban-types': 'off', '@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-namespace': 'off',
}, },
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@antfu/eslint-config-ts", "name": "@antfu/eslint-config-ts",
"version": "0.10.0", "version": "0.12.1",
"description": "", "description": "",
"keywords": [], "keywords": [],
"license": "MIT", "license": "MIT",
@@ -17,11 +17,11 @@
"typescript": ">=3.9" "typescript": ">=3.9"
}, },
"dependencies": { "dependencies": {
"@antfu/eslint-config-basic": "^0.10.0", "@antfu/eslint-config-basic": "^0.12.1",
"@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.0.0" "@typescript-eslint/parser": "^5.4.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1" "eslint": "^8.3.0"
} }
} }

View File

@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.12.1](https://github.com/antfu/eslint-config/compare/v0.12.0...v0.12.1) (2021-12-05)
**Note:** Version bump only for package @antfu/eslint-config-vue
# [0.12.0](https://github.com/antfu/eslint-config/compare/v0.11.1...v0.12.0) (2021-12-04)
**Note:** Version bump only for package @antfu/eslint-config-vue
## [0.11.1](https://github.com/antfu/eslint-config/compare/v0.11.0...v0.11.1) (2021-11-27)
### Bug Fixes
* **vue:** disable `vue/multi-word-component-names` ([eb76d9b](https://github.com/antfu/eslint-config/commit/eb76d9b8bb2dd09ee8baaeec9c4e8610377e9e73))
# [0.11.0](https://github.com/antfu/eslint-config/compare/v0.10.0...v0.11.0) (2021-11-27)
**Note:** Version bump only for package @antfu/eslint-config-vue
# [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16) # [0.10.0](https://github.com/antfu/eslint-config/compare/v0.9.0...v0.10.0) (2021-10-16)

View File

@@ -19,9 +19,9 @@ module.exports = {
], ],
rules: { rules: {
'vue/max-attributes-per-line': ['warn', { singleline: 5 }], 'vue/max-attributes-per-line': ['warn', { singleline: 5 }],
'vue/html-self-closing': 'off',
'vue/no-v-html': 'off', 'vue/no-v-html': 'off',
'vue/require-prop-types': 'off', 'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off', 'vue/require-default-prop': 'off',
'vue/multi-word-component-names': 'off',
}, },
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@antfu/eslint-config-vue", "name": "@antfu/eslint-config-vue",
"version": "0.10.0", "version": "0.12.1",
"description": "", "description": "",
"keywords": [], "keywords": [],
"license": "MIT", "license": "MIT",
@@ -16,10 +16,10 @@
"access": "public" "access": "public"
}, },
"dependencies": { "dependencies": {
"@antfu/eslint-config-ts": "^0.10.0", "@antfu/eslint-config-ts": "^0.12.1",
"eslint-plugin-vue": "7.19.1" "eslint-plugin-vue": "^8.1.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.0.1" "eslint": "^8.3.0"
} }
} }

660
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff