Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6080d3f74d | ||
|
b996c58bac | ||
|
b8fe1fabea | ||
|
0ab9f88603 | ||
|
17670e8e38 | ||
|
686f285a37 | ||
|
2d9efd4df6 | ||
|
b8e6cdf047 | ||
|
50c962197b | ||
|
bf19dc0adb | ||
|
38f64ae9af | ||
|
22527f61de | ||
|
1ff53f2f04 | ||
|
316bbd903b | ||
|
bce5016b53 | ||
|
ddd34a9465 | ||
|
2f1c785eef | ||
|
4eb7aee28e | ||
|
769bee0139 | ||
|
07a15be095 | ||
|
0af15d4bf4 | ||
|
d23abea648 | ||
|
eaff018580 | ||
|
327ab9dd35 | ||
|
ea70c5c6aa | ||
|
2e9948029c | ||
|
a6692cc074 | ||
|
ded3cf2da2 |
@@ -34,7 +34,8 @@ For example:
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"lint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -54,7 +55,9 @@ Create `.vscode/settings.json`
|
||||
|
||||
## Check Also
|
||||
|
||||
- [antfu/dotfiles](https://github.com/antfu/dotfiles) - My dotfiles
|
||||
- [antfu/vscode-settings](https://github.com/antfu/vscode-settings) - My VS Code settings
|
||||
- [antfu/eslint-config](https://github.com/antfu/eslint-config) - My ESLint config
|
||||
- [antfu/ts-starter](https://github.com/antfu/ts-starter) - My starter template for TypeScript library
|
||||
- [antfu/vitesse](https://github.com/antfu/vitesse) - My starter template for Vue & Vite app
|
||||
|
||||
|
@@ -1,17 +1,19 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-monorepo",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"prepare": "pnpm -r run stub",
|
||||
"release": "bumpp package.json packages/*/package.json --commit --push --tag && pnpm -r publish --access public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "*",
|
||||
"bumpp": "^7.1.1",
|
||||
"eslint": "^8.12.0",
|
||||
"eslint": "^8.14.0",
|
||||
"eslint-plugin-antfu": "workspace:*",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
@@ -13,24 +13,24 @@
|
||||
"eslint": ">=7.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-react": "^0.19.1",
|
||||
"@antfu/eslint-config-vue": "^0.19.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
||||
"@typescript-eslint/parser": "^5.17.0",
|
||||
"@antfu/eslint-config-react": "workspace:*",
|
||||
"@antfu/eslint-config-vue": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||
"@typescript-eslint/parser": "^5.20.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-html": "^6.2.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsonc": "^2.2.1",
|
||||
"eslint-plugin-n": "^15.1.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-unicorn": "^41.0.1",
|
||||
"eslint-plugin-vue": "^8.5.0",
|
||||
"eslint-plugin-unicorn": "^42.0.0",
|
||||
"eslint-plugin-vue": "^8.7.1",
|
||||
"eslint-plugin-yml": "^0.14.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"yaml-eslint-parser": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.12.0"
|
||||
"eslint": "^8.14.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -32,6 +32,7 @@ module.exports = {
|
||||
plugins: [
|
||||
'html',
|
||||
'unicorn',
|
||||
'antfu',
|
||||
],
|
||||
settings: {
|
||||
'import/resolver': {
|
||||
@@ -43,9 +44,9 @@ module.exports = {
|
||||
files: ['*.json', '*.json5'],
|
||||
parser: 'jsonc-eslint-parser',
|
||||
rules: {
|
||||
'quotes': ['error', 'double'],
|
||||
'quote-props': ['error', 'always'],
|
||||
'comma-dangle': ['error', 'never'],
|
||||
'jsonc/quotes': ['error', 'double'],
|
||||
'jsonc/quote-props': ['error', 'always'],
|
||||
'jsonc/comma-dangle': ['error', 'never'],
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -134,6 +135,7 @@ module.exports = {
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/comma-dangle': 'off',
|
||||
'import/no-unresolved': 'off',
|
||||
'no-alert': 'off',
|
||||
'no-console': 'off',
|
||||
@@ -181,7 +183,15 @@ module.exports = {
|
||||
],
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'no-return-await': 'off',
|
||||
'space-before-function-paren': ['error', 'never'],
|
||||
'space-before-function-paren': [
|
||||
'error',
|
||||
{
|
||||
anonymous: 'always',
|
||||
named: 'never',
|
||||
asyncArrow: 'always',
|
||||
},
|
||||
],
|
||||
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 1 }],
|
||||
|
||||
// es6
|
||||
'no-var': 'error',
|
||||
@@ -288,5 +298,10 @@ module.exports = {
|
||||
// yml
|
||||
'yml/quotes': ['error', { prefer: 'single', avoidEscape: false }],
|
||||
'yml/no-empty-document': 'off',
|
||||
|
||||
// antfu
|
||||
'antfu/if-newline': 'error',
|
||||
'antfu/import-dedupe': 'error',
|
||||
// 'antfu/prefer-inline-type-import': 'error',
|
||||
},
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-basic",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
@@ -16,20 +16,21 @@
|
||||
"eslint": ">=7.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-plugin-antfu": "workspace:*",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-html": "^6.2.0",
|
||||
"eslint-plugin-import": "^2.25.4",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsonc": "^2.2.1",
|
||||
"eslint-plugin-markdown": "^2.2.1",
|
||||
"eslint-plugin-n": "^15.1.0",
|
||||
"eslint-plugin-promise": "^6.0.0",
|
||||
"eslint-plugin-unicorn": "^41.0.1",
|
||||
"eslint-plugin-unicorn": "^42.0.0",
|
||||
"eslint-plugin-yml": "^0.14.0",
|
||||
"jsonc-eslint-parser": "^2.1.0",
|
||||
"yaml-eslint-parser": "^0.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.12.0"
|
||||
"eslint": "^8.14.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@@ -202,7 +202,14 @@ module.exports = {
|
||||
'semi': ['error', 'never'],
|
||||
'semi-spacing': ['error', { before: false, after: true }],
|
||||
'space-before-blocks': ['error', 'always'],
|
||||
'space-before-function-paren': ['error', 'always'],
|
||||
'space-before-function-paren': [
|
||||
'error',
|
||||
{
|
||||
'anonymous': 'always',
|
||||
'named': 'never',
|
||||
'asyncArrow': 'always'
|
||||
}
|
||||
],
|
||||
'space-in-parens': ['error', 'never'],
|
||||
'space-infix-ops': 'error',
|
||||
'space-unary-ops': ['error', { words: true, nonwords: false }],
|
||||
|
6
packages/eslint-plugin-antfu/.eslintrc.json
Normal file
6
packages/eslint-plugin-antfu/.eslintrc.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "@antfu",
|
||||
"plugins": [
|
||||
"antfu"
|
||||
]
|
||||
}
|
12
packages/eslint-plugin-antfu/build.config.ts
Normal file
12
packages/eslint-plugin-antfu/build.config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defineBuildConfig } from 'unbuild'
|
||||
|
||||
export default defineBuildConfig({
|
||||
entries: [
|
||||
'src/index',
|
||||
],
|
||||
declaration: true,
|
||||
clean: true,
|
||||
rollup: {
|
||||
emitCJS: true,
|
||||
},
|
||||
})
|
31
packages/eslint-plugin-antfu/package.json
Normal file
31
packages/eslint-plugin-antfu/package.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "eslint-plugin-antfu",
|
||||
"version": "0.21.1",
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": "./dist/index.cjs",
|
||||
"import": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rimraf dist && unbuild",
|
||||
"stub": "unbuild --stub",
|
||||
"test": "vitest",
|
||||
"prepublishOnly": "nr build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/utils": "^5.20.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"unbuild": "^0.7.4",
|
||||
"vitest": "^0.9.4"
|
||||
}
|
||||
}
|
11
packages/eslint-plugin-antfu/src/index.ts
Normal file
11
packages/eslint-plugin-antfu/src/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import ifNewline from './rules/if-newline'
|
||||
import importDedupe from './rules/import-dedupe'
|
||||
import preferInlineTypeImport from './rules/prefer-inline-type-import'
|
||||
|
||||
export default {
|
||||
rules: {
|
||||
'if-newline': ifNewline,
|
||||
'import-dedupe': importDedupe,
|
||||
'prefer-inline-type-import': preferInlineTypeImport,
|
||||
},
|
||||
}
|
30
packages/eslint-plugin-antfu/src/rules/if-newline.test.ts
Normal file
30
packages/eslint-plugin-antfu/src/rules/if-newline.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { RuleTester } from '@typescript-eslint/utils/dist/ts-eslint'
|
||||
import { it } from 'vitest'
|
||||
import rule, { RULE_NAME } from './if-newline'
|
||||
|
||||
const valids = [
|
||||
`if (true)
|
||||
console.log('hello')
|
||||
`,
|
||||
`if (true) {
|
||||
console.log('hello')
|
||||
}`,
|
||||
]
|
||||
const invalids = [
|
||||
['if (true) console.log(\'hello\')', 'if (true) \nconsole.log(\'hello\')'],
|
||||
]
|
||||
|
||||
it('runs', () => {
|
||||
const ruleTester: RuleTester = new RuleTester({
|
||||
parser: require.resolve('@typescript-eslint/parser'),
|
||||
})
|
||||
|
||||
ruleTester.run(RULE_NAME, rule, {
|
||||
valid: valids,
|
||||
invalid: invalids.map(i => ({
|
||||
code: i[0],
|
||||
output: i[1],
|
||||
errors: [{ messageId: 'missingIfNewline' }],
|
||||
})),
|
||||
})
|
||||
})
|
45
packages/eslint-plugin-antfu/src/rules/if-newline.ts
Normal file
45
packages/eslint-plugin-antfu/src/rules/if-newline.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { createEslintRule } from '../utils'
|
||||
|
||||
export const RULE_NAME = 'if-newline'
|
||||
export type MessageIds = 'missingIfNewline'
|
||||
export type Options = []
|
||||
|
||||
export default createEslintRule<Options, MessageIds>({
|
||||
name: RULE_NAME,
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'Newline after if',
|
||||
recommended: 'error',
|
||||
},
|
||||
fixable: 'code',
|
||||
schema: [],
|
||||
messages: {
|
||||
missingIfNewline: 'Expect newline after if',
|
||||
},
|
||||
},
|
||||
defaultOptions: [],
|
||||
create: (context) => {
|
||||
return {
|
||||
IfStatement(node) {
|
||||
if (!node.consequent)
|
||||
return
|
||||
if (node.consequent.type === 'BlockStatement')
|
||||
return
|
||||
if (node.test.loc.end.line === node.consequent.loc.start.line) {
|
||||
context.report({
|
||||
node,
|
||||
loc: {
|
||||
start: node.test.loc.end,
|
||||
end: node.consequent.loc.start,
|
||||
},
|
||||
messageId: 'missingIfNewline',
|
||||
fix(fixer) {
|
||||
return fixer.replaceTextRange([node.consequent.range[0], node.consequent.range[0]], '\n')
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
28
packages/eslint-plugin-antfu/src/rules/import-dedupe.test.ts
Normal file
28
packages/eslint-plugin-antfu/src/rules/import-dedupe.test.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { RuleTester } from '@typescript-eslint/utils/dist/ts-eslint'
|
||||
import { it } from 'vitest'
|
||||
import rule, { RULE_NAME } from './import-dedupe'
|
||||
|
||||
const valids = [
|
||||
'import { a } from \'foo\'',
|
||||
]
|
||||
const invalids = [
|
||||
[
|
||||
'import { a, b, a, a, c, a } from \'foo\'',
|
||||
'import { a, b, c, } from \'foo\'',
|
||||
],
|
||||
]
|
||||
|
||||
it('runs', () => {
|
||||
const ruleTester: RuleTester = new RuleTester({
|
||||
parser: require.resolve('@typescript-eslint/parser'),
|
||||
})
|
||||
|
||||
ruleTester.run(RULE_NAME, rule, {
|
||||
valid: valids,
|
||||
invalid: invalids.map(i => ({
|
||||
code: i[0],
|
||||
output: i[1],
|
||||
errors: [{ messageId: 'importDedupe' }, { messageId: 'importDedupe' }, { messageId: 'importDedupe' }],
|
||||
})),
|
||||
})
|
||||
})
|
55
packages/eslint-plugin-antfu/src/rules/import-dedupe.ts
Normal file
55
packages/eslint-plugin-antfu/src/rules/import-dedupe.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { createEslintRule } from '../utils'
|
||||
|
||||
export const RULE_NAME = 'import-dedupe'
|
||||
export type MessageIds = 'importDedupe'
|
||||
export type Options = []
|
||||
|
||||
export default createEslintRule<Options, MessageIds>({
|
||||
name: RULE_NAME,
|
||||
meta: {
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'Fix duplication in imports',
|
||||
recommended: 'error',
|
||||
},
|
||||
fixable: 'code',
|
||||
schema: [],
|
||||
messages: {
|
||||
importDedupe: 'Expect no duplication in imports',
|
||||
},
|
||||
},
|
||||
defaultOptions: [],
|
||||
create: (context) => {
|
||||
return {
|
||||
ImportDeclaration(node) {
|
||||
if (node.specifiers.length <= 1)
|
||||
return
|
||||
|
||||
const names = new Set<string>()
|
||||
node.specifiers.forEach((n) => {
|
||||
const id = n.local.name
|
||||
if (names.has(id)) {
|
||||
context.report({
|
||||
node,
|
||||
loc: {
|
||||
start: n.loc.end,
|
||||
end: n.loc.start,
|
||||
},
|
||||
messageId: 'importDedupe',
|
||||
fix(fixer) {
|
||||
const s = n.range[0]
|
||||
let e = n.range[1]
|
||||
if (context.getSourceCode().text[e] === ',')
|
||||
e += 1
|
||||
return fixer.removeRange([s, e])
|
||||
},
|
||||
})
|
||||
}
|
||||
names.add(id)
|
||||
})
|
||||
|
||||
// console.log(node)
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
@@ -0,0 +1,27 @@
|
||||
import { RuleTester } from '@typescript-eslint/utils/dist/ts-eslint'
|
||||
import { it } from 'vitest'
|
||||
import rule, { RULE_NAME } from './prefer-inline-type-import'
|
||||
|
||||
const valids = [
|
||||
'import { type Foo } from \'foo\'',
|
||||
'import type Foo from \'foo\'',
|
||||
'import type * as Foo from \'foo\'',
|
||||
]
|
||||
const invalids = [
|
||||
['import type { Foo } from \'foo\'', 'import { type Foo } from \'foo\''],
|
||||
]
|
||||
|
||||
it('runs', () => {
|
||||
const ruleTester: RuleTester = new RuleTester({
|
||||
parser: require.resolve('@typescript-eslint/parser'),
|
||||
})
|
||||
|
||||
ruleTester.run(RULE_NAME, rule, {
|
||||
valid: valids,
|
||||
invalid: invalids.map(i => ({
|
||||
code: i[0],
|
||||
output: i[1].trim(),
|
||||
errors: [{ messageId: 'preferInlineTypeImport' }],
|
||||
})),
|
||||
})
|
||||
})
|
@@ -0,0 +1,63 @@
|
||||
// Ported from https://github.com/gajus/eslint-plugin-canonical/blob/master/src/rules/preferInlineTypeImport.js
|
||||
// by Gajus Kuizinas https://github.com/gajus
|
||||
|
||||
import { createEslintRule } from '../utils'
|
||||
|
||||
export const RULE_NAME = 'prefer-inline-type-import'
|
||||
export type MessageIds = 'preferInlineTypeImport'
|
||||
export type Options = []
|
||||
|
||||
export default createEslintRule<Options, MessageIds>({
|
||||
name: RULE_NAME,
|
||||
meta: {
|
||||
type: 'suggestion',
|
||||
docs: {
|
||||
description: 'Newline after if',
|
||||
recommended: 'error',
|
||||
},
|
||||
fixable: 'code',
|
||||
schema: [],
|
||||
messages: {
|
||||
preferInlineTypeImport: 'Prefer inline type import',
|
||||
},
|
||||
},
|
||||
defaultOptions: [],
|
||||
create: (context) => {
|
||||
const sourceCode = context.getSourceCode()
|
||||
return {
|
||||
ImportDeclaration: (node) => {
|
||||
// ignore bare type imports
|
||||
if (node.specifiers.length === 1 && ['ImportNamespaceSpecifier', 'ImportDefaultSpecifier'].includes(node.specifiers[0].type))
|
||||
return
|
||||
if (node.importKind === 'type') {
|
||||
context.report({
|
||||
*fix(fixer) {
|
||||
yield * removeTypeSpecifier(fixer, sourceCode, node)
|
||||
|
||||
for (const specifier of node.specifiers)
|
||||
yield fixer.insertTextBefore(specifier, 'type ')
|
||||
},
|
||||
loc: node.loc,
|
||||
messageId: 'preferInlineTypeImport',
|
||||
node,
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
function *removeTypeSpecifier(fixer, sourceCode, node) {
|
||||
const importKeyword = sourceCode.getFirstToken(node)
|
||||
|
||||
const typeIdentifier = sourceCode.getTokenAfter(importKeyword)
|
||||
|
||||
yield fixer.remove(typeIdentifier)
|
||||
|
||||
if (importKeyword.loc.end.column + 1 === typeIdentifier.loc.start.column) {
|
||||
yield fixer.removeRange([
|
||||
importKeyword.range[1],
|
||||
importKeyword.range[1] + 1,
|
||||
])
|
||||
}
|
||||
}
|
5
packages/eslint-plugin-antfu/src/utils.ts
Normal file
5
packages/eslint-plugin-antfu/src/utils.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { ESLintUtils } from '@typescript-eslint/utils'
|
||||
|
||||
export const createEslintRule = ESLintUtils.RuleCreator(
|
||||
ruleName => ruleName,
|
||||
)
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-react",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
@@ -19,11 +19,11 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-ts": "^0.19.1",
|
||||
"@antfu/eslint-config-ts": "workspace:*",
|
||||
"eslint-plugin-react": "^7.29.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.12.0",
|
||||
"eslint": "^8.14.0",
|
||||
"react": "^18.0.0",
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
|
@@ -29,7 +29,41 @@ module.exports = {
|
||||
// Override JS
|
||||
'no-useless-constructor': 'off',
|
||||
'indent': 'off',
|
||||
'@typescript-eslint/indent': ['error', 2],
|
||||
'@typescript-eslint/indent': ['error', 2, {
|
||||
SwitchCase: 1,
|
||||
VariableDeclarator: 1,
|
||||
outerIIFEBody: 1,
|
||||
MemberExpression: 1,
|
||||
FunctionDeclaration: { parameters: 1, body: 1 },
|
||||
FunctionExpression: { parameters: 1, body: 1 },
|
||||
CallExpression: { arguments: 1 },
|
||||
ArrayExpression: 1,
|
||||
ObjectExpression: 1,
|
||||
ImportDeclaration: 1,
|
||||
flatTernaryExpressions: false,
|
||||
ignoreComments: false,
|
||||
ignoredNodes: [
|
||||
'TemplateLiteral *',
|
||||
'JSXElement',
|
||||
'JSXElement > *',
|
||||
'JSXAttribute',
|
||||
'JSXIdentifier',
|
||||
'JSXNamespacedName',
|
||||
'JSXMemberExpression',
|
||||
'JSXSpreadAttribute',
|
||||
'JSXExpressionContainer',
|
||||
'JSXOpeningElement',
|
||||
'JSXClosingElement',
|
||||
'JSXFragment',
|
||||
'JSXOpeningFragment',
|
||||
'JSXClosingFragment',
|
||||
'JSXText',
|
||||
'JSXEmptyExpression',
|
||||
'JSXSpreadChild',
|
||||
'TSTypeParameterInstantiation',
|
||||
],
|
||||
offsetTernaryExpressions: true,
|
||||
}],
|
||||
'no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
||||
'no-redeclare': 'off',
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-ts",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
@@ -17,11 +17,11 @@
|
||||
"typescript": ">=3.9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-basic": "^0.19.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.17.0",
|
||||
"@typescript-eslint/parser": "^5.17.0"
|
||||
"@antfu/eslint-config-basic": "workspace:*",
|
||||
"@typescript-eslint/eslint-plugin": "^5.20.0",
|
||||
"@typescript-eslint/parser": "^5.20.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.12.0"
|
||||
"eslint": "^8.14.0"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antfu/eslint-config-vue",
|
||||
"version": "0.19.2",
|
||||
"version": "0.21.1",
|
||||
"description": "",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
@@ -16,10 +16,10 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-ts": "^0.19.1",
|
||||
"eslint-plugin-vue": "^8.5.0"
|
||||
"@antfu/eslint-config-ts": "workspace:*",
|
||||
"eslint-plugin-vue": "^8.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.12.0"
|
||||
"eslint": "^8.14.0"
|
||||
}
|
||||
}
|
||||
|
1563
pnpm-lock.yaml
generated
1563
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user