chore: config vscode eslint

This commit is contained in:
Fu Diwei
2024-10-15 18:03:38 +08:00
parent 2c97fa929a
commit b0923d54ee
11 changed files with 249 additions and 48 deletions

View File

@@ -1,18 +1,23 @@
/**
* @type {import("eslint").Linter.Config}
*/
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
env: {
browser: true,
node: true,
es2020: true,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "plugin:react-hooks/recommended"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
plugins: ["react-refresh"],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
"react-refresh/only-export-components": [
"warn",
{
allowConstantExport: true,
},
],
},
}
};