Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
40817389a1 | ||
|
79da8986db | ||
|
1c4260a937 |
@@ -6,8 +6,9 @@
|
||||
- Auto fix for formatting (aimed to be used standalone without Prettier)
|
||||
- Designed to work with TypeScript, Vue out-of-box
|
||||
- Lint also for json, yaml, markdown
|
||||
- Sorted imports, dangling commas for cleaner commit diff
|
||||
- Sorted imports, dangling commas
|
||||
- Reasonable defaults, best practices, only one-line of config
|
||||
- **Style principle**: Minimal for reading, stable for diff
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -54,6 +55,10 @@ Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?it
|
||||
}
|
||||
```
|
||||
|
||||
### TypeScript Aware Rules
|
||||
|
||||
Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root. Refer to [this file](https://github.com/antfu/eslint-config/blob/main/packages/typescript/index.js#L17).
|
||||
|
||||
## Extended Reading
|
||||
|
||||
Learn more about the context - [Why I don't use Prettier](https://antfu.me/posts/why-not-prettier).
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-monorepo",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@7.1.0",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "Anthony's ESLint config",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-basic",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-plugin-antfu",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/antfu/eslint-config",
|
||||
"main": "./dist/index.cjs",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-react",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -14,7 +14,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
overrides: basic.overrides.concat(
|
||||
!fs.existsSync(join(process.cwd(), 'tsconfig.json'))
|
||||
!fs.existsSync(join(process.cwd(), 'tsconfig.eslint.json'))
|
||||
? []
|
||||
: [{
|
||||
parserOptions: {
|
||||
@@ -31,7 +31,7 @@ module.exports = {
|
||||
'@typescript-eslint/no-implied-eval': 'error',
|
||||
'dot-notation': 'off',
|
||||
'@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
|
||||
'no-void': ['error', { 'allowAsStatement': true }],
|
||||
'no-void': ['error', { allowAsStatement: true }],
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
'@typescript-eslint/no-misused-promises': 'error',
|
||||
},
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-ts",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-vue",
|
||||
"version": "0.32.0",
|
||||
"version": "0.33.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
Reference in New Issue
Block a user