Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
afc680cb29 | ||
|
7c769fee49 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-monorepo",
|
||||
"version": "0.31.1",
|
||||
"version": "0.32.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.31.1",
|
||||
"version": "0.32.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.31.1",
|
||||
"version": "0.32.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint-plugin-antfu",
|
||||
"version": "0.31.1",
|
||||
"version": "0.32.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.31.1",
|
||||
"version": "0.32.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
@@ -1,3 +1,5 @@
|
||||
const fs = require('fs')
|
||||
const { join } = require('path')
|
||||
const basic = require('@antfu/eslint-config-basic')
|
||||
|
||||
module.exports = {
|
||||
@@ -11,7 +13,30 @@ module.exports = {
|
||||
node: { extensions: ['.js', '.jsx', '.mjs', '.ts', '.tsx', '.d.ts'] },
|
||||
},
|
||||
},
|
||||
overrides: basic.overrides,
|
||||
overrides: basic.overrides.concat(
|
||||
!fs.existsSync(join(process.cwd(), 'tsconfig.json'))
|
||||
? []
|
||||
: [{
|
||||
parserOptions: {
|
||||
tsconfigRootDir: process.cwd(),
|
||||
project: ['tsconfig.json'],
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
excludedFiles: ['**/*.md/*.*'],
|
||||
files: ['*.ts', '*.tsx'],
|
||||
rules: {
|
||||
'no-throw-literal': 'off',
|
||||
'@typescript-eslint/no-throw-literal': 'error',
|
||||
'no-implied-eval': 'off',
|
||||
'@typescript-eslint/no-implied-eval': 'error',
|
||||
'dot-notation': 'off',
|
||||
'@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
|
||||
'no-void': ['error', { 'allowAsStatement': true }],
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
'@typescript-eslint/no-misused-promises': 'error',
|
||||
},
|
||||
}],
|
||||
),
|
||||
rules: {
|
||||
'import/named': 'off',
|
||||
|
||||
@@ -109,17 +134,6 @@ module.exports = {
|
||||
// antfu
|
||||
'antfu/generic-spacing': 'error',
|
||||
|
||||
// The following rule overrides require a parser service, aka. require a `typescript.json` path.
|
||||
// This needs to be done individually for each project, and it slows down linting significantly.
|
||||
// 'no-throw-literal': 'off',
|
||||
// '@typescript-eslint/no-throw-literal': 'error',
|
||||
// 'no-implied-eval': 'off',
|
||||
// '@typescript-eslint/no-implied-eval': 'error',
|
||||
// 'dot-notation': 'off',
|
||||
// '@typescript-eslint/dot-notation': ['error', { allowKeywords: true }],
|
||||
// '@typescript-eslint/no-floating-promises': 'error',
|
||||
// '@typescript-eslint/no-misused-promises': 'error',
|
||||
|
||||
// off
|
||||
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-ts",
|
||||
"version": "0.31.1",
|
||||
"version": "0.32.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.31.1",
|
||||
"version": "0.32.0",
|
||||
"description": "",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"license": "MIT",
|
||||
|
Reference in New Issue
Block a user