Skip to content

Commit e29aa6b

Browse files
committed
workflow: upgrade @antfu/eslint-config
1 parent abb462d commit e29aa6b

12 files changed

+966
-789
lines changed

.commitlintrc.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Default Config See https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional
2-
const { rules } = require('@commitlint/config-conventional')
2+
import { rules } from '@commitlint/config-conventional'
33

44
// See https://github.com/vuejs/core/blob/main/scripts/verifyCommit.js
55
rules['type-enum'][2].push('wip', 'types', 'release', 'workflow', 'dx')
66
rules['header-max-length'][2] = 200
77
rules['subject-case'][0] = 0
88

9-
module.exports = {
9+
export default {
1010
extends: ['@commitlint/config-conventional'],
1111
rules,
1212
}

.eslintrc.json

-19
This file was deleted.

.vscode/settings.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
// Enable the ESlint flat config support
3+
"eslint.experimental.useFlatConfig": true,
4+
5+
// Disable the default formatter, use eslint instead
6+
"prettier.enable": false,
7+
"editor.formatOnSave": false,
8+
9+
// Auto fix
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll.eslint": "explicit",
12+
"source.organizeImports": "never"
13+
},
14+
15+
// Silent the stylistic rules in you IDE, but still auto fix them
16+
"eslint.rules.customizations": [
17+
{ "rule": "style/*", "severity": "off" },
18+
{ "rule": "format/*", "severity": "off" },
19+
{ "rule": "*-indent", "severity": "off" },
20+
{ "rule": "*-spacing", "severity": "off" },
21+
{ "rule": "*-spaces", "severity": "off" },
22+
{ "rule": "*-order", "severity": "off" },
23+
{ "rule": "*-dangle", "severity": "off" },
24+
{ "rule": "*-newline", "severity": "off" },
25+
{ "rule": "*quotes", "severity": "off" },
26+
{ "rule": "*semi", "severity": "off" }
27+
],
28+
29+
// Enable eslint for all supported languages
30+
"eslint.validate": [
31+
"javascript",
32+
"javascriptreact",
33+
"typescript",
34+
"typescriptreact",
35+
"vue",
36+
"html",
37+
"markdown",
38+
"json",
39+
"jsonc",
40+
"yaml",
41+
"toml"
42+
]
43+
}

0 commit comments

Comments
 (0)