Skip to content

Commit

Permalink
chore: update deps and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Dec 26, 2023
1 parent 8d5abdf commit 7978933
Show file tree
Hide file tree
Showing 100 changed files with 2,013 additions and 1,855 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

43 changes: 42 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,46 @@
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.semi": false,
"typescript.format.semicolons": "remove",
"javascript.format.semicolons": "remove"
"javascript.format.semicolons": "remove",
// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,

// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,

// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},

// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],

// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml"
]
}
24 changes: 24 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const antfu = require('@antfu/eslint-config').default

module.exports = antfu(
{
markdown: false,
},
{
rules: {
'import/first': 'off',
'no-alert': 'off',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'prefer-const': 'off',
'ts/ban-ts-comment': 'off',
'ts/ban-types': 'off',
'ts/consistent-type-definitions': 'off',
'ts/no-namespace': 'off',
'ts/no-require-imports': 'off',
'ts/no-unused-vars': 'off',
'unused-imports/no-unused-vars': 'off',
},
},
)
38 changes: 12 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "type-challenges",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@7.13.0",
"packageManager": "pnpm@8.12.1",
"author": "Anthony Fu <[email protected]>",
"license": "MIT",
"repository": "https://github.com/antfu/type-challenges.git",
Expand All @@ -16,37 +16,23 @@
},
"dependencies": {
"esno": "^4.0.0",
"fast-glob": "^3.2.11",
"fs-extra": "^10.1.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
"js-yaml": "^4.1.0",
"lz-string": "^1.4.4"
"lz-string": "^1.5.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.25.1",
"@antfu/eslint-config": "^2.6.0",
"@type-challenges/utils": "workspace:*",
"@types/fs-extra": "^9.0.13",
"@types/js-yaml": "^4.0.5",
"@types/lz-string": "^1.3.34",
"@types/node": "^18.0.0",
"@types/prompts": "^2.4.2",
"eslint": "^8.18.0",
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/lz-string": "^1.5.0",
"@types/node": "^20.10.5",
"@types/prompts": "^2.4.9",
"eslint": "^8.56.0",
"picocolors": "^1.0.0",
"prompts": "^2.4.2",
"typescript": "^4.7.4",
"typescript": "^5.3.3",
"utility-types": "^3.10.0"
},
"eslintConfig": {
"extends": "@antfu/eslint-config-ts",
"rules": {
"import/first": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-use-before-define": "off",
"no-unused-expressions": "off",
"prefer-const": "off",
"no-alert": "off",
"@typescript-eslint/consistent-type-definitions": "off"
}
}
}
Loading

0 comments on commit 7978933

Please sign in to comment.